Select

Choose one or more values from a searchable option list.

Select

Default

Prefer options to supply Select data. Each item contains label and value; add disabled to disable an option. Use slots when custom option content is needed.

Shape

Use shape="square" to keep the trigger, selected tags, options, and popup surface in one square geometry.

Size

Use size for the shared small, default, and large control scale. An omitted value inherits the nearest Form, Control Group, or Config Provider size.

Color

Change the color of the component with the color property, the allowed values ​​are the main colors of Sax Design and the colors (RGB and HEX)

Label

Use label for a persistent label, or combine it with label-float to place the label inside an empty Select and float it when open or selected. Use placeholder for ordinary placeholder text. The examples compare all three treatments.

Group

Use option-groups for grouped data. Each group has a label and an options array. The same data supports filtering and multiple selection.

Filter

You can add the functionality of filtering options with the filter property, this property is a boolean so you can add it without any value

Multiple

Add the functionality of multiple selection of options with the multiple property, this property is a boolean so you can add it without any value

Multiple Selects measure their available width by default and automatically replace tags that do not fit with +N. Set collapse-tags to false to allow tags to wrap; max-collapse-tags is only an optional upper limit.

The value of the select must be an array

Loading

Add a loading animation to the select with the loading property, this property is a boolean so you can add it without any value

State

Change the style of the component to the color passed in the state property, the allowed colors are only the main ones of Sax Design

This property can be used to indicate a missing field to the user or when something is ready.

Message

Add an item below the select showing a message to the user

Data source

Use options and option-groups when data arrives from an API. option-props and option-group-props map existing field names; filterable is an alias of filter.

Use popup-config to control panel sizing, trigger-width matching, offset, mount target and custom styles. The first Select uses full to match its trigger; the second combines width and height limits with offset, appendTo, placement, className and style. The demo mounts to body; inside a dialog, replace appendTo with an existing container selector or element.

Custom option rendering

render-item(option, context) returns option content; the option slot takes precedence. Normal, grouped and virtual lists share this context. keyword is the current search text; matched indicates that the label contains the nonempty keyword (case-insensitive), independently of filter-option. highlight(text) safely renders matching text and respects highlight-search. The context also provides label, selected and optional group; the option slot receives the same fields.

Search matching and highlighting

Use filter-option for matching, highlight-search to mark the matching text and show-selected-mark for a selected indicator.

selection-tools selects, inverts or clears the current filtered results. The footer slot receives counts and bulk actions, with no refresh behavior built in.

Cached option labels

When remote pagination or searching replaces options, pass cached-options to retain selected labels. Use header and footer for the two popup regions.

Pinned options

Set pin-key to persist pinned values in local storage. Hover an option to reveal its pin action, or press Ctrl+P on the keyboard-highlighted option. For server persistence, provide get-pin-options, pin-method and unpin-method together. auto-use-option selects the first pinned enabled option, falling back to the first enabled option.

Virtual options

Enable virtual for large flat options arrays. This example compares 10,000 and 400 options with the same virtual scrolling configuration and render-item with single-line labels, wrapped descriptions and third-line details, retaining search highlights through highlight(text). Filtering, keyboard navigation and selected-value caching stay available while only visible rows mount. Dynamic measurement is on by default, so wrapped labels and custom option content may use different row heights; set virtual-config.dynamic to false only for truly fixed rows.

Multiple value ordering

Selection order is preserved by default. When enabled, v-model and change follow the complete option order, including group order and pinned placement; filtering does not narrow the ordering scope. Existing values, changed option order, select-all and invert are normalized too. Unavailable values are retained. Configure globally with app.use(SaxDesignVue, { select: { sortByOptionOrder: true } }); an explicit local false overrides it.

API

PROPS

