SwitchProps

Properties

Link copied to clipboard
abstract var about: String?
Link copied to clipboard
abstract var accessKey: String?
Link copied to clipboard
abstract var action: Ref<ButtonBaseActions>?

A ref for imperative actions. It currently only supports focusVisible() action.

Link copied to clipboard
Link copied to clipboard
abstract var ariaAtomic: Boolean?
Link copied to clipboard
Link copied to clipboard
abstract var ariaBrailleLabel: String?
Link copied to clipboard
Link copied to clipboard
abstract var ariaBusy: Boolean?
Link copied to clipboard
abstract var ariaChecked: AriaChecked?
Link copied to clipboard
abstract var ariaColCount: Int?
Link copied to clipboard
abstract var ariaColIndex: Int?
Link copied to clipboard
abstract var ariaColIndexText: String?
Link copied to clipboard
abstract var ariaColSpan: Int?
Link copied to clipboard
abstract var ariaControls: String?
Link copied to clipboard
abstract var ariaCurrent: AriaCurrent?
Link copied to clipboard
abstract var ariaDescribedBy: String?
Link copied to clipboard
abstract var ariaDescription: String?
Link copied to clipboard
abstract var ariaDetails: String?
Link copied to clipboard
abstract var ariaDisabled: Boolean?
Link copied to clipboard
Link copied to clipboard
abstract var ariaErrorMessage: String?
Link copied to clipboard
abstract var ariaExpanded: Boolean?
Link copied to clipboard
abstract var ariaFlowTo: String?
Link copied to clipboard
abstract var ariaGrabbed: Boolean?
Link copied to clipboard
abstract var ariaHasPopup: AriaHasPopup?
Link copied to clipboard
abstract var ariaHidden: Boolean?
Link copied to clipboard
abstract var ariaInvalid: AriaInvalid?
Link copied to clipboard
abstract var ariaKeyShortcuts: String?
Link copied to clipboard
abstract var ariaLabel: String?
Link copied to clipboard
abstract var ariaLabelledBy: String?
Link copied to clipboard
abstract var ariaLevel: Int?
Link copied to clipboard
abstract var ariaLive: AriaLive?
Link copied to clipboard
abstract var ariaModal: Boolean?
Link copied to clipboard
abstract var ariaMultiline: Boolean?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract var ariaOwns: String?
Link copied to clipboard
abstract var ariaPlaceholder: String?
Link copied to clipboard
abstract var ariaPosInSet: Int?
Link copied to clipboard
abstract var ariaPressed: AriaPressed?
Link copied to clipboard
abstract var ariaReadOnly: Boolean?
Link copied to clipboard
abstract var ariaRelevant: AriaRelevant?
Link copied to clipboard
abstract var ariaRequired: Boolean?
Link copied to clipboard
Link copied to clipboard
abstract var ariaRowCount: Int?
Link copied to clipboard
abstract var ariaRowIndex: Int?
Link copied to clipboard
abstract var ariaRowIndexText: String?
Link copied to clipboard
abstract var ariaRowSpan: Int?
Link copied to clipboard
abstract var ariaSelected: Boolean?
Link copied to clipboard
abstract var ariaSetSize: Int?
Link copied to clipboard
abstract var ariaSort: AriaSort?
Link copied to clipboard
abstract var ariaValueMax: Double?
Link copied to clipboard
abstract var ariaValueMin: Double?
Link copied to clipboard
abstract var ariaValueNow: Double?
Link copied to clipboard
abstract var ariaValueText: String?
Link copied to clipboard
Link copied to clipboard
abstract var autoCorrect: String?
Link copied to clipboard
abstract override var autoFocus: Boolean?
Link copied to clipboard
abstract var autoSave: String?
Link copied to clipboard
abstract var centerRipple: Boolean?

If true, the ripples are centered. They won't start at the cursor interaction position.

Link copied to clipboard
abstract var checked: Boolean?

If true, the component is checked.

Link copied to clipboard
abstract override var checkedIcon: ReactNode?

The icon to display when the component is checked.

Link copied to clipboard
abstract override var children: ReactNode?

The content of the component.

Link copied to clipboard
abstract override var classes: SwitchClasses?

Override or extend the styles applied to the component.

Link copied to clipboard
abstract var className: ClassName?
Link copied to clipboard
abstract var color: SwitchColor?

The color of the component. It supports both default and custom theme colors, which can be added as shown in the palette customization guide.

Link copied to clipboard
abstract var component: ElementType<*>?
Link copied to clipboard
abstract var content: String?
Link copied to clipboard
abstract var contentEditable: Any?
Link copied to clipboard
abstract var contextMenu: String?
Link copied to clipboard
abstract var datatype: String?
Link copied to clipboard
abstract override var defaultChecked: Boolean?

The default checked state. Use when the component is not controlled.

Link copied to clipboard
abstract var defaultValue: Any?
Link copied to clipboard
abstract var dir: String?
Link copied to clipboard
abstract override var disabled: Boolean?

If true, the component is disabled.

Link copied to clipboard

If true, the keyboard focus ripple is disabled.

