Component

Select input

<DomSelectInput>

A pill-style segmented selector. Compact, keyboard-friendly, ideal for short option lists.

Playground

Try every prop live

Select input playground

Edit props in the inspector — options array and selected value update live.

Three balanced sizes.

Playground.vuevue
<script setup>
import { reactive } from 'vue';
import { DomSelectInput } from '@getdom/studio/vue';

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

NameTypeTSDefaultDescription
modelValueanyanySelected value.
options
[
	{
		label: "Option 1",
		value: "option-1",
	}
]
arrayArray<OptionsItem
type OptionsItem = {
	label?: string; // Label
	value?: string; // Value
};
>
[]Options to render as buttons.

Field props

NameTypeTSDefaultDescription
idstringstring''Optional ID override. By default parent forms derive the input ID from the field path using underscores.
namestringstring''Local field name. Parent forms derive the full field path and native HTML name from the form hierarchy.
labelstringstring''Visible field label.
descriptionstringstring''Optional helper copy below the field.
placeholderstringstring''Placeholder shown when the control is empty.
requiredbooleanbooleanfalseMark the field as required.
disabledbooleanbooleanfalseDisable field interaction.
readOnlybooleanbooleanfalseShow the value but prevent editing.
invalidbooleanbooleanfalseMark the field invalid.
errors
[
	{
		name: "Validation name",
		message: "Error message",
	}
]
array | object | stringArray<ErrorsItem
type ErrorsItem = {
	name?: string; // Name
	message?: string; // Message
};
>
{}Validation errors for this field.
visiblebooleanbooleantrueShow or hide the field.
validatorsarrayArray<unknown>[]Validators attached to this field. Use functions in Vue code, or serializable records such as { name: "minLength", props: { min: 2 } } in generated schemas.
validateOnBlurbooleanbooleantrueRun validators when the field loses focus.
chrome'field' | falsestring'field'Render default field chrome, or false to render only the control while keeping form state wiring.

Auto-generated from DomSelectInput.props and inline _edit hints.