Scroll area
A native scroll container with thin overlay scrollbars and edge fades that appear only when content overflows.
Give a dense card more room when requested.
npx shadcn@latest add @silicon-ui/expandable-cardnpx shadcn@latest add @silicon-ui/expandable-cardInstall the dependencies.
npm install lucide-react motionCopy these files into your project. Shared files are skipped if you already have them.
components/silicon-ui/expandable-card/expandable-card.tsxcomponents/silicon-ui/expandable-card/expandable-card.module.cssInstall the foundation once per app for the design and motion tokens: npx shadcn@latest add @silicon-ui/silicon-foundation
| Prop | Type | Default |
|---|---|---|
title* | string | — |
children* | ReactNode | — |
description | string | — |
defaultExpanded | boolean | false |
widthCollapsed width cap in px. The card is centered and never wider than its container. Fills the container when omitted. | number | — |
expandedWidthExpanded width cap in px, so the card can grow sideways into more room. Defaults to `width`. | number | — |
Also accepts the props of ComponentPropsWithoutRef<"article">, except title, children, onAnimationStart, onAnimationEnd, onAnimationIteration, onDrag, onDragStart, onDragEnd, onDragOver, onDragLeave, onDragEnter, onDragExit, onDrop.