Media card
Media card with a generated dithered landscape whose ridges shift at different depths as the card tilts toward the pointer.
Playground
Change a prop and the component updates. Props marked live animate to the new value; the others rebuild the element.
<HfCard
hue={262}
seed="valley"
tags="Generative,Dither,Parallax"
alt="Pixel landscape illustration"
/>Installation
pnpm dlx shadcn@latest add @lumesec/hf-cardFirst timeRegister the @lumesec registry once, or install by URL
Adds @lumesec to your components.json:
pnpm dlx shadcn@latest registry add @lumesec=https://elements.lumesec.ai/r/{name}.jsonOr skip the setup and install by URL:
npx shadcn@latest add https://elements.lumesec.ai/r/hf-card.jsonUsage
import { HfCard } from "@/components/lumesec/hf-card";
export function Example() {
return (
<HfCard tags="Generative,Dither,Parallax">
<span slot="title">Pixel Valley</span>
A generated landscape that drifts with your pointer. Every layer is a dithered noise ridge.
</HfCard>
);
}Behaviour
A procedurally drawn landscape whose ridges move at different depths as the card tilts toward your pointer, with a glare of dots following it.
API reference
Attributes
hueReact prophueTypenumberDefault262Base hue in degrees for the sky and ridges. Observed.
seedReact propseedTypestringDefaultvalleySeed for the ridge shapes. Observed.
tagsReact proptagsTypestringDefaultGenerative,Dither,ParallaxComma-separated tag chips; an empty value shows none. Observed.
altReact propaltTypestringDefaultPixel landscape illustrationAccessible name of the landscape canvas. Observed.
Slots
titleCard title. Falls back to Pixel Valley.
(default)Description. Falls back to a sample sentence.
Accessibility
- The landscape canvas has
role="img"witharia-labelfromalt. - Title and description are slotted text.
- The card has no link, button or focus target of its own.
- Reduced motion: the card does not tilt and the landscape does not drift; the canvas redraws only on pointer movement.
Theming
The element reads your shadcn theme tokens through its shadow root, so light and dark follow your theme. The accent comes from --lumesec. See Theming.
This component reads --border, --muted and --muted-foreground.
To restyle only LumeSec elements, set the matching --ui-* overrides: --ui-border, --ui-muted, --ui-raised and --ui-track.
Notes
- Without reduced motion the canvas redraws every frame while the card is visible.
- Stars twinkle in the sky only in the dark theme.
Related
Was this page helpful?