Select
Dropdown selection control with single/multiple mode, chip display, search/autocomplete, and full TextField chrome (label, prefix, suffix, clearable).
Preview
Rendering the live preview…
singleRendering the live preview…
with valueRendering the live preview…
outlinedRendering the live preview…
disabledStructure
Anatomy
Visual breakdown of the component's internal structure with BEM class call-outs.
<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
All props accepted by this component, with their type, default value and description.
- chipsbooleanfalse
- Displays selected items as chips inside the input field.
- closableChipsbooleanfalse
- Renders a close button on each chip to remove that item from the selection.
- hideNoDatabooleanfalse
- Hides the dropdown when no items match the current filter.
- hideSelectedbooleanfalse
- Hides already-selected items from the dropdown list.
- listPropsIListProps
- Props forwarded to the OrigamList inside the dropdown menu.
- menubooleanfalse
- 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.
- menuPropsIMenuProps
- Props forwarded directly to the inner OrigamMenu component.
- chipPropsIChipProps
- Props forwarded to each OrigamChip rendered for a selected value when chips=true.
- multiplebooleanfalse
- Allows selecting multiple items. modelValue becomes an array.
- noDataTextstring
- Text shown in the dropdown when no items match the search query.
- openOnClearbooleanfalse
- Re-opens the dropdown after the selection is cleared.
- autocompletebooleanfalse
- Enables type-to-filter autocomplete mode. Matches items against the typed search string.
- autoSelectFirstboolean | stringfalse
- Automatically selects the first filtered result when the search query changes.
- clearOnSelectbooleanfalse
- Clears the search input after an item is selected. Useful in multiple mode.
- dividerstring
- Character used as a separator between multiple selected values when displayed as text.
- searchstring
- Current search/filter string. Bindable with v-model:search.
- closeTextstring
- openTextstring
- idstring
- classstring | Array<string> | object
- stylestring | Array<string> | object | StyleValue
- color
- Intent or custom color applied to the focused field chrome.
- bgColorTColor
- autofocusboolean
- counterboolean | number | string
- counterValuenumber | ((e: any) => number)
- placeholderstring
- Placeholder text shown when no value is selected.
- persistentPlaceholderboolean
- persistentCounterboolean
- rolestring
- typeTTextFieldType
- modelModifiersstring | boolean
- maskTMask
- Adjusts the vertical padding density of the field.
- centerAffixboolean
- dirtyboolean
- disabledbooleanfalse
- Disables the select field.
- errorstring | boolean
- inlineboolean
- labelstring
- Floating/static label shown inside the field.
- prefixstring
- suffixstring
- persistentClearboolean
- singleLineboolean
- requiredboolean
- loadingTControlLoadingValue
- tagstring
- loadingTextstring
- appendInnerAvatarstring
- appendInnerIconTIcon
- prependInnerAvatarstring
- prependInnerIconTIcon
- clearIconTIcon
- clearablebooleanfalse
- Shows a clear button to reset the selected value.
- prependInnerAriaLabelstring
- appendInnerAriaLabelstring
- borderboolean | number | string | TDirectionBoth | Array<TDirectionBoth>
- borderTopboolean | number | string
- borderLeftboolean | number | string
- borderBottomboolean | number | string
- borderRightboolean | number | string
- borderBlockboolean | number | string
- borderInlineboolean | number | string
- borderInlineStartboolean | number | string
- borderInlineEndboolean | number | string
- borderBlockStartboolean | number | string
- borderBlockEndboolean | number | string
- borderColorstring
- borderStylestring
- borderTopColorTColor
- borderRightColorTColor
- borderBottomColorTColor
- borderLeftColorTColor
- borderInlineStartColorTColor
- borderInlineEndColorTColor
- borderBlockStartColorTColor
- borderBlockEndColorTColor
- focusedboolean
- textstring
- floatingboolean
- namestring
- marginboolean | number | string
- marginTopboolean | number | string
- marginLeftboolean | number | string
- marginBottomboolean | number | string
- marginRightboolean | number | string
- marginBlockboolean | number | string
- marginInlineboolean | number | string
- marginInlineStartboolean | number | string
- marginInlineEndboolean | number | string
- marginBlockStartboolean | number | string
- marginBlockEndboolean | number | string
- paddingboolean | number | string
- paddingTopboolean | number | string
- paddingLeftboolean | number | string
- paddingBottomboolean | number | string
- paddingRightboolean | number | string
- paddingBlockboolean | number | string
- paddingInlineboolean | number | string
- paddingInlineStartboolean | number | string
- paddingInlineEndboolean | number | string
- paddingBlockStartboolean | number | string
- paddingBlockEndboolean | number | string
- roundedboolean | number | string | TRounded | null | undefined
- roundedTopRightboolean | number | string
- roundedTopLeftboolean | number | string
- roundedBottomLeftboolean | number | string
- roundedBottomRightboolean | number | string
- roundedStartStartboolean | number | string
- roundedStartEndboolean | number | string
- roundedEndStartboolean | number | string
- roundedEndEndboolean | number | string
- fontSizeTFontSize
- fontWeightTFontWeight
- lineHeightTLineHeight
- letterSpacingTLetterSpacing
- activeboolean | IStateEffectConfig
- activeClassstring
- variantTVariantInput
- elevationTElevation
- sizeTSize | number
- hideDetailsboolean | string
- hideSpinButtonsboolean
- hintstring
- persistentHintboolean
- messagesArray<string> | string
- heightnumber | string
- maxHeightnumber | string
- maxWidthnumber | string
- minHeightnumber | string
- minWidthnumber | string
- widthnumber | string
- directionTDirection
- errorMessagesArray<string> | string
- maxErrorsnumber | string
- readonlybooleanfalse
- Makes the field read-only — displays the selection but prevents changes.
- rulesArray<any>
- modelValueany
- Current selected value(s). Bind with v-model. Array when multiple=true.
- validateOnTValidateOn
- validationValueany
- appendAvatarstring
- appendIcon
- Icon displayed after the field.
- prependAvatarstring
- prependIcon
- Icon displayed before the field.
- prependAriaLabelstring
- appendAriaLabelstring
- itemsArray<any>[]
- Array of items shown in the dropdown list. Can be strings, numbers, or objects with title/value keys.
- itemTitleTSelectItemKey
- itemValueTSelectItemKey
- itemChildrenTSelectItemKey
- itemPropsTSelectItemKey
- returnObjectboolean
- valueComparatortypeof deepEqual
- transitionboolean | string | TTransitionProps
- customFilterTFilterFunction
- customKeyFilterTFilterKeyFunctions
- filterKeysTFilterKeys
- filterModeTFilterMode
- noFilterboolean
- eagerboolean
API
Slots
Content slots exposed by this component.
- #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
Events emitted by this component.
- @click:controlMouseEvent
- Fired when the user clicks the field surface.
- @mousedown:controlMouseEvent
- Fired on mousedown on the field surface. Used to toggle the menu.
- @update:searchstring
- Emitted when the autocomplete search string changes.
- @update:menuboolean
- Emitted when the dropdown opens or closes.
- @focusFocusEvent
- Fired when the input receives focus.
- @update:modelValueany
- Emitted when the selected value changes.
- @blurFocusEvent
- Fired when the input loses focus.
- @update:focusedany
- @click:appendMouseEvent
- @click:prependMouseEvent
- @click:appendInnerMouseEvent
- @click:prependInnerMouseEvent
- @click:clearMouseEvent
API
Exposed members
Properties and methods accessible via template ref (defineExpose). Use them for programmatic control.
- <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.
Customisation
CSS variables
CSS custom properties exposed by this component. Override them to customise the component without losing theme compatibility.
- 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
Accessibility
ARIA roles, keyboard navigation and focus management. Sourced from the real component template.
ARIA roles
Keyboard interactions
| Key | Action |
|---|---|
| Enter / Space | Opens the dropdown or confirms the highlighted option. |
| Escape | Closes the dropdown without changing the selection. |
| Arrow Down / Up | Navigates between items in the open dropdown list. |
| Tab | Closes 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".
Interactive
Playground
Edit props live and see the component update in real time. The generated code snippet updates as you change values.
Rendering the live preview…
Usage
Examples
Ready-to-paste code snippets for your templates.
Basic single select
Multiple with chips
Autocomplete