StellarUI

<stellar-toggle-icon>

Checkbox-like icon toggle with animated checked transitions, including rotate, fade, flip, and translate effects.

Properties

Preview

Reaction toggle

Icon-first state button

Accessible label

Markup

Copy
<stellar-toggle-icon label="Save item"></stellar-toggle-icon>

API

Complete props, events, slots, and implementation notes for the shipped toggle-icon.

Props

PropTypeDefaultNotes
labelstring''
checked-iconstring''
checkedbooleanfalse
disabledbooleanfalse
unchecked-iconstring''
sizexs | sm | md | lg | xlmd
effectfade | scale | flip-x | flip-y | translate-x | translate-y | rotate | nonenone

Events

EventSourceNotes
clicknativeBubbles from the internal button when the control is activated.
input / changestellar-toggle-iconEmitted after a user toggle changes checked.

Slots

SlotNotes
uncheckedOptional markup for the unchecked face. Overrides unchecked-icon.
checkedOptional markup for the checked face. Overrides checked-icon.

Notes

  • The public tag is `stellar-toggle-icon`, matching the shipped icon-toggle boundary rather than a button utility or checkbox skin.
  • `checked` is the mutable state surface. User toggles emit `input` and `change`, so docs and app state can round-trip the live value.
  • The internal control is a toggle button with `aria-pressed`, not a decorative icon wrapper. Supply a `label` whenever the visible icon alone is not enough for assistive tech.
  • Use `unchecked-icon` and `checked-icon` for common icon swaps. Use the `unchecked` and `checked` slots when you need custom icon markup instead of a simple name.