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.
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.
Use shape="square" to keep the trigger, selected tags, options, and popup surface in one square geometry.
Use size for the shared small, default, and large control scale. An omitted value inherits the nearest Form, Control Group, or Config Provider size.
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)
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.
Use option-groups for grouped data. Each group has a label and an options array. The same data supports filtering and multiple selection.
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
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
Add a loading animation to the select with the loading property, this property is a boolean so you can add it without any value
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.
Add an item below the select showing a message to the user
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.
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.
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.
When remote pagination or searching replaces options, pass cached-options to retain selected labels. Use header and footer for the two popup regions.
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.
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.
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.
[]{ value?: string; label?: string; disabled?: string }[]{ options?: string; label?: string }FunctionBooleanFunctionNumberNumberStringStringStringBooleanBooleanBooleanBooleanBooleanNumberStringNumberBooleanObjectStringFunctionFunctionFunctionBooleanArrayBooleanFunctionFunctiontags | textFunctionFunctionArrayObjectBooleanString{ query: string; selectedCount: number }{ query: string; selectedCount: number; filteredCount: number; totalCount: number; actions: { selectAll: () => void; invert: () => void; clear: () => void } }{ query: string; selectedCount: number; filteredCount: number; totalCount: number; actions: { selectAll: () => void; invert: () => void; clear: () => void } }