Carousel component. If your app doesn’t use Carousel, skip to Step 6: Testing Updates.
With RN 0.83, the Carousel component moved from the kepler-ui-components package to a separate package in @amazon-devices. If you use Carousel, you need to migrate the component to the new package.
5.1 Detect Carousel usage
5.2 Update dependencies
- If Carousel is the only import from
kepler-ui-components, replace the dependency entirely. - If other components are also imported, keep
kepler-ui-componentsand addvega-carouselalongside it.
5.3 Update import statements
5.4 Migrate data access pattern
Carousel V2 replaces the simpledata array prop with a dataAdapter pattern for better performance.
5.5 Migrate props
Update prop names to the V2 Prop name in the table below.itemDimensionsgetItemForIndexfirstItemOffsetselectionBorder.enabled
5.6 Migrate event handlers
If you usedonFocus or onFocusUpdate for tracking the selected carousel item, migrate to onSelectionChanged.

