Skip to content

Input ​

Form input field built on Nuxt UI with label, hint, error handling, and optional password toggle.

vue
<script setup lang="ts">
import RyderInput from "@opeolluwa/ryder/components/primitives/Input.vue"
import { ref } from "vue";

const email = ref("");
</script>

<template>
  <RyderInput v-model="email" name="email" label="Email" />
</template>

Examples ​

vue
<script setup lang="ts">
import Input from "../../../src/components/primitives/Input.vue";
import { ref } from "vue";

const value = ref("");
</script>

<template>
  <div class="flex flex-col gap-4">
    <Input
      v-model="value"
      label="Email"
      name="email"
      placeholder="Enter your email"
    />
    <p class="text-sm text-muted">{{ value }}</p>
  </div>
</template>

Props ​

PropTypeDefaultDescription
labelstringundefinedField label.
namestringundefinedField name for form validation.
iconstringundefinedLeading icon name.
placeholderstringundefinedPlaceholder text.
hintstringundefinedHint text below field.
disabledbooleanfalseDisable the input.
typestring"text"Input type (e.g., text, password, email).
enablePasswordTogglebooleantrueShow password visibility toggle when type is password.
trailingIconstringundefinedTrailing icon name.
size"xs" | "sm" | "md" | "lg" | "xl""md"Input size.
inputClassstringundefinedAdditional classes for input base.
labelClassstringundefinedAdditional classes for label.

Emits ​

None declared — model updates and native events fall through.

Slots ​

None.

Notes ​

  • Uses v-model with defineModel<string>().
  • For password inputs, toggles visibility with internal ref.
  • Adjusts placeholder size based on size prop.