Select

Form & Input
stable

Dropdown selection control with single/multiple mode, chip display, search/autocomplete, and full TextField chrome (label, prefix, suffix, clearable).

Aperçu

Rendu de l’aperçu en cours…

single

Rendu de l’aperçu en cours…

with value

Rendu de l’aperçu en cours…

outlined

Rendu de l’aperçu en cours…

disabled

Structure

Anatomie

Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.

Anatomy of OrigamSelectSchematic of the Select component with 6 numbered parts. Framework Vue 3 ▾ Vue 3 React Svelte 1 2 3 4 5 6
Anatomy of <origam-select> — 6 parts: the root field ①, label ②, selection text ③, menu chevron ④, dropdown list container ⑤, and list items ⑥.
1.origam-select
Root element extending OrigamTextField. Carries BEM modifiers for single/multiple, chips, autocomplete and open states.
2origam-select (label via TextField)
Floating label managed by the inner TextField field slot.
3.origam-select__selection-text
Selected value text displayed inside the field when not in chip mode.
4.origam-select__menu-icon
Chevron icon toggling the dropdown. Rotates 180° when the menu is open.
5.origam-select__content (inside OrigamMenu)
Dropdown container rendered by OrigamMenu. Contains the OrigamList of items.
6.origam-select__text / .origam-select__mask
Per-item text label. Includes .origam-select__mask and .origam-select__unmask for the search-highlight animation.

API

Props

Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et description.

chips
boolean
false
Displays selected items as chips inside the input field.
closableChips
boolean
false
Renders a close button on each chip to remove that item from the selection.
hideNoData
boolean
false
Hides the dropdown when no items match the current filter.
hideSelected
boolean
false
Hides already-selected items from the dropdown list.
listProps
IListProps
Props forwarded to the OrigamList inside the dropdown menu.
menu
boolean
false
Controls the open/closed state of the dropdown menu (v-model:menu).
menuIcon
Icon for the menu toggle button. Defaults to a chevron-down icon.
menuProps
IMenuProps
Props forwarded directly to the inner OrigamMenu component.
chipProps
IChipProps
Props forwarded to each OrigamChip rendered for a selected value when chips=true.
multiple
boolean
false
Allows selecting multiple items. modelValue becomes an array.
noDataText
string
Text shown in the dropdown when no items match the search query.
openOnClear
boolean
false
Re-opens the dropdown after the selection is cleared.
autocomplete
boolean
false
Enables type-to-filter autocomplete mode. Matches items against the typed search string.
autoSelectFirst
boolean | string
false
Automatically selects the first filtered result when the search query changes.
clearOnSelect
boolean
false
Clears the search input after an item is selected. Useful in multiple mode.
divider
string
Character used as a separator between multiple selected values when displayed as text.
search
string
Current search/filter string. Bindable with v-model:search.
closeText
string
openText
string
id
string
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
color
Intent or custom color applied to the focused field chrome.
bgColor
TColor
autofocus
boolean
counter
boolean | number | string
counterValue
number | ((e: any) => number)
placeholder
string
Placeholder text shown when no value is selected.
persistentPlaceholder
boolean
persistentCounter
boolean
role
string
type
TTextFieldType
modelModifiers
string | boolean
mask
TMask
density
'default'
Adjusts the vertical padding density of the field.
centerAffix
boolean
dirty
boolean
disabled
boolean
false
Disables the select field.
error
string | boolean
inline
boolean
label
string
Floating/static label shown inside the field.
prefix
string
suffix
string
persistentClear
boolean
singleLine
boolean
required
boolean
loading
TControlLoadingValue
tag
string
loadingText
string
appendInnerAvatar
string
appendInnerIcon
TIcon
prependInnerAvatar
string
prependInnerIcon
TIcon
clearIcon
TIcon
clearable
boolean
false
Shows a clear button to reset the selected value.
prependInnerAriaLabel
string
appendInnerAriaLabel
string
border
boolean | number | string | TDirectionBoth | Array<TDirectionBoth>
borderTop
boolean | number | string
borderLeft
boolean | number | string
borderBottom
boolean | number | string
borderRight
boolean | number | string
borderBlock
boolean | number | string
borderInline
boolean | number | string
borderInlineStart
boolean | number | string
borderInlineEnd
boolean | number | string
borderBlockStart
boolean | number | string
borderBlockEnd
boolean | number | string
borderColor
string
borderStyle
string
borderTopColor
TColor
borderRightColor
TColor
borderBottomColor
TColor
borderLeftColor
TColor
borderInlineStartColor
TColor
borderInlineEndColor
TColor
borderBlockStartColor
TColor
borderBlockEndColor
TColor
focused
boolean
text
string
floating
boolean
name
string
margin
boolean | number | string
marginTop
boolean | number | string
marginLeft
boolean | number | string
marginBottom
boolean | number | string
marginRight
boolean | number | string
marginBlock
boolean | number | string
marginInline
boolean | number | string
marginInlineStart
boolean | number | string
marginInlineEnd
boolean | number | string
marginBlockStart
boolean | number | string
marginBlockEnd
boolean | number | string
padding
boolean | number | string
paddingTop
boolean | number | string
paddingLeft
boolean | number | string
paddingBottom
boolean | number | string
paddingRight
boolean | number | string
paddingBlock
boolean | number | string
paddingInline
boolean | number | string
paddingInlineStart
boolean | number | string
paddingInlineEnd
boolean | number | string
paddingBlockStart
boolean | number | string
paddingBlockEnd
boolean | number | string
rounded
boolean | number | string | TRounded | null | undefined
roundedTopRight
boolean | number | string
roundedTopLeft
boolean | number | string
roundedBottomLeft
boolean | number | string
roundedBottomRight
boolean | number | string
roundedStartStart
boolean | number | string
roundedStartEnd
boolean | number | string
roundedEndStart
boolean | number | string
roundedEndEnd
boolean | number | string
fontSize
TFontSize
fontWeight
TFontWeight
lineHeight
TLineHeight
letterSpacing
TLetterSpacing
active
boolean | IStateEffectConfig
activeClass
string
variant
TVariantInput
elevation
TElevation
size
TSize | number
hideDetails
boolean | string
hideSpinButtons
boolean
hint
string
persistentHint
boolean
messages
Array<string> | string
height
number | string
maxHeight
number | string
maxWidth
number | string
minHeight
number | string
minWidth
number | string
width
number | string
direction
TDirection
errorMessages
Array<string> | string
maxErrors
number | string
readonly
boolean
false
Makes the field read-only — displays the selection but prevents changes.
rules
Array<any>
modelValue
any
Current selected value(s). Bind with v-model. Array when multiple=true.
validateOn
TValidateOn
validationValue
any
appendAvatar
string
appendIcon
Icon displayed after the field.
prependAvatar
string
prependIcon
Icon displayed before the field.
prependAriaLabel
string
appendAriaLabel
string
items
Array<any>
[]
Array of items shown in the dropdown list. Can be strings, numbers, or objects with title/value keys.
itemTitle
TSelectItemKey
itemValue
TSelectItemKey
itemChildren
TSelectItemKey
itemProps
TSelectItemKey
returnObject
boolean
valueComparator
typeof deepEqual
transition
boolean | string | TTransitionProps
customFilter
TFilterFunction
customKeyFilter
TFilterKeyFunctions
filterKeys
TFilterKeys
filterMode
TFilterMode
noFilter
boolean
eager
boolean

