Optional
aboutOptional
accessOptional
actionOptional
aria-Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.
Optional
aria-Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.
Optional
aria-Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be presented if they are made.
Optional
aria-Defines a string value that labels the current element, which is intended to be converted into Braille.
Optional
aria-Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille.
Optional
aria-Optional
aria-Indicates the current "checked" state of checkboxes, radio buttons, and other widgets.
Optional
aria-Defines the total number of columns in a table, grid, or treegrid.
Optional
aria-Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.
Optional
aria-Defines a human readable text alternative of aria-colindex.
Optional
aria-Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.
Optional
aria-Identifies the element (or elements) whose contents or presence are controlled by the current element.
Optional
aria-Indicates the element that represents the current item within a container or set of related elements.
Optional
aria-Identifies the element (or elements) that describes the object.
Optional
aria-Defines a string value that describes or annotates the current element.
Optional
aria-Identifies the element that provides a detailed, extended description for the object.
Optional
aria-Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.
Optional
aria-Indicates what functions can be performed when a dragged object is released on the drop target.
Optional
aria-Identifies the element that provides an error message for the object.
Optional
aria-Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.
Optional
aria-Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order.
Optional
aria-Indicates an element's "grabbed" state in a drag-and-drop operation.
Optional
aria-Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.
Optional
aria-Indicates whether the element is exposed to an accessibility API.
Optional
aria-Indicates the entered value does not conform to the format expected by the application.
Optional
aria-Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.
Optional
aria-Defines a string value that labels the current element.
Optional
aria-Identifies the element (or elements) that labels the current element.
Optional
aria-Defines the hierarchical level of an element within a structure.
Optional
aria-Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.
Optional
aria-Indicates whether an element is modal when displayed.
Optional
aria-Indicates whether a text box accepts multiple lines of input or only a single line.
Optional
aria-Indicates that the user may select more than one item from the current selectable descendants.
Optional
aria-Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.
Optional
aria-Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship between DOM elements where the DOM hierarchy cannot be used to represent the relationship.
Optional
aria-Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. A hint could be a sample value or a brief description of the expected format.
Optional
aria-Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.
Optional
aria-Indicates the current "pressed" state of toggle buttons.
Optional
aria-Indicates that the element is not editable, but is otherwise operable.
Optional
aria-Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.
Optional
aria-Indicates that user input is required on the element before a form may be submitted.
Optional
aria-Defines a human-readable, author-localized description for the role of an element.
Optional
aria-Defines the total number of rows in a table, grid, or treegrid.
Optional
aria-Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.
Optional
aria-Defines a human readable text alternative of aria-rowindex.
Optional
aria-Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.
Optional
aria-Indicates the current "selected" state of various widgets.
Optional
aria-Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.
Optional
aria-Indicates if items in a table or grid are sorted in ascending or descending order.
Optional
aria-Defines the maximum allowed value for a range widget.
Optional
aria-Defines the minimum allowed value for a range widget.
Optional
aria-Defines the current value for a range widget.
Optional
aria-Defines the human readable text alternative of aria-valuenow for a range widget.
Optional
autoOptional
autoOptional
autoOptional
autoOptional
centerIf true
, the ripples are centered.
They won't start at the cursor interaction position.
Optional
checkedIf true, the component is checked.
Optional
checkedThe icon to display when the component is checked.
Optional
classesOverride or extend the styles applied to the component.
Optional
classOptional CSS class name.
Optional
colorThe color of the component. It supports both default and custom theme colors, which can be added as shown in the palette customization guide.
Optional
componentOptional
contentOptional
contentOptional
contextOptional
customUsed for testing. Clickable and requested subcomponents will be suffixed with "-[ComponentName]".
Optional
dangerouslyOptional
datatypeOptional
defaultThe default checked state. Use when the component is not controlled.
Optional
defaultOptional
dirOptional
disabledIf true, the component is disabled.
Optional
disableIf true
, the keyboard focus ripple is disabled.
Optional
disableIf true
, the ripple effect is disabled.
Optional
disableIf true
, the touch ripple effect is disabled.
Optional
draggableOptional
edgeIf 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).
Optional
enterOptional
focusIf true
, the base button will have a keyboard focus ripple.
Optional
focusThis 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.
Optional
formOptional
formOptional
formOptional
formOptional
formOptional
formOptional
hiddenOptional
iconThe icon to display when the component is unchecked.
Optional
idThe id of the input
element.
Optional
inertOptional
inlistOptional
inputHints at the type of data that might be entered by the user while editing the element or its contents
Optional
inputAdditional input properties to be applied to the switch element.
Optional
inputPass a ref to the input
element.
Optional
isSpecify that a standard HTML element should behave like a defined custom built-in element
Optional
isIf true, removes focus styling when the switch is part of a SwitchCard.
Optional
itemIDOptional
itemOptional
itemOptional
itemOptional
itemOptional
keyOptional
langOptional
LinkThe component used to render a link when the href
prop is provided.
Optional
listAdjusts the list offset for the switch component.
The name attribute of the switch. Used to distinguish elements when a form changes.
Optional
nonceOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onCallback fired when the switch is clicked.
Optional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onCallback fired when the component is focused with a keyboard.
We trigger a onFocus
callback too.
Optional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
popoverOptional
popoverOptional
popoverOptional
prefixOptional
propertyOptional
radioOptional
readOptional
refOptional
relOptional
requiredIf true
, the input
element is required.
Optional
resourceOptional
resultsOptional
revOptional
roleOptional
securityOptional
sizeThe size of the component.
small
is equivalent to the dense switch styling.
Optional
slotOptional
spellOptional
styleOptional
suppressOptional
suppressOptional
sxThe system prop that allows defining system overrides as well as additional CSS styles.
Optional
tabOptional
titleOptional
TouchProps applied to the TouchRipple
element.
Optional
touchA ref that points to the TouchRipple
element.
Optional
translateOptional
twSpecify styles using Tailwind CSS classes. This feature is currently experimental.
If style
prop is also specified, styles generated with tw
prop will be overridden.
Example:
tw='w-full h-full bg-blue-200'
tw='text-9xl'
tw='text-[80px]'
Optional
typeOptional
typeofOptional
unselectableOptional
valueThe value of the component. The DOM API casts this to a string. The browser uses "on" as the default value.
Optional
vocab
A ref for imperative actions. It currently only supports
focusVisible()
action.