StellarUI

<stellar-button>

Properties

Component
Example

Preview

Button

Markup

Copy
<stellar-button>Button</stellar-button>

API

Complete props, events, slots, and implementation notes for the shipped button.

Props

PropTypeDefaultNotes
toneneutral | primary | secondary | tertiary | errorneutral
appearancesolid | outline | dash | soft | ghost | linksolid
sizexs | sm | md | lg | xlmd
shape'' | square | circle''
width'' | wide | full''
disabledbooleanfalse
state'' | active''
iconstring''
hrefstring''
typebutton | submit | resetbutton

Events

EventSourceNotes
clicknativePassed through from the rendered <button> or <a>.
focus / blurnativeUse normal DOM listeners on the custom element.
custom eventsnonestellar-button does not emit custom events.

Slots

SlotNotes
defaultButton label or icon content. Square and circle shapes are intended for compact icon content.

Notes

  • The public tag is `stellar-button`, backed by a real `<button>` by default and `<a>` when `href` is present.
  • The shipped API is `tone`, `appearance`, `size`, `shape`, `icon`, `width`, `state`, `href`, and `type`.
  • The docs page now uses Datastar controls to drive one live button instance instead of showing a static permutation matrix.
  • `stellar-button` uses `mode: 'open'`, so its styles stay encapsulated while still reading exported `stellar.css` variables through the shadow boundary.
  • The `icon` prop renders a built-in `stellar-icon` before the label, so common icon buttons do not need manual icon slot markup.
  • The visual baseline follows the shipped button sizing, tone, and appearance behavior without reintroducing the old parity surface.