Component
Vue Text Input Component
<DomTextInput>A labelled single-line text field, wrapped in DomField so the label and description are uniform across forms.
Playground
Try every prop live
Text input playground
Edit props in the inspector — label, description, placeholder, and disabled state update live.
Shown on your profile.
Properties
Control props
Native input type.
Native autocomplete hint.
Field props
Current field value.
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 { DomTextInput } from '@getdom/studio';
const data = reactive({
"modelValue": "",
"id": "",
"name": "",
"label": "Display name",
"description": "Shown on your profile.",
"placeholder": "Your name",
"required": false,
"disabled": false,
"readOnly": false,
"invalid": false,
"errors": [],
"visible": true,
"validators": [],
"validateOnBlur": true,
"chrome": "field",
"type": "text",
"autocomplete": ""
});
</script>
<template>
<DomTextInput
v-bind="data"
@update:modelValue="data.modelValue = $event"
/>
</template>Demo
Live preview
Shown publicly on your profile.
Value: Alex Morgan
Usage
Vue
<script setup>
import { DomTextInput } from '@getdom/studio/vue';
import { ref } from 'vue';
const name = ref('');
</script>
<template>
<DomTextInput
v-model="name"
label="Display name"
description="Shown publicly on your profile."
placeholder="DOM Studio"
/>
</template>Props
Props
| Name | Type | Default | Description |
|---|---|---|---|
| v-model | string | '' | Bound text value. |
| label | string | — | Small label above the input. |
| description | string | — | Hint shown below the input. |
| placeholder | string | — | Input placeholder text. |
| disabled | boolean | false | Disable the input. |
| required | boolean | false | Render a small required indicator next to the label. |