You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+42-6Lines changed: 42 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,39 @@
1
1
# react-native-reanimated-carousel
2
2
3
+
## 5.0.0-beta.1
4
+
5
+
### Minor Changes
6
+
7
+
-[#853](https://github.com/dohooo/react-native-reanimated-carousel/pull/853)[`c595958`](https://github.com/dohooo/react-native-reanimated-carousel/commit/c59595896381c36cc395f95b8631aee503cfd927) Thanks [@dohooo](https://github.com/dohooo)! - - add `itemWidth`/`itemHeight` props so horizontal and vertical carousels can define their snapping step explicitly (e.g. to show multiple cards per page)
8
+
9
+
- default behaviour still falls back to the carousel container size or legacy `width`/`height` props
10
+
11
+
-[#853](https://github.com/dohooo/react-native-reanimated-carousel/pull/853)[`c595958`](https://github.com/dohooo/react-native-reanimated-carousel/commit/c59595896381c36cc395f95b8631aee503cfd927) Thanks [@dohooo](https://github.com/dohooo)! - ## ✨ Style API refresh
12
+
13
+
-`style` now controls the outer carousel container (positioning, width/height, margins).
14
+
- New `contentContainerStyle` replaces `containerStyle` for styling the scrollable content.
15
+
-`width` and `height` props are deprecated; define size via `style` instead.
16
+
17
+
### Migration Example
18
+
19
+
```tsx
20
+
// Before
21
+
<Carousel
22
+
width={300}
23
+
height={200}
24
+
containerStyle={{ paddingHorizontal: 16 }}
25
+
/>
26
+
27
+
// After
28
+
<Carousel
29
+
style={{ width: 300, height: 200 }}
30
+
contentContainerStyle={{ paddingHorizontal: 16 }}
31
+
/>
32
+
```
33
+
34
+
- Any layout logic still works; simply move `width`/`height` into `style` and container tweaks into `contentContainerStyle`.
35
+
-`contentContainerStyle` runs on the JS thread—avoid adding `opacity` / `transform` there if you rely on built-in animations.
36
+
3
37
## 5.0.0-beta.0
4
38
5
39
### Major Changes
@@ -16,24 +50,26 @@
16
50
#### Migration Guide
17
51
18
52
**Before:**
53
+
19
54
```jsx
20
55
<Carousel
21
56
width={300}
22
57
height={200}
23
-
style={{ backgroundColor:'red' }} // Applied to inner container
58
+
style={{ backgroundColor:"red" }} // Applied to inner container
24
59
containerStyle={{ margin:10 }} // Applied to outer container
25
60
/>
26
61
```
27
62
28
63
**After:**
64
+
29
65
```jsx
30
66
<Carousel
31
-
style={{
32
-
width:300,
33
-
height:200,
34
-
margin:10
67
+
style={{
68
+
width:300,
69
+
height:200,
70
+
margin:10,
35
71
}} // Applied to outer container
36
-
contentContainerStyle={{ backgroundColor:'red' }} // Applied to inner container
72
+
contentContainerStyle={{ backgroundColor:"red" }} // Applied to inner container
0 commit comments