UnreviewedAny data-* attribute is forwarded to the rendered element.
Any aria-* attribute is forwarded to the rendered element.
Optional UnreviewedlabelVisible, stable label for the setting. Use children for richer label content.
Optional UnreviewedhintSecondary text rendered under the label and exposed as the switch's accessible description. It does not become part of the accessible name.
Optional UnreviewedcheckedControlled checked value. In controlled mode, update this in onStateChange.
Optional UnrevieweddefaultInitial checked value for an uncontrolled switch.
Optional UnrevieweddisabledDisables interaction and removes the switch from the tab order.
Optional UnreviewedroundFully round the thumb and track. Pass a number (px) or CSS length string
for a custom track radius; the thumb radius is 3px smaller.
Optional UnreviewednameForm field name. A checked switch submits value under this name.
Optional UnreviewedvalueValue submitted while checked.
Optional UnreviewedtoneColor of the track and thumb. A tinted tone also colors the unchecked
track border and thumb; use toneScope="selected" to color only the checked track.
Optional UnreviewedtoneApply tone to every state, or only while checked so the unchecked track
and thumb stay neutral.
Optional UnreviewedsizeSize variant. small=26×16px, medium=30×18px, large=34×20px.
Optional UnreviewedlabelPut the visible label before or after the control. Grid layout changes only the visual order, preserving DOM/source order for assistive technologies.
Optional UnreviewedonFired before a user toggle applies. Call event.preventDefault() to veto an
uncontrolled change; controlled consumers accept by updating checked.
Optional UnreviewedonNative post-apply change event.
Optional UnreviewedonPost-apply callback with the new form-relevant value snapshot.
Optional UnreviewedclassCSS class on the component's root element (merged with the component's own
classes). Use it directly for layout and positioning — grid/flex placement,
margins, alignment — rather than wrapping the component in a <div>/<span>.
Optional UnreviewedstyleInline styles on the component's root element. Set layout/positioning here
(or via className) directly on the component instead of adding a wrapper.
Optional UnreviewedchildrenChild elements. When provided, replaces the component's default label/content.
Optional UnreviewedidHTML id attribute.
Optional UnreviewedtitleHTML title attribute — native browser tooltip on hover.
Optional UnreviewedslotAssigns the element to a named <slot> of a parent web component (e.g.
slot="header" inside a <Card>, slot="footer" inside a <Dialog>).
Optional UnreviewedtabTab order. Set to -1 to skip the element when tabbing.
Optional UnreviewedkeyReact/Preact reconciliation key when rendered inside a list. Consumed by the JSX runtime (not forwarded as a DOM attribute).
Common props for JSX component wrappers.