Back to Components

Foundation

Button

Primary action element. Three variants drive the chrome, two sizes drive the height.

Examples

Variants

<Button>Primary</Button>
<Button variant="ghost">Ghost</Button>
<Button variant="outline">Outline</Button>

Sizes

<Button size="sm">Small</Button>
<Button>Default</Button>

Icon-only

import Search from '@lucide/svelte/icons/search';

<Button icon aria-label="Search">
  <Search size={14} strokeWidth={1.75} />
</Button>

Disabled

<Button disabled>Disabled</Button>

Props

PropTypeDefaultDescription
variant'primary' | 'ghost' | 'outline''primary'Visual chrome alternative.
size'sm' | 'md''md'Compact (~24px) or default (~30px).
iconbooleanfalseSquare hit-target sized for a single SVG glyph; pair with aria-label.
disabledbooleanfalseNative disabled state.
...restHTMLButtonAttributesSpread onto the underlying <button>.

Install

CLI

npx @a3tai/mittsu add button