Skip to content
navy

Input

Text input component with label and placeholder support.

Live Demo

Current values:
Name: (empty)
Email: (empty)
Password: (empty)

Usage

Basic

vue
<template>
  <orio-input v-model="name" placeholder="Enter your name" />
</template>

<script setup>
const name = ref('')
</script>

With Label

vue
<orio-input
  v-model="email"
  label="Email Address"
  type="email"
  placeholder="you@example.com"
/>

Different Types

vue
<orio-input v-model="text" type="text" label="Text" />
<orio-input v-model="email" type="email" label="Email" />
<orio-input v-model="password" type="password" label="Password" />
<orio-input v-model="number" type="number" label="Age" />
<orio-input v-model="url" type="url" label="Website" />

Props

PropTypeDefaultDescription
modelValuestring-Input value (v-model)
labelstringundefinedLabel text displayed above input
placeholderstringundefinedPlaceholder text
typestring'text'HTML input type

All standard HTML input attributes are supported via v-bind="$attrs".

Events

EventPayloadDescription
update:modelValuestringEmitted when input value changes

Styling

css
--color-bg           /* Input background */
--color-border       /* Border color */
--color-text         /* Text color */
--color-accent       /* Focus border color */