Skip to content
API reference

components/switch

Import
import * as api from "@fungi.computer/caps/components/switch";
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”
Signature
type SwitchProps = object &
Omit<InputHTMLAttributes<HTMLInputElement>, "defaultValue" | "type">;

Props accepted by Switch.

Name Type Description
onCheckedChange()? (checked) => void Called after the checked state changes.

Switchconstant

Section titled “Switch”
Signature
const Switch: ForwardRefExoticComponent<
object &
Omit<InputHTMLAttributes<HTMLInputElement>, "defaultValue" | "type"> &
RefAttributes<HTMLInputElement>
>;

A switch primitive with caller-owned checked state.