API reference
components/switch
Import
Section titled “Import”import * as api from "@fungi.computer/caps/components/switch";Exports
Section titled “Exports”| Kind | Export | Description |
|---|---|---|
| type alias | SwitchProps | Props accepted by Switch. |
| constant | Switch | A switch primitive with caller-owned checked state. |
SwitchPropstype alias
Section titled “SwitchProps”type SwitchProps = object & Omit<InputHTMLAttributes<HTMLInputElement>, "defaultValue" | "type">;Props accepted by Switch.
Type Declaration
Section titled “Type Declaration”| Name | Type | Description |
|---|---|---|
onCheckedChange()? |
(checked) => void |
Called after the checked state changes. |
Switchconstant
Section titled “Switch”const Switch: ForwardRefExoticComponent< object & Omit<InputHTMLAttributes<HTMLInputElement>, "defaultValue" | "type"> & RefAttributes<HTMLInputElement>>;A switch primitive with caller-owned checked state.