Skip to content

Select ​

Terminal-style dropdown select.

Select

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    <Select8      model-value="2"9      :options="[{ label: 'Option A', value: '1' }, { label: 'Option B', value: '2' }, { label: 'Option C', value: '3' }]"10      placeholder="Select an option..."11      design="tuix"12    />13  </TabPanel>14  <TabPanel value="rubik">15    <Select16      model-value="2"17      :options="[{ label: 'Option A', value: '1' }, { label: 'Option B', value: '2' }, { label: 'Option C', value: '3' }]"18      placeholder="Select an option..."19      design="rubik"20    />21  </TabPanel>22</Tabs>

Demo ​

Valor seleccionado (modelValue / v-model) ​

Lee la selección con v-model.

vue
1<Select v-model="selected" :options="options" placeholder="Choose an option" />

Placeholder (placeholder) ​

Texto cuando no hay selección.

vue
1<script setup lang="ts">2import { ref } from 'vue'3import { Select } from '@dowardev/herdrate-vue'45const placeholderA = ref('')6const placeholderB = ref('')7</script>89<template>10  <Select v-model="placeholderA" :options="options" placeholder="Select..." />11  <Select v-model="placeholderB" :options="options" placeholder="Choose a framework..." />12</template>

Opciones (options) ​

Array de objetos { label, value }.

ts
1const options = [2  { label: 'Vue', value: 'vue' },3  { label: 'React', value: 'react' },4]
vue
1<Select v-model="selected" :options="options" />

Color (color) ​

Color del foco y borde al abrir.

Every variant keeps its own state with an initial value: opening one never affects the others.

vue
1<script setup lang="ts">2import { ref } from 'vue'3import { Select } from '@dowardev/herdrate-vue'45const colorPrimary = ref('1')6const colorSuccess = ref('1')7</script>89<template>10  <Select v-model="colorPrimary" :options="options" color="primary" placeholder="Primary" />11  <Select v-model="colorSuccess" :options="options" color="success" placeholder="Success" />12</template>

Deshabilitado (disabled) ​

Bloquea la interacción; el valor sigue visible.

vue
1<Select v-model="selectedDisabled" :options="options" disabled placeholder="Disabled" />

Events ​

EventPayloadDescription
update:modelValuestringEmitted when an option is selected

API ​

PropTypeDefaultDescription
modelValuestring''Selected value (v-model)
optionsArray<{label: string, value: string}>[]Dropdown options
color'primary' | 'secondary' | 'tertiary' | 'success' | 'warning' | 'danger' | 'light' | 'medium' | 'dark''primary'Focus color
disabledbooleanfalseDisabled
placeholderstring'Select...'Placeholder
design'tuix' | 'rubik'— (inherits from data-design)Design line (or inherit from data-design).

options — each option has this shape:

FieldTypeRequiredDescription
labelstring✅Visible text
valuestring✅Internal value

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.
--bg-altfrom theme (--ctp-latte-mantle / --ctp-mocha-mantle)Alternate background (the next layer down from the base).
--bg-elevatedfrom theme (--ctp-latte-surface0 / --ctp-mocha-surface0)Background of floating surfaces (modals, dropdowns, popovers).
--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.
--cp-ease-snapcubic-bezier(.3, 1.4, .5, 1)Snap easing (overshoots) for pop interactions.

Ver Theming para la convención completa.