Command Palette

Search for a command to run...

4Twitter
Expandable Button
A button that smoothly transitions between collapsed and expanded states using spring animations. Shows only an icon when collapsed and reveals text alongside the icon when expanded, perfect for responsive layouts and space-saving interfaces.

Installation

pnpm dlx shadcn@latest add "https://moleculeui.design/r/expandable-button"

Usage

import {ExpandableButton} from '@/components/molecule-ui/expandable-button'
<ExpandableButton />

Examples

Expandable Button Group

Props

PropTypeDefault
icon?
ReactNode
-
onExpandedChange?
((open: boolean) => void)
-
expanded?
boolean
-