Yamada UIにスターをあげる

スター
Yamada UIYamada UIv1.5.1

MultiSelect

MultiSelectは、ユーザーがオプションのリストから複数の値を選択するために使用されるコンポーネントです。

ソース@yamada-ui/select

Props

MultiSelectProps

boundary

説明

The boundary area for the popper. Used within the preventOverflow modifier.

タイプ

HTMLElement | "clippingParents" | "scrollParent"

デフォルト

'clippingParents'

clearIconProps

説明

Props for multi select clear icon element.

タイプ

SelectIconProps

closeDelay

説明

The number of delay time to close.

タイプ

number

デフォルト

200

closeOnBlur

説明

If true, the popover will close when you blur out it by clicking outside or tabbing out.

タイプ

boolean

デフォルト

true

closeOnEsc

説明

If true, the popover will close when you hit the Esc key.

タイプ

boolean

デフォルト

true

closeOnSelect

説明

If true, the list element will be closed when value is selected.

タイプ

boolean

デフォルト

true

colorScheme

説明

The visual color appearance of the component.

タイプ

"whiteAlpha" | "blackAlpha" | "gray" | "neutral" | "red" | "danger" | "rose" | "pink" | "flashy" | "orange" | "warning" | "amber" | "yellow" | "lime" | "green" | "success" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "primary" | "info" | "link" | "indigo" | "violet" | "secondary" | "purple" | "fuchsia"

component

説明

The custom display value to use.

タイプ

FC<{ value: string | number label: string index: number onRemove: MouseEventHandler<HTMLElement> }>

containerProps

説明

Props for multi select container element.

タイプ

Omit<HTMLUIProps<"div">, "children">

defaultIsOpen

説明

If true, the popover will be initially opened.

タイプ

boolean

defaultValue

説明

The initial value of the select.

タイプ

string[]

duration

説明

The animation duration.

タイプ

number | Partial<Record<"enter" | "exit", number>>

errorBorderColor

説明

The border color when the input is invalid.

タイプ

string

eventListeners

説明

If provided, determines whether the popper will reposition itself on scroll and resize of the window.

タイプ

type ONLY_FOR_FORMAT = | boolean | { scroll?: boolean | undefined; resize?: boolean | undefined }

デフォルト

true

fieldProps

説明

Props for multi select field element.

タイプ

Omit<MultiSelectFieldProps, "children">

flip

説明

If true, the popper will change its placement and flip when it's about to overflow its boundary area.

タイプ

boolean

デフォルト

true

focusBorderColor

説明

The border color when the input is focused.

タイプ

string

gutter

説明

The distance or margin between the reference and popper. It is used internally to create an offset modifier.

タイプ

UIValue<number>

デフォルト

8

header

説明

The header of the multi select content element.

タイプ

string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | FC<...>

iconProps

説明

Props for multi select icon element.

タイプ

SelectIconProps

isClearable

説明

If true, display the multi select clear icon.

タイプ

boolean

デフォルト

true

isDisabled

説明

If true, the form control will be disabled.

タイプ

boolean

デフォルト

false

isInvalid

説明

If true, the form control will be invalid.

タイプ

boolean

デフォルト

false

isLazy

説明

If true, the PopoverContent rendering will be deferred until the popover is open.

タイプ

boolean

デフォルト

false

isOpen

説明

If true, the popover will be opened.

タイプ

boolean

isReadOnly

説明

If true, the form control will be readonly.

タイプ

boolean

デフォルト

false

isRequired

説明

If true, the form control will be required.

タイプ

boolean

デフォルト

false

items

説明

If provided, generate options based on items.

タイプ

SelectItem[]

lazyBehavior

説明

The lazy behavior of popover's content when not visible. Only works when isLazy={true} - unmount: The popover's content is always unmounted when not open. - keepMounted: The popover's content initially unmounted, but stays mounted when popover is open.

タイプ

LazyMode

デフォルト

'unmount'

listProps

説明

Props for multi select list element.

タイプ

Omit<SelectListProps, "children">

matchWidth

説明

If true, the popper will match the width of the reference at all times. It's useful for autocomplete, date-picker and select patterns.

タイプ

boolean

デフォルト

false

maxSelectValues

説明

The maximum selectable value.

タイプ

number

modifiers

説明

Array of popper.js modifiers. Check the docs to see the list of possible modifiers you can pass.

タイプ

Partial<Modifier<string, any>>[]

ドキュメント

https://popper.js.org/docs/v2/modifiers/

name

説明

The HTML name attribute used for forms.

タイプ

string

offset

説明

The main and cross-axis offset to displace popper element from its reference element.

タイプ

[number, number]

omitSelectedValues

説明

If true, the selected item(s) will be excluded from the list.

タイプ

boolean

デフォルト

false

onChange

説明

The callback invoked when value state changes.

タイプ

(value: string[]) => void

onClose

説明

Callback fired when the popover closes.

タイプ

() => void

onOpen

説明

Callback fired when the popover opens.

タイプ

() => void

openDelay

説明

The number of delay time to open.

タイプ

number

デフォルト

200

optionProps

説明

Props for select option element.

タイプ

Omit<OptionProps, "children" | "value">

placeholder

説明

The placeholder of the select.

タイプ

string

placement

説明

The placement of the popper relative to its reference.

タイプ

UIValue<Placement>

デフォルト

'bottom'

portalProps

説明

Props to be forwarded to the portal component.

タイプ

Omit<PortalProps, "children">

デフォルト

'{ isDisabled: true }'

preventOverflow

説明

If true, will prevent the popper from being cut off and ensure it's visible within the boundary area.

タイプ

boolean

デフォルト

true

separator

説明

The visual separator between each value.

タイプ

string

デフォルト

','

size

説明

The size of the MultiSelect.

タイプ

"xs" | "sm" | "md" | "lg"

デフォルト

md

strategy

説明

The CSS positioning strategy to use.

タイプ

"fixed" | "absolute"

デフォルト

'absolute'

value

説明

The value of the select.

タイプ

string[]

variant

説明

The variant of the MultiSelect.

タイプ

"outline" | "filled" | "flushed" | "unstyled"

デフォルト

outline

GitHubでこのページを編集する

SelectNativeSelect