Plinth

Button

Trigger actions with 6 variants, 6 sizes, loading and icon support.

Install

npx shadcn@latest add https://plinth.dhrumilkherde.com/r/button.json

Usage

import { Button } from "@/components/ui/button";

<Button variant="outline" size="lg">Save changes</Button>

Sizes

sm, md (default), lg, plus square icon-sm, icon, icon-lg for icon-only buttons. Icon-only buttons need an aria-label.

With icon

Any SVG inside the button is sized automatically per button size.

Loading

loading shows a centered spinner, disables the button, and preserves its width so layouts don't shift.

Disabled

Props

PropTypeDefault
variantprimary · secondary · outline · ghost · destructive · linkprimary
sizesm · md · lg · icon-sm · icon · icon-lgmd
loadingbooleanfalse
disabledbooleanfalse
renderReactElementrenders as <button>

Also accepts all native button props. Use render to compose with links: <Button render={<a href="/docs" />}>Docs</Button>.

Accessibility

  • Built on Base UI Button: correct semantics with render, and focusableWhenDisabled support.
  • Keyboard: focusable via Tab, activates with Enter and Space, visible focus ring from the global --ring token.
  • Loading buttons stay in the layout and announce the spinner via role="status".

On this page