Here's a styled version of the previous example:
import { useSpringCarousel } from 'react-spring-carousel'
export function Component() {
const { carouselFragment } = useSpringCarousel({
items: mockedItems.map((i) => ({
id: i.id,
renderItem: (
<CarouselItem color={i.color}>
{i.title}
</CarouselItem>
),
})),
});
return (
<div>
{carouselFragment}
</div>
);
}