Link copied to clipboard
abstract override var disableRipple: Boolean?

If true, the ripple effect is disabled.

Link copied to clipboard

If true, the touch ripple effect is disabled.

Link copied to clipboard
abstract var draggable: Boolean?
Link copied to clipboard
abstract var edge: SwitchBaseEdge?

If given, uses a negative margin to counteract the padding on one side (this is often helpful for aligning the left or right side of the icon with content above or below, without ruining the border size and shape).

Link copied to clipboard
abstract var enterKeyHint: EnterKeyHint?
Link copied to clipboard
abstract var focusRipple: Boolean?

If true, the base button will have a keyboard focus ripple.

Link copied to clipboard

This prop can help identify which element has keyboard focus. The class name will be applied when the element gains the focus through keyboard interaction. It's a polyfill for the CSS :focus-visible selector. The rationale for using this feature is explained here. A polyfill can be used to apply a focus-visible class to other components if needed.

Link copied to clipboard
abstract var form: String?
Link copied to clipboard
abstract var formAction: FormAction?
Link copied to clipboard
abstract var formEncType: FormEncType?
Link copied to clipboard
abstract var formMethod: FormMethod?
Link copied to clipboard
abstract var formNoValidate: Boolean?
Link copied to clipboard
abstract var formTarget: WindowName?
Link copied to clipboard
abstract var hidden: Boolean?
Link copied to clipboard
abstract override var icon: ReactNode?

The icon to display when the component is unchecked.

Link copied to clipboard
abstract override var id: String?

The id of the input element.

Link copied to clipboard
abstract var inlist: Any?
Link copied to clipboard
abstract var inputMode: InputMode?
Link copied to clipboard

Attributes applied to the input element.

Link copied to clipboard
abstract var inputRef: Ref<*>?

Pass a ref to the input element.

Link copied to clipboard
abstract var is: String?
Link copied to clipboard
abstract var itemID: String?
Link copied to clipboard
abstract var itemProp: String?
Link copied to clipboard
abstract var itemRef: String?
Link copied to clipboard
abstract var itemScope: Boolean?
Link copied to clipboard
abstract var itemType: String?
Link copied to clipboard
abstract var key: Key?
Link copied to clipboard
abstract var lang: String?
Link copied to clipboard
abstract var LinkComponent: ElementType<*>?

The component used to render a link when the href prop is provided.

Link copied to clipboard
abstract override var name: String?

Name attribute of the input element.

Link copied to clipboard
abstract var nonce: String?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract var onChange: (event: ChangeEvent<HTMLInputElement>, checked: Boolean) -> Unit?

Callback fired when the state is changed.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Callback fired when the component is focused with a keyboard. We trigger a onFocus callback too.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract var prefix: String?
Link copied to clipboard
abstract var property: String?
Link copied to clipboard
abstract var radioGroup: String?
Link copied to clipboard
abstract var readOnly: Boolean?
Link copied to clipboard
abstract var ref: Ref<HTMLButtonElement>?
Link copied to clipboard
abstract var rel: String?
Link copied to clipboard
abstract var required: Boolean?

If true, the input element is required.

Link copied to clipboard
abstract var resource: String?
Link copied to clipboard
abstract var results: String?
Link copied to clipboard
abstract var rev: String?
Link copied to clipboard
abstract var role: AriaRole?
Link copied to clipboard
abstract var security: String?
Link copied to clipboard
abstract var size: BaseSize?

The size of the component. small is equivalent to the dense switch styling.

Link copied to clipboard
abstract var slot: String?
Link copied to clipboard
abstract var spellCheck: Boolean?
Link copied to clipboard
abstract var style: CSSProperties?
Link copied to clipboard
Link copied to clipboard
abstract override var sx: SxProps<Theme>?

The system prop that allows defining system overrides as well as additional CSS styles.

Link copied to clipboard
abstract override var tabIndex: Int?
Link copied to clipboard
abstract var title: String?
Link copied to clipboard
abstract var TouchRippleProps: dynamic

Props applied to the TouchRipple element.

Link copied to clipboard

A ref that points to the TouchRipple element.

Link copied to clipboard
abstract var translate: Translate?
Link copied to clipboard
abstract override var type: InputType?
Link copied to clipboard
abstract var typeof: String?
Link copied to clipboard
abstract var unselectable: Unselectable?
Link copied to clipboard
abstract override var value: Any?

The value of the component. The DOM API casts this to a string. The browser uses "on" as the default value.

Link copied to clipboard
abstract var vocab: String?

Functions

Link copied to clipboard
open inline fun <P : Props> child(type: ElementType<P>, props: P)
Link copied to clipboard
open inline operator fun <P : Props> ElementType<P>.invoke()
open inline operator fun <P : Props> ElementType<P>.invoke(noinline block: P.() -> Unit)
open inline operator fun <T> Provider<T>.invoke(value: T, noinline block: ChildrenBuilder.() -> Unit)
Link copied to clipboard
open inline operator fun Char.unaryPlus()
open inline operator fun String?.unaryPlus()
open inline operator fun ReactNode?.unaryPlus()
open inline operator fun Props?.unaryPlus()