Expandable text
CoreLong text clamped to a few lines with a soft fade that glides open with Read more and closes with Show less, shown only when the text overflows.
pnpm dlx shadcn@latest add https://wui.alann.works/r/expandable-text.jsonAPI Reference
| Prop | Type | Default |
|---|---|---|
children* | ReactNode | required |
lines | number | — |
expanded | boolean | — |
defaultExpanded | boolean | — |
onExpandedChange | (expanded: boolean) => void | — |
moreLabel | string | — |
lessLabel | string | — |