Skip to content

React button components

Free React button components for Tailwind CSS: primary, accent, outline and ghost variants, icon buttons, split buttons, button groups, toggles and copy buttons.

9 itemsFree, MITshadcn CLI compatibleTailwind CSS v4Light and dark

One Button component covers most of this category: eight variants and nine sizes, with default (ink) for the primary action, outline for secondary, ghost in toolbars, destructive for actions that cannot be undone and accent at most once per screen. IconButton, CopyButton and FloatingActionButton are Buttons with one extra job; SplitButton and ButtonGroup combine several actions.

Toggle and ToggleGroup hold a pressed state, such as bold or a view filter; they are not actions. MagneticCta is the one animated button here, meant for a single call to action on a marketing page.

Which one should I use?

You needUseWhy
The main action on a screenButtonThe default ink variant
An icon-only action in a toolbar or rowIcon ButtonRequires an aria-label
A default action with close variantsSplit Button"Save" plus "Save draft" in a menu
Several related actions side by sideButton GroupShared borders, one aria-label
An on/off state, like boldTogglearia-pressed, not an action
A row of formatting togglesToggle GroupSingle or multiple selection
Copy an API key or commandCopy ButtonShows "Copied" and announces it
The primary action on a phone screenFloating Action ButtonFixed bottom-right
A hero button that reacts to the pointerMagnetic CtaStill for touch, keyboard and reduced motion

9 items

npx shadcn@latest add @minidev/button-group @minidev/button @minidev/copy-button @minidev/floating-action-button @minidev/icon-button @minidev/split-button @minidev/toggle-group @minidev/toggle @minidev/magnetic-cta

Components 8

  • Groups adjacent buttons into one segmented control in Tailwind, joining borders and rounding only the outer corners. Uses role group for toolbars.

    npx shadcn@latest add @minidev/button-group
  • Shadcn compatible React button on Base UI with eight variants, nine sizes including icon sizes, a pressed state and render prop support for links.

    npx shadcn@latest add @minidev/button
  • React copy to clipboard button that writes a value, then swaps to a check icon and Copied label for a moment. Accepts every Button variant and size.

    npx shadcn@latest add @minidev/copy-button
  • A round primary button fixed to the bottom right corner of the viewport for the main action on a screen. Accepts every Button prop, including icons.

    npx shadcn@latest add @minidev/floating-action-button
  • A square React button for icon only actions in small, default and large sizes with every Button variant. Its aria-label prop is required, so it is always named.

    npx shadcn@latest add @minidev/icon-button
  • Split button with a primary action and a chevron that opens a dropdown of secondary actions, including destructive items. The menu matches the button width.

    npx shadcn@latest add @minidev/split-button
  • Toggle group on Base UI that wraps Toggle buttons for single or multiple selection with shared keyboard navigation. Use it for text formatting or view modes.

    npx shadcn@latest add @minidev/toggle-group
  • Two-state toggle button on Base UI with sm, default and lg sizes and a pressed style. A shadcn-compatible Toggle for toolbar actions like bold or mute in React.

    npx shadcn@latest add @minidev/toggle

Motion 1

  • A magnetic button that drifts toward the cursor on a spring and snaps back on leave. Takes all Button props plus a strength value; static for reduced motion.

    npx shadcn@latest add @minidev/magnetic-cta

Using an AI coding agent? Read the agent guide, point it at /llms.txt for the full index, or paste /AGENTS.md into your project. Every component has plain Markdown docs at /docs/<name>.md.

See them live

Galleries render these components with sample data in every state.

Frequently asked questions

How do I render a button as a link in Next.js?

Pass render={<a href="/pricing" />} or a Next.js Link. The button keeps its styles and the element becomes a real anchor, so middle click, open in new tab and crawlers all work.

How do I show a loading state on a button?

Disable the button and put a Spinner before the label. Keep the label text so the width stays the same while the action runs.

What is the difference between a toggle and a switch?

Toggle is a button that stays pressed, for toolbar state like bold or "show archived". Switch is a setting that takes effect immediately. Use Checkbox when the choice is submitted with a form.

Which variant should my main call to action use?

The default ink variant, for the one action that matters on a screen. Use accent at most once per screen, for a brand moment such as a hero call to action.