Expandable text

Core

Long 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.json
wUI is a personal React design system built on monochrome OKLCH tokens, Manrope and Geist Mono typography, tactile spring motion, and a shadcn-compatible registry that works for both humans and AI coding agents.

API Reference

PropTypeDefault
children*ReactNoderequired
linesnumber—
expandedboolean—
defaultExpandedboolean—
onExpandedChange(expanded: boolean) => void—
moreLabelstring—
lessLabelstring—
Categories
disclosure
Dependencies
lucide-reactmotion