Skip to content

Input ​

Terminal-style text input, with support for textarea, password and readonly.

Input

Design lines ​

vue
1<Tabs defaultValue="tuix">2  <TabsList>3    <Tab value="tuix">TUIX</Tab>4    <Tab value="rubik">Rubik</Tab>5  </TabsList>6  <TabPanel value="tuix">7    <Input model-value="demo" placeholder="Search…" design="tuix" />8  </TabPanel>9  <TabPanel value="rubik">10    <Input model-value="demo" placeholder="Search…" design="rubik" />11  </TabPanel>12</Tabs>

Demo ​

Basic (modelValue / v-model) ​

Text, password and multiline inputs bound with v-model.

vue
1<Input v-model="text" placeholder="Type something..." />23<Input v-model="password" type="password" placeholder="Password" />45<Input v-model="multiline" :rows="3" />

Placeholder (placeholder) ​

Two inputs with different placeholder texts.

vue
1<Input placeholder="Type something..." />2<Input placeholder="e.g. user@email.com" />

Color (color) ​

Each input keeps its own state so typing in one never affects the others.

vue
1<script setup lang="ts">2import { ref } from 'vue'3import { Input } from '@dowardev/herdrate-vue'45const colorPrimary = ref('')6const colorSuccess = ref('')7const colorDanger = ref('')8</script>910<template>11  <Input v-model="colorPrimary" color="primary" placeholder="Primary" />12  <Input v-model="colorSuccess" color="success" placeholder="Success" />13  <Input v-model="colorDanger" color="danger" placeholder="Danger" />14</template>

Disabled (disabled) ​

An input that ignores interaction while disabled.

vue
1<Input placeholder="Disabled" disabled />

Read only (readonly) ​

A readonly input that shows its value but cannot be edited.

vue
1<Input v-model="readonlyText" readonly />

Type (type) ​

text and password inputs side by side.

vue
1<Input v-model="typeText" type="text" placeholder="Text" />2<Input v-model="typePassword" type="password" placeholder="Password" />

Rows (rows) ​

A textarea-like input with rows set to 4.

vue
1<Input v-model="rowsText" :rows="4" />

Props ​

modelValue ​

Current input value (string v-model).

TypeDefaultRequired
string''❌

placeholder ​

Temporary text inside the input while it is empty.

TypeDefaultRequired
string''❌

color ​

Focus and active border color of the input.

TypeDefaultRequired
'primary' | 'secondary' | 'tertiary' | 'success' | 'warning' | 'danger' | 'light' | 'medium' | 'dark''primary'❌

disabled ​

Disables interaction with the input.

TypeDefaultRequired
booleanfalse❌

readonly ​

Read-only input, visible but not editable.

TypeDefaultRequired
booleanfalse❌

type ​

Input type: text, password or number.

TypeDefaultRequired
'text' \| 'password' \| 'number''text'❌

rows ​

Number of rows. When greater than 1 it behaves as a textarea.

TypeDefaultRequired
number1❌

design ​

Design line (or inherit from data-design).

TypeDefaultRequired
'tuix' | 'rubik'— (inherits from data-design)❌

Events ​

EventPayloadDescription
update:modelValuestringEmitted when typing in the input

CSS Custom Properties ​

TokenDefaultDescription
--font-mono"JetBrains Mono", ui-monospace, monospaceMonospace font stack for code-like content (key labels, log lines, chips).
--accentfrom theme (--ctp-latte-mauve / --ctp-mocha-mauve)Accent color, mapped from the active semantic color.
--bgfrom theme (--ctp-latte-base / --ctp-mocha-base)Base background of the surface.
--borderfrom theme (--ctp-latte-surface0 / --ctp-mocha-surface0)Outline and divider color for surfaces.
--textfrom theme (--ctp-latte-text / --ctp-mocha-text)Primary text color used inside the component.
--text-mutedfrom theme (--ctp-latte-subtext1 / --ctp-mocha-subtext1)Secondary text for hints, annotations and disabled state.
--color-primaryfrom theme (--ctp-latte-mauve / --ctp-mocha-mauve)Primary semantic color (mauve in Catppuccin).
--color-secondaryfrom theme (--ctp-latte-lavender / --ctp-mocha-lavender)Secondary semantic color (lavender in Catppuccin).
--color-tertiaryfrom theme (--ctp-latte-blue / --ctp-mocha-blue)Tertiary semantic color (blue in Catppuccin).
--color-successfrom theme (--ctp-latte-green / --ctp-mocha-green)Success semantic color (green in Catppuccin).
--color-warningfrom theme (--ctp-latte-yellow / --ctp-mocha-yellow)Warning semantic color (yellow in Catppuccin).
--color-dangerfrom theme (--ctp-latte-red / --ctp-mocha-red)Danger semantic color (red in Catppuccin).
--color-lightfrom theme (--ctp-latte-surface1 / --ctp-mocha-rosewater)Light semantic color (lighter contrast tone).
--color-mediumfrom theme (--ctp-latte-overlay0 / --ctp-mocha-overlay2)Medium semantic color (mid-tone).
--color-darkfrom theme (--ctp-latte-text / --ctp-mocha-subtext1)Dark semantic color (high contrast text).
--cp-easecubic-bezier(.4, 0, .2, 1)Default easing curve for transitions.

Ver Theming para la convención completa.