Property
Type
Values
Description
default
Example
More
render-item
—
Customize data option content, including grouped and virtual lists. The option slot takes precedence.
—
options
[]
—
Data-driven options. Reads value, label, and disabled by default; customize the fields with option-props.
[]
option-props
{ value?: string; label?: string; disabled?: string }
—
Field names for option values, labels, and disabled states. Unspecified fields use value, label, and disabled respectively.
{}
option-groups
[]
—
Grouped options using label and options fields by default. Options within each group use option-props.
[]
option-group-props
{ options?: string; label?: string }
—
Field names for a group's option list and title, defaulting to options and label respectively.
{}
size
small | medium | large
Set the trigger and inherited form-control density.
—
label-float
Boolean
true | false
Float the label when the field has focus or a selected value.
false
v-model
option value or values
Bind selected values and optionally configure the value treated as empty.
—
not-value
option value or values
Bind selected values and optionally configure the value treated as empty.
—
block
Boolean
true | false
Control field width, shape and popup positioning strategy.
false
shape
String
rounded | square
Control field width, shape and popup positioning strategy.
rounded
fit
Boolean
true | false
Control field width, shape and popup positioning strategy.
true
strategy
String
absolute | fixed
Control field width, shape and popup positioning strategy.
absolute
clearable
Boolean
true | false
Control clear action and dropdown scrollbar rendering.
false
hide-scrollbar
Boolean
true | false
Control clear action and dropdown scrollbar rendering.
false
native-scrollbar
Boolean
true | false
Control clear action and dropdown scrollbar rendering.
false
filter-config
filter and remote data configuration
Configure local filtering or asynchronous remote options.
—
filter-method
Function
filter and remote data configuration
Configure local filtering or asynchronous remote options.
—
remote
Boolean
filter and remote data configuration
Configure local filtering or asynchronous remote options.
—
remote-config
filter and remote data configuration
Configure local filtering or asynchronous remote options.
—
remote-method
Function
filter and remote data configuration
Configure local filtering or asynchronous remote options.
—
popup-config
width | full | matchTriggerWidth | minWidth | maxWidth | height | maxHeight | placement | transfer | appendTo | offset | zIndex | className | style
Configure popup sizing, placement, transfer target, class and inline style, plus delay and feedback states.
—
show-after
Number
width | full | matchTriggerWidth | minWidth | maxWidth | height | maxHeight | placement | transfer | appendTo | offset | zIndex | className | style
Configure popup sizing, placement, transfer target, class and inline style, plus delay and feedback states.
—
hide-after
Number
width | full | matchTriggerWidth | minWidth | maxWidth | height | maxHeight | placement | transfer | appendTo | offset | zIndex | className | style
Configure popup sizing, placement, transfer target, class and inline style, plus delay and feedback states.
—
loading-text
String
width | full | matchTriggerWidth | minWidth | maxWidth | height | maxHeight | placement | transfer | appendTo | offset | zIndex | className | style
Configure popup sizing, placement, transfer target, class and inline style, plus delay and feedback states.
—
no-data-text
String
width | full | matchTriggerWidth | minWidth | maxWidth | height | maxHeight | placement | transfer | appendTo | offset | zIndex | className | style
Configure popup sizing, placement, transfer target, class and inline style, plus delay and feedback states.
—
no-match-text
String
width | full | matchTriggerWidth | minWidth | maxWidth | height | maxHeight | placement | transfer | appendTo | offset | zIndex | className | style
Configure popup sizing, placement, transfer target, class and inline style, plus delay and feedback states.
—
color
primary | success | danger | warn | warning | dark | text | light | secondary | RGB | RGBA | HEX | HSL | HSLA
Change the color of the component.
primary
loading
Boolean
truefalse
Show the shared trailing loader, preserve the value, and block editing, clearing, and popup interaction.
false
flip
Boolean
truefalse
Changes the placement of the options element to keep it in view.
true
teleported
Boolean
truefalse
whether select dropdown is teleported to the body
false
—
placeholder
String
String
Add a placeholder to the component.
—
label
String
String
Add a label to the composite select.
—
filter
Boolean
truefalse
Add the functionality to filter the select options.
false
default-first-option
Boolean
truefalse
select first matching option on enter key. Use with `filter`
false
allow-create
Boolean
truefalse
Whether creating new items is allowed. To use this, `filter` must be true
false
multiple
Boolean
truefalse
Add the functionality of being able to select several options from a select.
false
sort-by-option-order
Boolean
—
Order multiple values by option appearance. Priority: explicit local value > global select.sortByOptionOrder > false. Single selection is unchanged. Unavailable values remain at the end in their existing order.
false
multiple-limit
Number
number
Maximum number of options user can select when `multiple` is `true`. No limit when set to 0
0
state
String
primary | success | danger | warn | warning | dark | text | light | secondary | RGB | RGBA | HEX | HSL | HSLA
Change the state of the component to the color provided.
false
disabled
Boolean
truefalse
Determine if the component is in the disabled state.
false
—
collapse-tags
Boolean
truefalse
Adaptively collapse tags that do not fit and show the remaining count as `+N`.
true
max-collapse-tags
Number
number
Optional upper limit for visible tags when collapse-tags is true. Set to 0 to rely only on available width.
0
virtual
Boolean
threshold | estimateSize | overscan | dynamic
Window flat data-driven options with the shared virtual list and optionally measure dynamic row heights. Option groups and custom Option children retain normal rendering.
false
virtual-config
Object
threshold | estimateSize | overscan | dynamic
Window flat data-driven options with the shared virtual list and optionally measure dynamic row heights. Option groups and custom Option children retain normal rendering.
{}
pin-key
String
local or remote option pinning configuration
Pin frequently used flat options to the top, persist them locally or remotely, and optionally select the first available option.
—
get-pin-options
Function
local or remote option pinning configuration
Pin frequently used flat options to the top, persist them locally or remotely, and optionally select the first available option.
—
pin-method
Function
local or remote option pinning configuration
Pin frequently used flat options to the top, persist them locally or remotely, and optionally select the first available option.
—
unpin-method
Function
local or remote option pinning configuration
Pin frequently used flat options to the top, persist them locally or remotely, and optionally select the first available option.
—
auto-use-option
Boolean
local or remote option pinning configuration
Pin frequently used flat options to the top, persist them locally or remotely, and optionally select the first available option.
false
cached-options
Array
cached optionssearch highlighting and visibility predicates
Retain remote selected labels and customize matching and final visibility.
[]
highlight-search
Boolean
cached optionssearch highlighting and visibility predicates
Retain remote selected labels and customize matching and final visibility.
false
filter-option
Function
cached optionssearch highlighting and visibility predicates
Retain remote selected labels and customize matching and final visibility.
—
option-visible-method
Function
cached optionssearch highlighting and visibility predicates
Retain remote selected labels and customize matching and final visibility.
—
multiple-display-mode
tags | text
multiple-selection display and formatters
Render multiple values as tags or one-line text and customize their labels.
tags
get-tag-label
Function
multiple-selection display and formatters
Render multiple values as tags or one-line text and customize their labels.
—
get-display-value
Function
multiple-selection display and formatters
Render multiple values as tags or one-line text and customize their labels.
—
selection-tools
Array
all | invert | clear
Configure bulk selection tools, labels, selected marks and the search placeholder.
[]
selection-tool-labels
Object
all | invert | clear
Configure bulk selection tools, labels, selected marks and the search placeholder.
{}
show-selected-mark
Boolean
all | invert | clear
Configure bulk selection tools, labels, selected marks and the search placeholder.
false
search-placeholder
String
all | invert | clear
Configure bulk selection tools, labels, selected marks and the search placeholder.
''
option-group:label
String
String
Set label for select group (required)
—

