ComponentsBlocks
Card sections
Three cards for marketing pages: a row of instruments read by a passing line of light, an image card that wakes on hover, and a journal card.
Instruments
"use client";
import { InstrumentsCard } from "@/components/miyuki-ui/card-sections";
export default function CardSectionsInstrumentsDemo() {
return (
<InstrumentsCard
title="Five instruments, one reading"
description="Air, wind, pressure, snowfall and river level, taken at the same moment from the same mast on Happō ridge."
/>
);
}Overlay
This example uses generated pictures from this site: art.ts. Copy that file from the repository, or use your own images in its place.
"use client";
import { OverlayCard } from "@/components/miyuki-ui/card-sections";
import { landscape } from "@/registry/lib/art";
export default function CardSectionsOverlayDemo() {
return (
<OverlayCard
src={landscape("overlay-daisetsuzan", { mood: "dusk", width: 800, height: 1000 })}
alt="Ridges at dusk above a still lake"
meta="Hokkaido · July to September"
title="Three nights on the Daisetsuzan traverse"
description="Hut to hut across the roof of Hokkaido, with a guide and a forecast written for the ridge."
href="#daisetsuzan"
/>
);
}Content
This example uses generated pictures and sample data from this site: art.ts and data.ts. Copy those files from the repository, or use your own images and data in their place.
"use client";
import { ContentCard } from "@/components/miyuki-ui/card-sections";
import { landscape } from "@/registry/lib/art";
import { people } from "@/registry/lib/data";
const author = people.find((p) => p.name === "Yuna Sato")!;
export default function CardSectionsContentDemo() {
return (
<ContentCard
src={landscape("journal-ridge", { mood: "day", width: 960, height: 600 })}
alt="A clear ridge line above the clouds"
title="Reading a ridge forecast the way a guide does"
excerpt="Most people look at the temperature first. Guides look at the freezing level and the wind, then decide whether the temperature matters at all."
author={{ name: author.name, avatar: author.avatar }}
readingTime="7 min read"
href="#ridge-forecast"
/>
);
}Install
npx shadcn@latest add @miyuki-ui/card-sectionsThis needs the @miyuki-ui registry in your components.json. See Using the shadcn CLI.
Props
InstrumentsCard
Prop
Type
OverlayCard
Prop
Type
ContentCard
Prop
Type