Site header
A sticky website header that turns solid on scroll, with a gliding active link, mega menu panels, and a mobile sheet.
A call to action as a centered closing section, a split beside a setup card that completes itself, or a dismissible banner.
npx shadcn@latest add @silicon-ui/cta-sectionnpx shadcn@latest add @silicon-ui/cta-sectionInstall 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/cta-section/cta-section.tsxcomponents/silicon-ui/blocks/cta-section/cta-section-data.tscomponents/silicon-ui/lib/media.ts sharedcomponents/silicon-ui/blocks/cta-section/cta-section.module.csscomponents/silicon-ui/segmented-control/segmented-control.tsx sharedcomponents/silicon-ui/segmented-control/segmented-control.module.css sharedcomponents/silicon-ui/button/button.tsx sharedcomponents/silicon-ui/button/button.module.css sharedInstall the foundation once per app for the design and motion tokens: npx shadcn@latest add @silicon-ui/silicon-foundation
CtaSection| Prop | Type | Default |
|---|---|---|
variant`centered` is a closing section, `split` sits beside a product visual, `banner` is one dismissible line. | CtaVariant
| "centered" |
title | string | — |
description | string | — |
primaryAction | CtaAction | — |
secondaryActionNot shown in the banner variant. Pass null to hide it. | CtaAction | null | — |
noteSmall print under the actions in the centered variant, such as "No credit card required". | string | — |
facesFaces beside the note in the centered variant. Pass an empty array to hide them. | string[] | ctaFaces |
pointsShort benefit lines in the split variant. | string[] | — |
visualReplaces the split variant's setup card. | ReactNode | — |
onDismissBanner only: shows a dismiss button and calls this after it closes. | () => void | — |
className | string | — |
Also accepts the props of HTMLAttributes.