Option API
API reference docs for the React Option component. Learn about the props, CSS, and other APIs of this exported module.
Component demos
Import
import Option from '@mui/joy/Option';
// or
import { Option } from '@mui/joy';
Props of the native component are also available.
The color of the component. It supports those theme colors that make sense for this component.
To learn how to add your own colors, check out Themed components—Extend colors.
Type:'danger'
| 'neutral'
| 'primary'
| 'success'
| 'warning'
| string
A text representation of the option's content. Used for keyboard text navigation matching.
Type:element
| string
The system prop that allows defining system overrides as well as additional CSS styles.
See the `sx` page for more details.
Type:Array<func
| object
| bool>
| func
| object
The global variant to use.
To learn how to add your own variants, check out Themed components—Extend variants.
Type:'outlined'
| 'plain'
| 'soft'
| 'solid'
| string
To learn how to customize the slot, check out the Overriding component structure guide.
These class names are useful for styling with CSS. They are applied to the root slot when specific states are triggered.