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 UnreviewedclassAdds CSS classes to the root element and preserves its existing classes.
Optional UnreviewedstyleInline CSS styles on the root element.
Optional UnreviewedchildrenContent to render in place of any default content.
Optional UnreviewedidHTML id attribute.
Optional UnreviewedtitleHTML title attribute, shown as a browser tooltip on hover.
Optional UnreviewedslotNamed slot in a parent web component, such as slot="header" in 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.