Accessibility
Switch from @prepared911/ui-core is a Radix switch rendered with a visible label. The primitive handles the switch role, keyboard toggling, and state; your job is to keep the label stable, make on/off readable beyond color, and explain read-only states.
role="switch" with aria-checked.htmlFor + id.role="switch" already announces on/off.role="switch" with aria-checked="true" or "false".aria-describedby when helper text is present.Because a switch represents a persistent setting, announce state changes as naturally as the OS does. If toggling the switch triggers a visible status message ("Notifications enabled"), use a polite live region so the confirmation is not announced twice.
SwitchVisual is a non-interactive, always aria-hidden paint of the switch. It must not carry selection semantics alone—the parent widget owns aria-checked (for example MenuItemSwitch as menuitemcheckbox). Do not use it as a standalone toggle. For the full menu pattern (one interactive widget per row, decorative indicators), see Interactive MenuItem children.