UNPKG

common-intellisense

Version:
255 lines (254 loc) 8.15 kB
{ "props": [ { "Attribute": "children", "Type": "`ReactNode[]`", "Description": "The children to render. Usually a list of `SelectItem` and `SelectSection` elements.", "Default": "-" }, { "Attribute": "items", "Type": "[`Iterable<T>`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols)", "Description": "Item objects in the select. (dynamic)", "Default": "-" }, { "Attribute": "selectionMode", "Type": "`single` | `multiple`", "Description": "The type of selection that is allowed in the collection.", "Default": "-" }, { "Attribute": "selectedKeys", "Type": "`all` | `React.Key[]`", "Description": "The currently selected keys in the collection (controlled).", "Default": "-" }, { "Attribute": "disabledKeys", "Type": "`all` | `React.Key[]`", "Description": "The item keys that are disabled. These items cannot be selected, focused, or otherwise interacted with.", "Default": "-" }, { "Attribute": "defaultSelectedKeys", "Type": "`all` | `React.Key[]`", "Description": "The initial selected keys in the collection (uncontrolled).", "Default": "-" }, { "Attribute": "variant", "Type": "`flat` | `bordered` | `faded` | `underlined`", "Description": "The variant of the select.", "Default": "`flat`" }, { "Attribute": "color", "Type": "`default` | `primary` | `secondary` | `success` | `warning` | `danger`", "Description": "The color of the select.", "Default": "`default`" }, { "Attribute": "size", "Type": "`sm` | `md` | `lg`", "Description": "The size of the select.", "Default": "`md`" }, { "Attribute": "radius", "Type": "`none` | `sm` | `md` | `lg` | `full`", "Description": "The radius of the select.", "Default": "-" }, { "Attribute": "placeholder", "Type": "`string`", "Description": "The placeholder of the select.", "Default": "`Select an option`" }, { "Attribute": "labelPlacement", "Type": "`inside` | `outside` | `outside-left`", "Description": "The position of the label.", "Default": "`inside`" }, { "Attribute": "label", "Type": "`ReactNode`", "Description": "The content to display as the label.", "Default": "-" }, { "Attribute": "description", "Type": "`ReactNode`", "Description": "A description for the select. Provides a hint such as specific requirements for what to choose.", "Default": "-" }, { "Attribute": "errorMessage", "Type": "`ReactNode`", "Description": "An error message for the select.", "Default": "-" }, { "Attribute": "startContent", "Type": "`ReactNode`", "Description": "Element to be rendered in the left side of the select.", "Default": "-" }, { "Attribute": "endContent", "Type": "`ReactNode`", "Description": "Element to be rendered in the right side of the select.", "Default": "-" }, { "Attribute": "selectorIcon", "Type": "`ReactNode`", "Description": "Element to be rendered as the selector icon.", "Default": "-" }, { "Attribute": "scrollRef", "Type": "`React.RefObject<HTMLElement>`", "Description": "A ref to the scrollable element.", "Default": "-" }, { "Attribute": "spinnerRef", "Type": "`React.RefObject<HTMLElement>`", "Description": "A ref to the spinner element.", "Default": "-" }, { "Attribute": "fullWidth", "Type": "`boolean`", "Description": "Whether the select should take up the width of its parent.", "Default": "`true`" }, { "Attribute": "isOpen", "Type": "`boolean`", "Description": "Whether the select is open by default (controlled).", "Default": "-" }, { "Attribute": "defaultOpen", "Type": "`boolean`", "Description": "Whether the select is open by default (uncontrolled).", "Default": "-" }, { "Attribute": "isRequired", "Type": "`boolean`", "Description": "Whether user select is required on the select before form submission.", "Default": "`false`" }, { "Attribute": "isDisabled", "Type": "`boolean`", "Description": "Whether the select is disabled.", "Default": "`false`" }, { "Attribute": "isMultiline", "Type": "`boolean`", "Description": "Whether the select should allow multiple lines of text.", "Default": "`false`" }, { "Attribute": "isInvalid", "Type": "`boolean`", "Description": "Whether the select is invalid.", "Default": "`false`" }, { "Attribute": "validationState", "Type": "`valid` | `invalid`", "Description": "Whether the select should display its \"valid\" or \"invalid\" visual styling. (**Deprecated**) use **isInvalid** instead.", "Default": "-" }, { "Attribute": "showScrollIndicators", "Type": "`boolean`", "Description": "Whether the select should show scroll indicators when the listbox is scrollable.", "Default": "`true`" }, { "Attribute": "autoFocus", "Type": "`boolean`", "Description": "Whether the select should be focused on the first mount.", "Default": "`false`" }, { "Attribute": "disallowEmptySelection", "Type": "`boolean`", "Description": "Whether the collection allows empty selection.", "Default": "`false`" }, { "Attribute": "disableAnimation", "Type": "`boolean`", "Description": "Whether the select should be animated.", "Default": "`true`" }, { "Attribute": "disableSelectionIconRotation", "Type": "`boolean`", "Description": "Whether the select should disable the rotation of the selector icon.", "Default": "`false`" }, { "Attribute": "popoverProps", "Type": "[PopoverProps](/docs/components/popover#api)", "Description": "Props to be passed to the popover component.", "Default": "-" }, { "Attribute": "listboxProps", "Type": "[ListboxProps](/docs/components/listbox#api)", "Description": "Props to be passed to the listbox component.", "Default": "-" }, { "Attribute": "scrollShadowProps", "Type": "[ScrollShadowProps](/docs/components/scroll-shadow#api)", "Description": "Props to be passed to the scroll shadow component.", "Default": "-" }, { "Attribute": "classNames", "Type": "`Record<\"base\"\"label\"\"trigger\"\"mainWrapper\"\"innerWrapper\"\"selectorIcon\"\"value\"\"listboxWrapper\"\"listbox\"\"popover\"\"helperWrapper\"\"description\"\"errorMessage\", string>`", "Description": "Allows to set custom class names for the dropdown item slots.", "Default": "-" } ], "link": "https://nextui.org/docs/components/select", "events": [ { "Attribute": "onClose", "Type": "`() => void`", "Description": "Callback fired when the select popover is closed." }, { "Attribute": "onOpenChange", "Type": "`(isOpen: boolean) => void`", "Description": "Callback fired when the select popover is opened or closed." }, { "Attribute": "onSelectionChange", "Type": "`(keys: React.Key[]) => void`", "Description": "Callback fired when the selected keys change." }, { "Attribute": "onChange", "Type": "`React.ChangeEvent<HTMLSelectElement>`", "Description": "Native select change event, fired when the selected value changes." }, { "Attribute": "renderValue", "Type": "[RenderValueFunction](#render-value-function)", "Description": "Function to render the value of the select. It renders the selected item by default." } ] }