dr-ui
Components

Expandable Content

Clips content to a maximum height and shows a Show more/Show less button when it overflows

Installation

npx shadcn@latest add @dr-ui/expandable-content

Registry dependencies

@dr-ui/utils
@dr-ui/button

Dependencies

lucide-react@^1.7.0

Basic

Clips content to a max height and reveals the rest with a Show more button.

The capybara is the world's largest living rodent, native to South America. It is a highly social animal, often found in groups near rivers, lakes, and wetlands. Capybaras are semi-aquatic and are excellent swimmers, capable of staying submerged for several minutes to hide from predators. Their barrel-shaped bodies, short heads, and reddish-brown fur make them instantly recognizable. They are herbivores that graze on grasses and aquatic plants, and they have continuously growing teeth to handle tough vegetation. Despite their size, capybaras are docile and friendly, and they often coexist peacefully with other animals such as birds, monkeys, and even caimans. They communicate through a variety of sounds including purrs, barks, whistles, and clicks. Capybaras are considered a symbol of calm and social harmony in many South American cultures.