ComponentsCarousels & media
Showcase Carousel
A carousel with the current slide forward and its neighbours turned away on either side.
This example uses sample data from this site: data.ts, which also needs art.ts. Copy those files from the repository, or use your own data in their place.
"use client";
import { Button } from "@/components/miyuki-ui/button";
import { ShowcaseCarousel } from "@/components/miyuki-ui/showcase-carousel";
import { places } from "@/registry/lib/data";
const slides = ["Otaru", "Hakuba", "Nozawa", "Shirakawa", "Niseko"].map((name) => {
const place = places.find((p) => p.name === name)!;
return {
title: place.name,
src: place.image,
action: (
<Button size="sm" aria-label={`Open guide to ${place.name}`}>
Open guide
</Button>
),
};
});
export default function ShowcaseCarouselDemo() {
return <ShowcaseCarousel slides={slides} defaultIndex={1} aria-label="Winter guides" />;
}Install
npx shadcn@latest add @miyuki-ui/showcase-carouselThis needs the @miyuki-ui registry in your components.json. See Using the shadcn CLI.
Props
ShowcaseCarousel
Prop
Type
Kamishibai Slider
A paper theatre: pictures in a wooden frame with its doors folded back, each sheet drawn out sideways to reveal the next.
Soundscape Mixer
A small mixer of weather sounds made on the spot with WebAudio, no files: rain, wind, a stream and a fire, each with a level and a live picture of itself.