StellarUI

<stellar-slide-activator>

Drag-to-confirm control with a unidirectional slide, progress events, and programmatic reset.

Properties

Preview

Reset Progress: 0% State: ready

Markup

Copy
<stellar-slide-activator
  label="Slide to activate"
  activated-label="Activated"
>
</stellar-slide-activator>

API

Complete props, events, slots, and implementation notes for the shipped slide-activator.

Props

PropTypeDefaultNotes
labelstring''Plain-text resting label. Use the label slot when the copy needs markup.
activated-labelstring''Plain-text label shown after activation. Falls back to the resting label when omitted.
activatedbooleanfalseReflects the locked activated state. Remove it programmatically to reset the control.
disabledbooleanfalseDisables dragging, keyboard activation, and focus.
attentionbooleanfalseAdds a subtle shimmer hint to the track until the control is activated or disabled.
thumb-iconstring"mdi:chevron-double-right"Icon name used for the resting thumb face when the thumb slot is empty.
activated-thumb-iconstring"mdi:check"Icon name used for the activated thumb face when the activated-thumb slot is empty.

Events

EventSourceNotes
before-activatestellar-slide-activatorCancellable event fired before the control locks into its activated state.
activatestellar-slide-activatorEmitted after activation succeeds.
before-deactivatestellar-slide-activatorCancellable event fired before programmatic reset.
deactivatestellar-slide-activatorEmitted after programmatic reset succeeds.
progressstellar-slide-activatorEmitted while the thumb moves. event.detail.percent is a number from 0 to 1.

Slots

SlotNotes
labelVisible resting-state label. Use this when the track label needs markup instead of plain text.
activated-labelVisible activated-state label. Use this when the success state needs different markup.
thumbOptional resting thumb markup. Overrides thumb-icon.
activated-thumbOptional activated thumb markup. Overrides activated-thumb-icon.

Notes

  • The public tag is `stellar-slide-activator`, matching the shipped drag-to-confirm boundary instead of collapsing it into a button variant.
  • Activation is intentionally one-way for users. They can drag or hold the matching key to activate, but reset is programmatic by setting `activated` back to false.
  • `progress` emits a `percent` value from `0` to `1` as the thumb moves, and the host exposes that same value through the read-only `--thumb-position` CSS variable.
  • Use `thumb-icon` and `activated-thumb-icon` for the simple icon-name path, or the `thumb` and `activated-thumb` slots when the thumb faces need custom markup.