Changelog feed
Release notes you can filter, open in place, and scroll through month by month.
A validated contact form that morphs into a confirmation, support channels, and office cards with local times.
npx shadcn@latest add @silicon-ui/contact-sectionnpx shadcn@latest add @silicon-ui/contact-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/contact-section/contact-section.tsxcomponents/silicon-ui/blocks/contact-section/contact-section.module.csscomponents/silicon-ui/lib/media.ts sharedcomponents/silicon-ui/textarea/textarea.tsx sharedcomponents/silicon-ui/textarea/textarea.module.css sharedcomponents/silicon-ui/segmented-control/segmented-control.tsx sharedcomponents/silicon-ui/segmented-control/segmented-control.module.css sharedcomponents/silicon-ui/input/input.tsx sharedcomponents/silicon-ui/input/input.module.css sharedcomponents/silicon-ui/copy-button/copy-button.tsx sharedcomponents/silicon-ui/copy-button/copy-button.module.css sharedcomponents/silicon-ui/lib/use-copy-feedback.ts sharedcomponents/silicon-ui/button/button.tsx sharedcomponents/silicon-ui/button/button.module.css sharedcomponents/silicon-ui/avatar/avatar.tsx sharedcomponents/silicon-ui/avatar/avatar.module.css sharedcomponents/silicon-ui/lib/silicon-provider.tsx sharedInstall the foundation once per app for the design and motion tokens: npx shadcn@latest add @silicon-ui/silicon-foundation
ContactSection| Prop | Type | Default |
|---|---|---|
variant`form` validates and morphs into a confirmation, `channels` lists ways to reach you, `offices` shows live local times. | ContactSectionVariant
| "form" |
title | string | — |
description | string | — |
topicsTopics offered in the form. | string[] | ["Sales", "Support", "Partnerships", "Press"] |
onSubmitCalled with a valid message. Reject to keep the form and show an error; resolve to show the confirmation. | (message: ContactMessage) => void | Promise<void> | — |
channels | ContactChannel[] | contactExampleChannels |
channelSelected channel (controlled). | string | — |
defaultChannel | string | — |
onChannelChange | (value: string) => void | — |
offices | ContactOffice[] | contactExampleOffices |
className | string | — |
Also accepts the props of HTMLAttributes.
ContactSectionBlock| Prop | Type | Default |
|---|---|---|
variant | ContactSectionVariant
| "form" |