Skip to content

Input

Text input component with label, icon slots, and layout support.

Live Demo

Vertical (default)

With Icons

Horizontal

Inner

Inner with Icons

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"
/>

With Icons

vue
<orio-input v-model="search" placeholder="Search...">
  <template #before>
    <orio-icon name="search" />
  </template>
</orio-input>

<orio-input v-model="password" type="password" label="Password">
  <template #before>
    <orio-icon name="lock" />
  </template>
  <template #after>
    <orio-icon name="eye" />
  </template>
</orio-input>

Horizontal Layout

vue
<orio-input v-model="city" label="City" layout="horizontal" />

Inner Layout

vue
<orio-input v-model="name" label="Full Name" layout="inner" />

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)
layout"vertical" | "horizontal" | "inner""vertical"Label position relative to input
labelstringundefinedLabel text
placeholderstringundefinedPlaceholder text
typestring"text"HTML input type

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

Slots

SlotDescription
beforeContent placed before the input (e.g. icon)
afterContent placed after the input (e.g. icon)

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 */
--color-accent-soft  /* Focus ring color */
--color-muted        /* Placeholder and inner label color */