Component
Vue Segmented Select Input
<DomSelectInput>A pill-style segmented selector that separates into complete pills when its choices wrap.
Playground
Try every prop live
Select input playground
Edit props in the inspector — options array and selected value update live.
Three balanced sizes.
Properties
Control props
Selected value.
Options to render as buttons.
Field props
Optional ID override. By default parent forms derive the input ID from the field path using underscores.
Local field name. Parent forms derive the full field path and native HTML name from the form hierarchy.
Visible field label.
Optional helper copy below the field.
Placeholder shown when the control is empty.
Validation errors for this field.
Validators
No validators yet.
Validators attached to this field. Use functions in Vue code, or serializable records such as { name: "minLength", props: { min: 2 } } in generated schemas.
Render default field chrome, or hide chrome while keeping form state wiring.
npm install @getdom/studio<script setup>
import '@getdom/studio/style.css';
import { reactive } from 'vue';
import { DomSelectInput } from '@getdom/studio';
const data = reactive({
"modelValue": "md",
"id": "",
"name": "",
"label": "Size",
"description": "Three balanced sizes.",
"placeholder": "",
"required": false,
"disabled": false,
"readOnly": false,
"invalid": false,
"errors": [],
"visible": true,
"validators": [],
"validateOnBlur": true,
"chrome": "field",
"options": [
{
"label": "",
"value": ""
},
{
"label": "",
"value": ""
},
{
"label": "",
"value": ""
}
]
});
</script>
<template>
<DomSelectInput
v-bind="data"
@update:modelValue="data.modelValue = $event"
/>
</template>Demo
Live preview
Three balanced sizes.
Value: md
Usage
Vue
<script setup>
import { DomSelectInput } from '@getdom/studio/vue';
import { ref } from 'vue';
const size = ref('md');
</script>
<template>
<DomSelectInput
v-model="size"
label="Size"
description="Three balanced sizes."
:options="['sm', 'md', 'lg']"
/>
</template>Reference
Props
Control props
| Name | Type | TS | Default | Description |
|---|---|---|---|---|
modelValue | any | any | — | Selected value. |
optionsts | array | Array< | [] | Options to render as buttons. |
Field props
| Name | Type | TS | Default | Description |
|---|---|---|---|---|
id | string | string | '' | Optional ID override. By default parent forms derive the input ID from the field path using underscores. |
name | string | string | '' | Local field name. Parent forms derive the full field path and native HTML name from the form hierarchy. |
label | string | string | '' | Visible field label. |
description | string | string | '' | Optional helper copy below the field. |
placeholder | string | string | '' | Placeholder shown when the control is empty. |
required | boolean | boolean | false | Mark the field as required. |
disabled | boolean | boolean | false | Disable field interaction. |
readOnly | boolean | boolean | false | Show the value but prevent editing. |
invalid | boolean | boolean | false | Mark the field invalid. |
errorsts | array | object | string | Array< | [] | Validation errors for this field. |
visible | boolean | boolean | true | Show or hide the field. |
validators | array | Array<unknown> | [] | Validators attached to this field. Use functions in Vue code, or serializable records such as { name: "minLength", props: { min: 2 } } in generated schemas. |
validateOnBlur | boolean | boolean | true | Run validators when the field loses focus. |
chrome | 'field' | 'none' | false | string | 'field' | Render default field chrome, or hide chrome while keeping form state wiring. |
Auto-generated from DomSelectInput.props and inline _edit hints.