API

Slots

Emplacements de contenu exposés par ce composant.

#items.prepend
#default
Replaces the inner dropdown content area.
#noData
#item
Custom list-item renderer inside the dropdown.
#items.append
#chip
Custom chip renderer when chips=true. Receives item data and chip props.
#selection
#label
Custom label content.
#clear
#prependInner
Content prepended inside the field border.
#no-data
Content shown when no items match the search query.
#appendInner
Content appended inside the field border (before the menu chevron).
#loader
#floatingLabel
#prefix
#suffix
#prepend
Content prepended outside the field (left of the border).
#append
Content appended outside the field (right of the border).

API

Emits

Événements émis par ce composant.

@click:control
MouseEvent
Fired when the user clicks the field surface.
@mousedown:control
MouseEvent
Fired on mousedown on the field surface. Used to toggle the menu.
@update:search
string
Emitted when the autocomplete search string changes.
@update:menu
boolean
Emitted when the dropdown opens or closes.
@focus
FocusEvent
Fired when the input receives focus.
@update:modelValue
any
Emitted when the selected value changes.
@blur
FocusEvent
Fired when the input loses focus.
@update:focused
any
@click:append
MouseEvent
@click:prepend
MouseEvent
@click:appendInner
MouseEvent
@click:prependInner
MouseEvent
@click:clear
MouseEvent

API

Membres exposés

Propriétés et méthodes accessibles via ref template (defineExpose). Utilisés pour le contrôle programmatique.

<T extends object>(props: T, exclude?: string[]) => Partial<T>
Utility to forward a filtered subset of props to sub-components.
Ref<boolean>
Reactive focus state of the underlying input.
Ref<boolean>
Reactive open/closed state of the dropdown menu.
(item: any) => void
Imperatively select an item programmatically.
Ref<string>
Reactive CSS string generated by useStyle.
string
Unique style-sheet ID for this instance.
() => void
Injects the computed style sheet. Called automatically on mount.
() => void
Removes the injected style sheet. Called automatically on unmount.
Ref<boolean>
True once the style sheet has been injected.

Personnalisation

Variables CSS

Propriétés CSS personnalisées exposées par ce composant. Surchargez-les pour personnaliser sans perdre la compatibilité avec le thème.

Minimum width of the select field.
Background color of the dropdown list panel.
Border-radius of the dropdown panel.
Maximum height of the dropdown list before it scrolls.
Box shadow of the dropdown panel.

Inclusion

Accessibilité

Rôles ARIA, navigation clavier et gestion du focus. Sourcé depuis le template réel du composant.

Rôles ARIA

combobox
listbox
option

Interactions clavier

Interactions clavier
ToucheAction
Enter / SpaceOpens the dropdown or confirms the highlighted option.
EscapeCloses the dropdown without changing the selection.
Arrow Down / UpNavigates between items in the open dropdown list.
TabCloses the dropdown and moves focus to the next element.

Notes

  • The field uses role="combobox" with aria-expanded reflecting the menu state and aria-haspopup="listbox". The dropdown list has role="listbox" and each item has role="option".
  • The label prop is used as aria-label on the internal text field. When using a placeholder-only UI, also provide an explicit aria-label for screen readers.
  • In multiple mode, aria-multiselectable="true" is set on the listbox. Each selected option has aria-selected="true".

Interactif

Playground

Modifiez les props en direct et observez le composant se mettre à jour. Le snippet de code généré suit vos changements.

Rendu de l’aperçu en cours…

Usage

Exemples

Extraits de code prêts à coller dans vos templates.

Basic single select

vue

Multiple with chips

vue

Autocomplete

vue