Do you like balloons?
<orb-toggle checked>Do you like balloons?</orb-toggle>

Properties

checked

Description Whether or not the toggle is active
Attribute checked
Type boolean
Default false

defaultChecked

Description Original value form will reset to
Attribute default-checked
Type boolean
Default undefined

labelPlacement

Description If the label should be placed at the start or end of the toggle
Attribute label-placement
Type "end" | "start"
Default "end"

ready

Description A promise that resolves when the component has completed it’s initial render
Attribute –
Type Promise<unknown>
Default new Promise((res) => (this.#resolve = res))

Events

orbCheckedChange

Description Emits the new value whenever toggle is clicked
Type CustomEvent<boolean>

Custom States

State Initial Value Description
:state(off) true
:state(on) false

Dependencies

Used by

Graph

graph TD; orb-calendar --> orb-toggle style orb-toggle fill:#f9f,stroke:#333,stroke-width:4px