Hero section
Three full screen SaaS heroes: a live dashboard rising from the bottom edge over a drifting mesh, a workflow graph that routes sample events node by node, and editorial type over a mesh gradient.
npx shadcn@latest add @silicon-ui/hero-sectionInstallation
With the shadcn CLI
npx shadcn@latest add @silicon-ui/hero-sectionManually
Install the dependencies.
npm install lucide-react motionCopy these files into your project. Shared files are skipped if you already have them.
components/silicon-ui/blocks/hero-section/hero-section.tsxcomponents/silicon-ui/blocks/hero-section/hero-section.module.csscomponents/silicon-ui/blocks/hero-section/hero-content.tsxcomponents/silicon-ui/blocks/hero-section/hero-content.module.csscomponents/silicon-ui/blocks/hero-section/hero-motion.tscomponents/silicon-ui/copy-button/copy-button.tsxsharedcomponents/silicon-ui/copy-button/copy-button.module.csssharedcomponents/silicon-ui/lib/use-copy-feedback.tssharedcomponents/silicon-ui/button/button.tsxsharedcomponents/silicon-ui/button/button.module.csssharedcomponents/silicon-ui/blocks/hero-section/hero-mesh.tsxcomponents/silicon-ui/blocks/hero-section/hero-mesh.module.csscomponents/silicon-ui/blocks/hero-section/hero-cadence.tsxcomponents/silicon-ui/blocks/hero-section/hero-cadence.module.csscomponents/silicon-ui/blocks/hero-section/hero-relay.tsxcomponents/silicon-ui/blocks/hero-section/hero-relay.module.csscomponents/silicon-ui/blocks/hero-section/hero-lumen.tsxcomponents/silicon-ui/blocks/hero-section/hero-lumen.module.csscomponents/silicon-ui/blocks/hero-section/hero-lumen-data.tscomponents/silicon-ui/line-chart/line-chart.tsxsharedcomponents/silicon-ui/line-chart/line-chart.module.csssharedcomponents/silicon-ui/lib/media.tssharedcomponents/silicon-ui/avatar/avatar.tsxsharedcomponents/silicon-ui/avatar/avatar.module.csssharedcomponents/silicon-ui/lib/silicon-provider.tsxsharedcomponents/silicon-ui/segmented-control/segmented-control.tsxsharedcomponents/silicon-ui/segmented-control/segmented-control.module.csssharedcomponents/silicon-ui/sparkline/sparkline.tsxsharedcomponents/silicon-ui/sparkline/sparkline.module.cssshared
Install the foundation once per app for the design and motion tokens:
npx shadcn@latest add @silicon-ui/silicon-foundation
Usage
API reference
HeroSection
| Prop | Type | Default |
|---|---|---|
variant`centered` is a headline over a drifting mesh with a live dashboard rising from the bottom edge, `split` sets the copy beside a live workflow graph that runs sample events node by node, and `minimal` is large type over a mesh gradient. Each design fills one full screen. | HeroSectionVariant
| "centered" |
animateInPlays the entrance once on mount. Defaults to true. | boolean | true |
primaryActionThe main call to action. With `doneLabel` and no `href`, the button confirms in place. | HeroAction | null | — |
secondaryActionThe second call to action. | HeroAction | null | — |
titleYour own headline. When set, the hero renders your content in the chosen layout (see `HeroContent`) instead of the designed sample, together with the props below. | string | — |
description | string | — |
announcement | HeroAction | null | — |
installInstall commands for your own content; the first one is shown with a copy button. | HeroInstallCommand[] | null | — |
mediaA visual beside your own content in the split layout. | ReactNode | — |
metaSmall facts under your own content, such as the version and license. | string[] | — |
highlightKept for compatibility; highlighted phrases render as plain text. | string | — |
className | string | — |
HeroSectionBlock
| Prop | Type | Default |
|---|---|---|
variant | HeroSectionVariant
| "centered" |
HeroCadence
| Prop | Type | Default |
|---|---|---|
primaryAction | HeroAction | — |
secondaryAction | HeroAction | — |
animateIn | boolean | — |
className | string | — |
HeroContent
| Prop | Type | Default |
|---|---|---|
layout* | "centered" | "split" | "minimal" | — |
title* | string | — |
announcement | HeroAction | null | — |
description | string | — |
primaryAction | HeroAction | null | — |
secondaryAction | HeroAction | null | — |
install | HeroInstallCommand[] | null | — |
media | ReactNode | — |
meta | string[] | — |
animateIn | boolean | — |
className | string | — |
HeroLumen
| Prop | Type | Default |
|---|---|---|
primaryAction | HeroAction | — |
secondaryAction | HeroAction | — |
animateIn | boolean | — |
className | string | — |
HeroMesh
| Prop | Type | Default |
|---|---|---|
points* | readonly HeroMeshPoint[] | — |
grainFilm grain, 0 to 1. | number | — |
speedDrift speed. 1 loops every 20 seconds; 0 holds the mesh still. | number | — |
className | string | — |
style | CSSProperties | — |
HeroRelay
| Prop | Type | Default |
|---|---|---|
primaryAction | HeroAction | — |
secondaryAction | HeroAction | — |
animateIn | boolean | — |
className | string | — |