EVENTS

Event
Type
Description
default
Example
More
update:modelValue
Fire when the selected value changes.
—
—
change
Fire when the selected value changes.
—
—
visible-change
Boolean
Fires when the dropdown opens or closes.
—
—
focus
FocusEvent | Event
Fire when the control gains or loses focus.
—
—
blur
FocusEvent | Event
Fire when the control gains or loses focus.
—
—
clear
—
Fires after clearing the current selection.
—
—
remove-tag
Fires when a selected multiple-value tag is removed.
—
—
pin-change
{ value, pinned, values }
Fires after an option is pinned or unpinned.
—
—
pin-fetch
(values: [], loaded: Boolean)
Fires when persisted pinned values finish loading.
—
—

SLOTS

Slot
Scope
Description
default
Example
More
header
{ query: string; selectedCount: number }
Customize popup header, bulk tools and footer. The footer exposes state and actions without built-in refresh behavior.
—
tools
{ query: string; selectedCount: number; filteredCount: number; totalCount: number; actions: { selectAll: () => void; invert: () => void; clear: () => void } }
Customize popup header, bulk tools and footer. The footer exposes state and actions without built-in refresh behavior.
—
footer
{ query: string; selectedCount: number; filteredCount: number; totalCount: number; actions: { selectAll: () => void; invert: () => void; clear: () => void } }
Customize popup header, bulk tools and footer. The footer exposes state and actions without built-in refresh behavior.
—
message-{color}
warndangersuccess
Add a message below the select.
—
option
& { option: }
Customize an option's content; group is available for grouped options.
—
—
Last Updated: 2026-10-28, 06:17:56 UTC
Copied