Fulldev UI

Displays a form input field or a component that looks like an input field.

Your API key is encrypted and stored securely.

Installation

npx shadcn@latest add @fulldev/input

Usage

import { Input } from "@/components/ui/input"
<Input />

Input renders a native input and passes every attribute through, so use type, name, required, and disabled as in HTML. Pair it with Field for a label, description, and error.

Basic

Field

Use Field, FieldLabel, and FieldDescription to create an input with a label and description.

Choose a unique username for your account.

Field Group

Use FieldGroup to show multiple Field blocks and to build forms.

We'll send updates to this address.

Disabled

Use the disabled attribute to disable the input. To style the disabled state, add data-disabled="true" to the Field component.

This field is currently disabled.

Invalid

Use aria-invalid="true" to mark the input as invalid. To style the invalid state, add data-invalid="true" to the Field component.

This field contains validation errors.

File

Use type="file" to create a file input.

Select a picture to upload.

Inline

Use Field with orientation="horizontal" to create an inline input. Pair with Button to create a search input with a button.

Grid

Use a grid layout to place multiple inputs side by side.

Required

Use the required attribute to indicate required inputs.

This field must be filled out.

Badge

Use Badge in the label to highlight a recommended field.

Input Group

To add icons, text, or buttons inside an input, use Input Group.

https://

Button Group

To add buttons to an input, use Button Group.

Form

A full form example with multiple inputs, a select, and a button.

We'll never share your email with anyone.

RTL

مفتاح API الخاص بك مشفر ومخزن بأمان.

API Reference

Source: src/components/ui/input

Input accepts all native input attributes and class. It sets data-slot="input" (override it with data-slot) and renders multiple only when it is truthy.