#964
Highlights
A four-slide carousel (Plan, Build, Ship, Learn) with arrows and dots, bound to an index shown in a caption.
Hand this to your AI. It names the exact library parts, timings and accessibility promises of this demo.
Build the "Highlights" pattern (@codeatlasdev/ui demo #964, display/carousel) in my app.
Call get_demo({ ids: ["#964"] }) first and keep its structure. It needs @codeatlasdev/[email protected].
Use: Feature highlights, onboarding steps or testimonials where one item shows at a time.
Keep these library parts, with the props and tokens the demo uses:
- Carousel, CarouselItem from "@codeatlasdev/ui"
Behaviour to keep:
- `<Carousel label="Product highlights" bind:index>` over `{#each slides as title (title)}`
- Each slide is `<CarouselItem><div class="slide">{title}</div></CarouselItem>`
- `slides` is `['Plan', 'Build', 'Ship', 'Learn']`
- Caption `Slide {index + 1} of {slides.length}`
Reduced motion: the demo handles it; keep that branch.
Keyboard: operable; keep the focus order and key handling.
Change only the copy and the data. Use the theme tokens (--ca-*), never raw colours. Library parts
- Carousel
@codeatlasdev/ui - CarouselItem
@codeatlasdev/ui
How it is built
- `<Carousel label="Product highlights" bind:index>` over `{#each slides as title (title)}`
- Each slide is `<CarouselItem><div class="slide">{title}</div></CarouselItem>`
- `slides` is `['Plan', 'Build', 'Ship', 'Learn']`
- Caption `Slide {index + 1} of {slides.length}`
Related
Loading source.