Backstage
    Preparing search index...

    Interface SwitchProps

    interface SwitchProps {
        "aria-controls"?: string;
        "aria-describedby"?: string;
        "aria-details"?: string;
        "aria-label"?: string;
        "aria-labelledby"?: string;
        autoFocus?: boolean;
        children?: ChildrenOrFunction<SwitchRenderProps>;
        className?: ClassNameOrFunction<SwitchRenderProps>;
        defaultSelected?: boolean;
        dir?: string;
        excludeFromTabOrder?: boolean;
        form?: string;
        hidden?: boolean;
        id?: string;
        inert?: boolean;
        inputRef?: RefObject<HTMLInputElement | null>;
        isDisabled?: boolean;
        isReadOnly?: boolean;
        isSelected?: boolean;
        label?: string;
        lang?: string;
        name?: string;
        onAnimationEnd?: AnimationEventHandler<HTMLLabelElement>;
        onAnimationEndCapture?: AnimationEventHandler<HTMLLabelElement>;
        onAnimationIteration?: AnimationEventHandler<HTMLLabelElement>;
        onAnimationIterationCapture?: AnimationEventHandler<HTMLLabelElement>;
        onAnimationStart?: AnimationEventHandler<HTMLLabelElement>;
        onAnimationStartCapture?: AnimationEventHandler<HTMLLabelElement>;
        onAuxClick?: MouseEventHandler<HTMLLabelElement>;
        onAuxClickCapture?: MouseEventHandler<HTMLLabelElement>;
        onBlur?: (e: FocusEvent<Element>) => void;
        onChange?: (isSelected: boolean) => void;
        onClickCapture?: MouseEventHandler<HTMLLabelElement>;
        onContextMenu?: MouseEventHandler<HTMLLabelElement>;
        onContextMenuCapture?: MouseEventHandler<HTMLLabelElement>;
        onDoubleClick?: MouseEventHandler<HTMLLabelElement>;
        onDoubleClickCapture?: MouseEventHandler<HTMLLabelElement>;
        onFocus?: (e: FocusEvent<Element>) => void;
        onFocusChange?: (isFocused: boolean) => void;
        onGotPointerCapture?: PointerEventHandler<HTMLLabelElement>;
        onGotPointerCaptureCapture?: PointerEventHandler<HTMLLabelElement>;
        onHoverChange?: (isHovering: boolean) => void;
        onHoverEnd?: (e: HoverEvent) => void;
        onHoverStart?: (e: HoverEvent) => void;
        onKeyDown?: (e: KeyboardEvent) => void;
        onKeyUp?: (e: KeyboardEvent) => void;
        onLostPointerCapture?: PointerEventHandler<HTMLLabelElement>;
        onLostPointerCaptureCapture?: PointerEventHandler<HTMLLabelElement>;
        onMouseDown?: MouseEventHandler<HTMLLabelElement>;
        onMouseDownCapture?: MouseEventHandler<HTMLLabelElement>;
        onMouseEnter?: MouseEventHandler<HTMLLabelElement>;
        onMouseLeave?: MouseEventHandler<HTMLLabelElement>;
        onMouseMove?: MouseEventHandler<HTMLLabelElement>;
        onMouseMoveCapture?: MouseEventHandler<HTMLLabelElement>;
        onMouseOut?: MouseEventHandler<HTMLLabelElement>;
        onMouseOutCapture?: MouseEventHandler<HTMLLabelElement>;
        onMouseOver?: MouseEventHandler<HTMLLabelElement>;
        onMouseOverCapture?: MouseEventHandler<HTMLLabelElement>;
        onMouseUp?: MouseEventHandler<HTMLLabelElement>;
        onMouseUpCapture?: MouseEventHandler<HTMLLabelElement>;
        onPointerCancel?: PointerEventHandler<HTMLLabelElement>;
        onPointerCancelCapture?: PointerEventHandler<HTMLLabelElement>;
        onPointerDown?: PointerEventHandler<HTMLLabelElement>;
        onPointerDownCapture?: PointerEventHandler<HTMLLabelElement>;
        onPointerEnter?: PointerEventHandler<HTMLLabelElement>;
        onPointerLeave?: PointerEventHandler<HTMLLabelElement>;
        onPointerMove?: PointerEventHandler<HTMLLabelElement>;
        onPointerMoveCapture?: PointerEventHandler<HTMLLabelElement>;
        onPointerOut?: PointerEventHandler<HTMLLabelElement>;
        onPointerOutCapture?: PointerEventHandler<HTMLLabelElement>;
        onPointerOver?: PointerEventHandler<HTMLLabelElement>;
        onPointerOverCapture?: PointerEventHandler<HTMLLabelElement>;
        onPointerUp?: PointerEventHandler<HTMLLabelElement>;
        onPointerUpCapture?: PointerEventHandler<HTMLLabelElement>;
        onScroll?: UIEventHandler<HTMLLabelElement>;
        onScrollCapture?: UIEventHandler<HTMLLabelElement>;
        onTouchCancel?: TouchEventHandler<HTMLLabelElement>;
        onTouchCancelCapture?: TouchEventHandler<HTMLLabelElement>;
        onTouchEnd?: TouchEventHandler<HTMLLabelElement>;
        onTouchEndCapture?: TouchEventHandler<HTMLLabelElement>;
        onTouchMove?: TouchEventHandler<HTMLLabelElement>;
        onTouchMoveCapture?: TouchEventHandler<HTMLLabelElement>;
        onTouchStart?: TouchEventHandler<HTMLLabelElement>;
        onTouchStartCapture?: TouchEventHandler<HTMLLabelElement>;
        onTransitionCancel?: TransitionEventHandler<HTMLLabelElement>;
        onTransitionCancelCapture?: TransitionEventHandler<HTMLLabelElement>;
        onTransitionEnd?: TransitionEventHandler<HTMLLabelElement>;
        onTransitionEndCapture?: TransitionEventHandler<HTMLLabelElement>;
        onTransitionRun?: TransitionEventHandler<HTMLLabelElement>;
        onTransitionRunCapture?: TransitionEventHandler<HTMLLabelElement>;
        onTransitionStart?: TransitionEventHandler<HTMLLabelElement>;
        onTransitionStartCapture?: TransitionEventHandler<HTMLLabelElement>;
        onWheel?: WheelEventHandler<HTMLLabelElement>;
        onWheelCapture?: WheelEventHandler<HTMLLabelElement>;
        slot?: string | null;
        style?: StyleOrFunction<SwitchRenderProps>;
        translate?: "yes" | "no";
        value?: string;
    }

    Hierarchy

    • SwitchProps
      • SwitchProps
    Index

    Properties

    aria-controls? aria-describedby? aria-details? aria-label? aria-labelledby? autoFocus? children? className? defaultSelected? dir? excludeFromTabOrder? form? hidden? id? inert? inputRef? isDisabled? isReadOnly? isSelected? label? lang? name? onAnimationEnd? onAnimationEndCapture? onAnimationIteration? onAnimationIterationCapture? onAnimationStart? onAnimationStartCapture? onAuxClick? onAuxClickCapture? onBlur? onChange? onClickCapture? onContextMenu? onContextMenuCapture? onDoubleClick? onDoubleClickCapture? onFocus? onFocusChange? onGotPointerCapture? onGotPointerCaptureCapture? onHoverChange? onHoverEnd? onHoverStart? onKeyDown? onKeyUp? onLostPointerCapture? onLostPointerCaptureCapture? onMouseDown? onMouseDownCapture? onMouseEnter? onMouseLeave? onMouseMove? onMouseMoveCapture? onMouseOut? onMouseOutCapture? onMouseOver? onMouseOverCapture? onMouseUp? onMouseUpCapture? onPointerCancel? onPointerCancelCapture? onPointerDown? onPointerDownCapture? onPointerEnter? onPointerLeave? onPointerMove? onPointerMoveCapture? onPointerOut? onPointerOutCapture? onPointerOver? onPointerOverCapture? onPointerUp? onPointerUpCapture? onScroll? onScrollCapture? onTouchCancel? onTouchCancelCapture? onTouchEnd? onTouchEndCapture? onTouchMove? onTouchMoveCapture? onTouchStart? onTouchStartCapture? onTransitionCancel? onTransitionCancelCapture? onTransitionEnd? onTransitionEndCapture? onTransitionRun? onTransitionRunCapture? onTransitionStart? onTransitionStartCapture? onWheel? onWheelCapture? slot? style? translate? value?

    Properties

    "aria-controls"?: string

    Identifies the element (or elements) whose contents or presence are controlled by the current element.

    "aria-describedby"?: string

    Identifies the element (or elements) that describes the object.

    "aria-details"?: string

    Identifies the element (or elements) that provide a detailed, extended description for the object.

    "aria-label"?: string

    Defines a string value that labels the current element.

    "aria-labelledby"?: string

    Identifies the element (or elements) that labels the current element.

    autoFocus?: boolean

    Whether the element should receive focus on render.

    children?: ChildrenOrFunction<SwitchRenderProps>

    The children of the component. A function may be provided to alter the children based on component state.

    className?: ClassNameOrFunction<SwitchRenderProps>

    The CSS className for the element. A function may be provided to compute the class based on component state.

    defaultSelected?: boolean

    Whether the Switch should be selected (uncontrolled).

    dir?: string
    excludeFromTabOrder?: boolean

    Whether to exclude the element from the sequential tab order. If true, the element will not be focusable via the keyboard by tabbing. This should be avoided except in rare scenarios where an alternative means of accessing the element or its functionality via the keyboard is available.

    form?: string

    The <form> element to associate the input with. The value of this attribute must be the id of a <form> in the same document. See MDN.

    hidden?: boolean
    id?: string

    The element's unique identifier. See MDN.

    inert?: boolean
    inputRef?: RefObject<HTMLInputElement | null>

    A ref for the HTML input element.

    isDisabled?: boolean

    Whether the input is disabled.

    isReadOnly?: boolean

    Whether the input can be selected but not changed by the user.

    isSelected?: boolean

    Whether the Switch should be selected (controlled).

    label?: string

    The label of the switch

    lang?: string
    name?: string

    The name of the input element, used when submitting an HTML form. See MDN.

    onAnimationEnd?: AnimationEventHandler<HTMLLabelElement>
    onAnimationEndCapture?: AnimationEventHandler<HTMLLabelElement>
    onAnimationIteration?: AnimationEventHandler<HTMLLabelElement>
    onAnimationIterationCapture?: AnimationEventHandler<HTMLLabelElement>
    onAnimationStart?: AnimationEventHandler<HTMLLabelElement>
    onAnimationStartCapture?: AnimationEventHandler<HTMLLabelElement>
    onAuxClick?: MouseEventHandler<HTMLLabelElement>
    onAuxClickCapture?: MouseEventHandler<HTMLLabelElement>
    onBlur?: (e: FocusEvent<Element>) => void

    Handler that is called when the element loses focus.

    onChange?: (isSelected: boolean) => void

    Handler that is called when the Switch's selection state changes.

    onClickCapture?: MouseEventHandler<HTMLLabelElement>
    onContextMenu?: MouseEventHandler<HTMLLabelElement>
    onContextMenuCapture?: MouseEventHandler<HTMLLabelElement>
    onDoubleClick?: MouseEventHandler<HTMLLabelElement>
    onDoubleClickCapture?: MouseEventHandler<HTMLLabelElement>
    onFocus?: (e: FocusEvent<Element>) => void

    Handler that is called when the element receives focus.

    onFocusChange?: (isFocused: boolean) => void

    Handler that is called when the element's focus status changes.

    onGotPointerCapture?: PointerEventHandler<HTMLLabelElement>
    onGotPointerCaptureCapture?: PointerEventHandler<HTMLLabelElement>
    onHoverChange?: (isHovering: boolean) => void

    Handler that is called when the hover state changes.

    onHoverEnd?: (e: HoverEvent) => void

    Handler that is called when a hover interaction ends.

    onHoverStart?: (e: HoverEvent) => void

    Handler that is called when a hover interaction starts.

    onKeyDown?: (e: KeyboardEvent) => void

    Handler that is called when a key is pressed.

    onKeyUp?: (e: KeyboardEvent) => void

    Handler that is called when a key is released.

    onLostPointerCapture?: PointerEventHandler<HTMLLabelElement>
    onLostPointerCaptureCapture?: PointerEventHandler<HTMLLabelElement>
    onMouseDown?: MouseEventHandler<HTMLLabelElement>
    onMouseDownCapture?: MouseEventHandler<HTMLLabelElement>
    onMouseEnter?: MouseEventHandler<HTMLLabelElement>
    onMouseLeave?: MouseEventHandler<HTMLLabelElement>
    onMouseMove?: MouseEventHandler<HTMLLabelElement>
    onMouseMoveCapture?: MouseEventHandler<HTMLLabelElement>
    onMouseOut?: MouseEventHandler<HTMLLabelElement>
    onMouseOutCapture?: MouseEventHandler<HTMLLabelElement>
    onMouseOver?: MouseEventHandler<HTMLLabelElement>
    onMouseOverCapture?: MouseEventHandler<HTMLLabelElement>
    onMouseUp?: MouseEventHandler<HTMLLabelElement>
    onMouseUpCapture?: MouseEventHandler<HTMLLabelElement>
    onPointerCancel?: PointerEventHandler<HTMLLabelElement>
    onPointerCancelCapture?: PointerEventHandler<HTMLLabelElement>
    onPointerDown?: PointerEventHandler<HTMLLabelElement>
    onPointerDownCapture?: PointerEventHandler<HTMLLabelElement>
    onPointerEnter?: PointerEventHandler<HTMLLabelElement>
    onPointerLeave?: PointerEventHandler<HTMLLabelElement>
    onPointerMove?: PointerEventHandler<HTMLLabelElement>
    onPointerMoveCapture?: PointerEventHandler<HTMLLabelElement>
    onPointerOut?: PointerEventHandler<HTMLLabelElement>
    onPointerOutCapture?: PointerEventHandler<HTMLLabelElement>
    onPointerOver?: PointerEventHandler<HTMLLabelElement>
    onPointerOverCapture?: PointerEventHandler<HTMLLabelElement>
    onPointerUp?: PointerEventHandler<HTMLLabelElement>
    onPointerUpCapture?: PointerEventHandler<HTMLLabelElement>
    onScroll?: UIEventHandler<HTMLLabelElement>
    onScrollCapture?: UIEventHandler<HTMLLabelElement>
    onTouchCancel?: TouchEventHandler<HTMLLabelElement>
    onTouchCancelCapture?: TouchEventHandler<HTMLLabelElement>
    onTouchEnd?: TouchEventHandler<HTMLLabelElement>
    onTouchEndCapture?: TouchEventHandler<HTMLLabelElement>
    onTouchMove?: TouchEventHandler<HTMLLabelElement>
    onTouchMoveCapture?: TouchEventHandler<HTMLLabelElement>
    onTouchStart?: TouchEventHandler<HTMLLabelElement>
    onTouchStartCapture?: TouchEventHandler<HTMLLabelElement>
    onTransitionCancel?: TransitionEventHandler<HTMLLabelElement>
    onTransitionCancelCapture?: TransitionEventHandler<HTMLLabelElement>
    onTransitionEnd?: TransitionEventHandler<HTMLLabelElement>
    onTransitionEndCapture?: TransitionEventHandler<HTMLLabelElement>
    onTransitionRun?: TransitionEventHandler<HTMLLabelElement>
    onTransitionRunCapture?: TransitionEventHandler<HTMLLabelElement>
    onTransitionStart?: TransitionEventHandler<HTMLLabelElement>
    onTransitionStartCapture?: TransitionEventHandler<HTMLLabelElement>
    onWheel?: WheelEventHandler<HTMLLabelElement>
    onWheelCapture?: WheelEventHandler<HTMLLabelElement>
    slot?: string | null

    A slot name for the component. Slots allow the component to receive props from a parent component. An explicit null value indicates that the local props completely override all props received from a parent.

    style?: StyleOrFunction<SwitchRenderProps>

    The inline style for the element. A function may be provided to compute the style based on component state.

    translate?: "yes" | "no"
    value?: string

    The value of the input element, used when submitting an HTML form. See MDN.