Input

Displays a form input field.

Preview ​

Installation ​

npx sigma-ui@latest add input

Usage ​

vue
<script setup lang="ts">
import { Input } from '@/components/ui/input';
</script>

<template>
  <Input
    v-model="email"
    type="email"
    placeholder="Email"
  />
</template>

v-model binds a string or a number. Every native input attribute, such as type, disabled, and placeholder, is passed through to the <input>.

Examples ​

Basic ​

File ​

Disabled ​

With Label ​

With Button ​

With Icon ​

Form ​

API Reference ​

Input ​

Props

PropType Default
modelValue

Current value of the input; use with v-model.

string | number-

Events

EventPayload
update:modelValue

Emitted when the user changes the value.

unknown[]

Accessibility ​

Renders a native <input>. Pair it with a <Label> (or aria-label) so the field has an accessible name.

KeyDescription
TabMoves focus to the input.
Shift + TabMoves focus to the previous focusable element.
Edit this page on GitHub