Skip to content
↑↓ to navigate↵ to openesc to close

Menu

Input

Preview

Install

Add it with your package manager, or copy the source manually.

Run it in a project set up with shadcn-vue. The source is copied to components/beui and its dependencies are added to your package.json. Read the shadcn-vue guide

bunx --bun shadcn-vue@latest add @beui-vue/input

Import the shared styles once in your application.

TSUsage
import Input from '@/components/beui/controls/Input.vue'
import '@/components/beui/styles.css'

API Reference

label?
string
Default—
v-model?
string

Controlled text. Use `v-model`.

Default—
defaultValue?
string

Initial text of an uncontrolled field. Bind `v-model` instead to control it.

Default—
error?
string | boolean

Truthy error triggers a shake, red border and (if a string) a message.

Default—
reserveErrorLine?
boolean

Reserve one message line so validation does not shift nearby content.

Defaultfalse
success?
boolean
Default—
#leftIcon?
slot
Default—
#rightIcon?
slot
Default—
class?
string
Default—
classNames?
InputClassNames

Extra classes for the inner parts of the field.

Default—
id?
string
Default—
Also on React Native. Error shake, focus ring and a drawn success check.(opens in a new tab)

Updated