Skip to content
NewYour data: charts, lists and meters that take your records
<hf-card>Custom elementSurfaces

Media card

Media card with a generated dithered landscape whose ridges shift at different depths as the card tilts toward the pointer.

View as Markdown
<hf-card>
Pixel ValleyA generated landscape that drifts with your pointer. Every layer is a dithered noise ridge.

Playground

Change a prop and the component updates. Props marked live animate to the new value; the others rebuild the element.

Loading <hf-card>
Props
huelive
seedlive
tagslive
altlive
<HfCard
  hue={262}
  seed="valley"
  tags="Generative,Dither,Parallax"
  alt="Pixel landscape illustration"
/>

Installation

pnpm dlx shadcn@latest add @lumesec/hf-card
First 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}.json

Or skip the setup and install by URL:

npx shadcn@latest add https://elements.lumesec.ai/r/hf-card.json

Usage

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 prophueTypenumberDefault262

Base hue in degrees for the sky and ridges. Observed.

seedReact propseedTypestringDefaultvalley

Seed for the ridge shapes. Observed.

tagsReact proptagsTypestringDefaultGenerative,Dither,Parallax

Comma-separated tag chips; an empty value shows none. Observed.

altReact propaltTypestringDefaultPixel landscape illustration

Accessible name of the landscape canvas. Observed.

Slots

title

Card title. Falls back to Pixel Valley.

(default)

Description. Falls back to a sample sentence.

Accessibility

  • The landscape canvas has role="img" with aria-label from alt.
  • 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.

Was this page helpful?