Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.
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.
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.
Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.
Indicates the current "checked" state of checkboxes, radio buttons, and other widgets.
Defines the total number of columns in a table, grid, or treegrid.
Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.
Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.
Identifies the element (or elements) whose contents or presence are controlled by the current element.
Indicates the element that represents the current item within a container or set of related elements.
Identifies the element (or elements) that describes the object.
Identifies the element that provides a detailed, extended description for the object.
Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.
Indicates what functions can be performed when a dragged object is released on the drop target.
Identifies the element that provides an error message for the object.
Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.
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.
Indicates an element's "grabbed" state in a drag-and-drop operation.
Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.
Indicates whether the element is exposed to an accessibility API.
Indicates the entered value does not conform to the format expected by the application.
Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.
Defines a string value that labels the current element.
Identifies the element (or elements) that labels the current element.
Defines the hierarchical level of an element within a structure.
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.
Indicates whether an element is modal when displayed.
Indicates whether a text box accepts multiple lines of input or only a single line.
Indicates that the user may select more than one item from the current selectable descendants.
Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.
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.
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.
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.
Indicates the current "pressed" state of toggle buttons.
Indicates that the element is not editable, but is otherwise operable.
Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.
Indicates that user input is required on the element before a form may be submitted.
Defines a human-readable, author-localized description for the role of an element.
Defines the total number of rows in a table, grid, or treegrid.
Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.
Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.
Indicates the current "selected" state of various widgets.
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.
Indicates if items in a table or grid are sorted in ascending or descending order.
Defines the maximum allowed value for a range widget.
Defines the minimum allowed value for a range widget.
Defines the current value for a range widget.
Defines the human readable text alternative of aria-valuenow for a range widget.
Boolean if the select's listbox should not hide if the user resizes the browser while it is visible.
Boolean if the select's listbox should not hide if the user scrolls the page while it is visible.
Boolean if the form components should be using the dense
spec to reduce
the sizing slightly.
Boolean if the Select
's button display value should not attempt to
extract a leftAddon
from the current selected option to display.
Boolean if using the keyboard should not immediately trigger the onChange
callback. When this is enabled, the onChange
callback will only be called
if the user clicks an item or presses the enter or space key.
Boolean if the select is currently disabled.
An optional className to apply to the current display value within the
Select
's button component.
An optional style to apply to the current display value within the
Select
's button component.
Boolean if the text field should gain the error state and update the colors.
A function that will get the display value for the Select
field based on
the current selected option. The default behavior will be to return null if
an option is not currently selected so the placeholder text can be shown
instead. If there is an option selected, it will:
getOptionLabel
utilleftAddon
leftAddon
, use the TextIconSpacing
of
the label + the icon or avatar.The option to get a display label for
The key to use to extract a label from the option when it is an object
Boolean if a leftAddon
should be added with
TextIconSpacing
to the result.
A renderable node to display in a Select
field.
The default way to generate a "unique" id for each option within the listbox by concatenating the current index with a base id.
Note: The index will be incremented by 1 so the ids start from 1 instead of
0. This is so that it matches how paginated results work with aria-posinset
aria-setsize
.The base id of the listbox.
The current index of the option
a "unique" id for the option
A function that will get the label for an option. The default behavior is to
check if the option is an object. If it is, it'll use the labelKey
property
and fallback to the children
property. If it is anything else, the option
itself will be returned.
This is used in both the select's button element to show the current value as well as rendering each option within the listbox component.
The option that should be converted into a renderable label element.
The object key to use to extract the label from an option object.
a renderable label to display.
The default implementation of the getItemValue search option that will attempt to "stringify" any unknown item as a string.
The current item to transform
The key to use that should hold the value if the item is an object
the item as a string
The id for the select component. This is required for a11y and will be used to generate ids for the listbox and each option within the listbox.
Boolean if the component should be rendered inline with
display: inline-flex
instead of display: flex
.
Hints at the type of data that might be entered by the user while editing the element or its contents
Specify that a standard HTML element should behave like a defined custom built-in element
Boolean if the left children should be wrapped in the TextFieldAddon
component. This is enabled by default since this is normally the behavior
that is desired so that icons can be positioned correctly.
Boolean if the right children should be wrapped in the TextFieldAddon
component. This is enabled by default since this is normally the behavior
that is desired so that icons can be positioned correctly.
An optional floating label to use with the select.
An optional className to apply to the label element.
A key to use that extracts the display label for an option from the options
list. This will only be used if the option is an object and is passed to
the getOptionLabel
prop.
An optional style to apply to the label element.
An optional addon to apply to the left of the text field. This should normally be an icon. This element will not have pointer events so it can be "clicked through" to focus the text field instead.
An optional className to apply to the listbox.
An optional style to apply to the listbox.
The sizing behavior for the listbox. It will default to have the same width
as the select button, but it is also possible to either have the
min-width
be the width of the select button or just automatically
determine the width.
The sizing behavior will always ensure that the left and right bounds of the listbox appear within the viewport.
An optional name to provide for the listbox that will be provided with the
onChange
callback.
The list of options to display within the listbox.
An optional placeholder text to show while the select is unvalued and is
either currently focused or the label
prop was not provided.
Boolean if the portal should be used.
Used to add any additional fixed positioning behavior.
Boolean if the select should act as a read only select field which just allows for all the options to be visible when toggled open.
An optional icon to display to the right of the select. This should
normally be a dropdown icon to replace the native select's dropdown icon.
If this is set to null
, the native select's dropdown icon will be
displayed instead.
This defaults to the IconProvider
's dropdown icon from the
@react-md/icon
package.
Boolean if the component should gain flex: 1 1 auto;
which is useful for
full-width behavior within flex containers.
The current theme type.
The current underline direction.
The listbox is a controlled component, so you will need to provide the
current value and an onChange
handler. The value
must be a string and
should be one of the option's values when something has been selected. If
you want to have an "empty" select box to require the user to manually
select something to be considered valid, you can set this to the empty
string and it'll be considered "unvalued".
A key to use that extracts the value for the option from the options list.
This will only be used if the option is an object and will be passed to the
getOptionValue
prop.
A function to call for each option to check if it is currently disabled.
This is really just a convenience prop so that you don't need to modify the
options
yourself.
Generated using TypeDoc
The positioning configuration for how the listbox should be anchored to the select button.