import { EmblaCarousel } from './EmblaCarousel';
const LIST_LENGTH = 10;
export default function App() {
return (
<div>
<EmblaCarousel.Root>
<EmblaCarousel.Content>
{Array.from({ length: LIST_LENGTH }).map((_, index) => (
<Carousel key={index} />
))}
</EmblaCarousel.Content>
</EmblaCarousel.Root>
</div>
);
}
function Carousel() {
const { currentIndex } = useEmbla();
return <EmblaCarousel.Item>{currentIndex}</EmblaCarousel.Item>;
}
-
Notifications
You must be signed in to change notification settings - Fork 1
thyeone/embla
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Reusable Headless Embla Carousel
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published