Skip to main content

Button

Trigger actions with a single click. The primary style requires zero classes — @primus/ui-core styles <button> elements automatically.

Preview · Button

Code​

<div class="hstack" style="flex-wrap:wrap">
<button>Primary</button>
<button data-variant="secondary">Secondary</button>
<button data-variant="danger">Delete</button>
<button class="outline">Export</button>
<button class="ghost">More</button>
<button class="small">Small</button>
<button class="large">Large</button>
</div>

Props​

PropTypeDefaultDescription
variantprimary | secondary | outline | ghost | dangerprimaryVisual style
sizesm | md | lgmdSize
disabledbooleanfalseDisabled state
typebutton | submit | resetbuttonHTML button type
Version history

See the Changelog for version history and breaking changes.