Rushil Dhinoja

Expandable Button

Buttons 13

About

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.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Expandable Button to your project and fits it to your theme.

Code

How Expandable Button is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import { ExpandableButton } from "@/components/ui/expandable-button";
import { Inbox } from "lucide-react"


export default function DemoOne() {
  return  <div className="w-full px-10 flex items-center justify-center">
      <ExpandableButton icon={<Inbox className="w-5 h-5" />}>
        Inbox
      </ExpandableButton>
    </div>
}

Dependencies

More by Rushil Dhinoja

View all
  • Morphing Square

    Morphing Square

    462
  • Voice Input

    Voice Input

    336
  • Warp Dialog

    Warp Dialog

    277
  • Orbital Loader

    Orbital Loader

    213
  • Vignette Grid Background

    Vignette Grid Background

    211
  • Bouncing Dots

    Bouncing Dots

    198
  • Wave Loader

    Wave Loader

    134
  • Discussion

    Discussion

    85

More in Buttons

View all
  • Texture Button

    Texture Button

    105
  • Notification Button

    Notification Button

    115
  • Button

    Button

    1
  • HeroUI Button Group

    HeroUI Button Group

  • Button

    Button

    12
  • Base Button

    Base Button

    1
  • App Store Button

    App Store Button

    483
  • Split Button

    Split Button

    37