HomeDocsComponentsBlocksChartsThemes
Introduction
  • Introduction
  • Installation
  • Themes
  • Artwork
  • llms.txt
Components
  • Accordion
  • Alert
  • Alert Dialog
  • Amount
  • Aspect Ratio
  • Audio Player
  • Avatar
  • Avatar Upload
  • Badge
  • Banner
  • Brand SVG
  • Breadcrumb
  • Button
  • Button Group
  • Calendar
  • Card
  • Carousel
  • Chart
  • Checkbox
  • Code Block
  • Collapsible
  • Color Picker
  • Combobox
  • Command
  • Context Menu
  • Copy Button
  • Countdown
  • Data Grid
  • Data Table
  • Date Picker
  • Date Range Picker
  • Description List
  • Device Mockup
  • Dialog
  • Direction
  • Dot Loader
  • Drawer
  • Dropdown Menu
  • Empty
  • Field
  • File Upload
  • Form Guide
  • Hover Card
  • Icon Tile
  • Image Export
  • Input
  • Input Group
  • Input OTP
  • Item
  • Kanban
  • Kbd
  • Label
  • League Table
  • Marquee
  • Match Score
  • Meter
  • Multi Select
  • Native Select
  • Number Field
  • Pagination
  • Password Strength
  • Phone Input
  • Popover
  • Progress
  • Progress Circle
  • Radio Group
  • Rating
  • Resizable
  • Responsive Dialog
  • Rich Text Editor
  • Scroll Area
  • Segmented Control
  • Select
  • Separator
  • Sheet
  • Sidebar
  • Signature
  • Skeleton
  • Slider
  • Sonner
  • Sortable
  • Spinner
  • Stat
  • Stat Tabs
  • Stepper
  • Switch
  • Table
  • Tabs
  • Tag Input
  • Terminal
  • Textarea
  • Time Field
  • Timeline
  • Toast
  • Toggle
  • Toggle Group
  • Tooltip
  • Tree
  • Typography
  • Video Player
  • Window Mockup
  • Accordion
  • Alert
  • Alert Dialog
  • Amount
  • Aspect Ratio
  • Audio Player
  • Avatar
  • Avatar Upload
  • Badge
  • Banner
  • Brand SVG
  • Breadcrumb
  • Button
  • Button Group
  • Calendar
  • Card
  • Carousel
  • Chart
  • Checkbox
  • Code Block
  • Collapsible
  • Color Picker
  • Combobox
  • Command
  • Context Menu
  • Copy Button
  • Countdown
  • Data Grid
  • Data Table
  • Date Picker
  • Date Range Picker
  • Description List
  • Device Mockup
  • Dialog
  • Direction
  • Dot Loader
  • Drawer
  • Dropdown Menu
  • Empty
  • Field
  • File Upload
  • Form Guide
  • Hover Card
  • Icon Tile
  • Image Export
  • Input
  • Input Group
  • Input OTP
  • Item
  • Kanban
  • Kbd
  • Label
  • League Table
  • Marquee
  • Match Score
  • Menubar
  • Meter
  • Multi Select
  • Native Select
  • Navigation Menu
  • Number Field
  • Pagination
  • Password Strength
  • Phone Input
  • Popover
  • Progress
  • Progress Circle
  • Radio Group
  • Rating
  • Resizable
  • Responsive Dialog
  • Rich Text Editor
  • Scroll Area
  • Segmented Control
  • Select
  • Separator
  • Sheet
  • Sidebar
  • Signature
  • Skeleton
  • Slider
  • Sortable
  • Spinner
  • Stat
  • Stat Tabs
  • Stepper
  • Switch
  • Table
  • Tabs
  • Tag Input
  • Terminal
  • Textarea
  • Time Field
  • Timeline
  • Toast
  • Toggle
  • Toggle Group
  • Tooltip
  • Tree
  • Typography
  • Video Player
  • Window Mockup
  • Accordion
  • Alert
  • Alert Dialog
  • Amount
  • Aspect Ratio
  • Audio Player
  • Avatar
  • Avatar Upload
  • Badge
  • Banner
  • Brand SVG
  • Breadcrumb
  • Button
  • Button Group
  • Calendar
  • Card
  • Carousel
  • Cart Button
  • Cart Line Item
  • Cart Summary
  • Chart
  • Checkbox
  • Code Block
  • Collapsible
  • Color Picker
  • Combobox
  • Command
  • Context Menu
  • Copy Button
  • Countdown
  • Data Grid
  • Data Table
  • Date Picker
  • Date Range Picker
  • Description List
  • Device Mockup
  • Dialog
  • Direction
  • Dot Loader
  • Drawer
  • Dropdown Menu
  • Empty
  • Field
  • Fill Blank
  • File Icon
  • File Upload
  • Form Guide
  • Hover Card
  • Icon Tile
  • Image Export
  • Input
  • Input Group
  • Input OTP
  • Item
  • Kanban
  • Kbd
  • Label
  • League Table
  • Marquee
  • Match Score
  • Menubar
  • Meter
  • Multi Select
  • Native Select
  • Navigation Menu
  • Number Field
  • Pagination
  • Password Strength
  • Person Avatar
  • Phone Input
  • Popover
  • Price
  • Product Card
  • Progress
  • Progress Circle
  • Radio Group
  • Rating
  • Resizable
  • Responsive Dialog
  • Rich Text Editor
  • Scroll Area
  • Segmented Control
  • Select
  • Separator
  • Sheet
  • Sidebar
  • Signature
  • Skeleton
  • Slider
  • Sonner
  • Sortable
  • Spinner
  • Stat
  • Stat Tabs
  • Stepper
  • Switch
  • Table
  • Tabs
  • Tag Input
  • Terminal
  • Textarea
  • Time Field
  • Timeline
  • Toast
  • Toggle
  • Toggle Group
  • Tooltip
  • Tree
  • Typography
  • Video Player
  • Window Mockup
  • Accordion
  • Alert Dialog
  • Alert
  • Amount
  • Aspect Ratio
  • Audio Player
  • Avatar Upload
  • Avatar
  • Badge
  • Banner
  • Bot Avatar
  • Brand SVG
  • Breadcrumb
  • Button Group
  • Button
  • Calendar
  • Card
  • Carousel
  • Cart Button
  • Cart Line Item
  • Cart Summary
  • Chart
  • Checkbox
  • Code Block
  • Collapsible
  • Color Picker Primitive
  • Combobox
  • Command
  • Context Menu
  • Copy Button
  • Countdown
  • Data Grid
  • Data Table
  • Date Picker
  • Date Range Picker
  • Description List
  • Device Mockup
  • Dialog
  • Direction
  • Dot Loader
  • Drawer
  • Dropdown Menu
  • Empty
  • Field
  • File Icon
  • File Upload
  • Fill Blank
  • Form Guide
  • Hover Card
  • Icon Tile
  • Image Export
  • Input Group
  • Input OTP
  • Input
  • Item
  • Kanban
  • Kbd
  • Label
  • League Table
  • Marquee
  • Match Score
  • Menubar
  • Meter
  • Multi Select
  • Native Select
  • Navigation Menu
  • Number Field
  • Pagination
  • Password Strength
  • Person Avatar
  • Phone Input
  • Popover
  • Price
  • Product Card
  • Progress Circle
  • Progress
  • Radio Group
  • Rating
  • Resizable
  • Responsive Dialog
  • Rich Text Editor
  • Scroll Area
  • Segmented Control
  • Select
  • Separator
  • Sheet
  • Sidebar
  • Signature
  • Skeleton
  • Slider
  • Sonner
  • Sortable
  • Spinner
  • Stat Tabs
  • Stat
  • Stepper
  • Switch
  • Table
  • Tabs
  • Tag Input
  • Terminal
  • Textarea
  • Time Field
  • Timeline
  • Toggle Group
  • Toggle
  • Tooltip
  • Tree
  • Video Player
  • Window Mockup
AI
  • Message Scroller
  • Message
  • Bubble
  • Marker
  • Attachment
  • Questionnaire
  • Composer
  • Reasoning
  • Tool Call
  • Approval Card
  • Citations
  • Message Toolbar
Blocks
  • Airtable
  • Airtable Kanban
  • CRM
  • ClickUp List
  • ClickUp Kanban
  • Repeatable Group
  • Command Palette
  • App Shell
  • Record Files
  • Settings Shell
  • Help Panel
  • Note Editor
  • Email Drafts
  • Task List
  • Notifications Panel
  • Dual Pane Sidebar
  • Team Members Panel
  • Mix Pack Builder
  • Record Picker and Date Quick-pick
  • Record List
  • Record Page
  • Sign In and Sign Up
  • Availability Scheduler
  • AI Chat
  • AI Assistant
  • Voice Message
  • Action Bar
  • Notion
  • Banking
  • Lineup Builder
  • Sports Score
  • Standings
  • Strava
  • Sheets
  • Notices
  • Settings
  • Billing
Templates
  • Sign In Page
  • Upload Page
  • Showcase Onboarding
  • Agreement Sign
  • Email
  • Email Composer
  • Share Dialog
  • Integrations
  • Transactions
  • Analytics
Utilities
  • motion
  • sounds
  • scroll-fade
  • shimmer
Another UI. Built on shadcn/ui with Phosphor icons.

Input

PreviousNext

A text input component for forms and user data entry with built-in styling and accessibility features.

UI SDKBase UIReact AriaRadix UI

Your API key is encrypted and stored securely.

import {
  Field,
  FieldDescription,

Installation#

pnpm dlx shadcn@latest add https://anotherui.dev/r/another/ui-sdk-nova/input.json

Usage#

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

Basic#

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

export function InputBasic() {

Field#

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

Choose a unique username for your account.

import {
  Field,
  FieldDescription,

Field Group#

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

We'll send updates to this address.

import { Button } from "@/components/ui/button"
import {
  Field,

Disabled#

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

This field is currently disabled.

import {
  Field,
  FieldDescription,

Invalid#

Use the aria-invalid prop to mark the input as invalid. To style the invalid state, add the data-invalid attribute to the Field component.

This field contains validation errors.

import {
  Field,
  FieldDescription,

Sizes#

Input, Input Group, Select and Native Select take the same size as Button: xs, sm, default or lg. Each size has one height for all of them, so a field, a menu and a button of the same size always line up in a toolbar. Icon buttons are squares of the same heights.

xs
sm
default
lg
<div className="flex items-center gap-2">
  <InputGroup size="sm">…</InputGroup>
  <SelectTrigger size="sm">…</SelectTrigger>
  <Button size="sm">Apply</Button>
</div>
SizeHeight
xs30px
sm34px
default42px
lg46px

Ghost#

Use variant="ghost" for a field with no frame, fill or focus ring, like the subject line of an email or an inline title. Put it on a surface that already shows where it is, such as a card with separators.

File#

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

Select a picture to upload.

import {
  Field,
  FieldDescription,

Inline#

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

import { Button } from "@/components/ui/button"
import { Field } from "@/components/ui/field"
import { Input } from "@/components/ui/input"

Grid#

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

import { Field, FieldGroup, FieldLabel } from "@/components/ui/field"
import { Input } from "@/components/ui/input"

Required#

Use the required attribute to indicate required inputs.

This field must be filled out.

import {
  Field,
  FieldDescription,

Badge#

Use Badge in the label to highlight a recommended field.

import { Badge } from "@/components/ui/badge"
import { Field, FieldLabel } from "@/components/ui/field"
import { Input } from "@/components/ui/input"

Input Group#

To add icons, text, or buttons inside an input, use the InputGroup component. See the Input Group component for more examples.

https://
import { InfoIcon } from "@phosphor-icons/react"

import { Field, FieldLabel } from "@/components/ui/field"

Button Group#

To add buttons to an input, use the ButtonGroup component. See the Button Group component for more examples.

import { Button } from "@/components/ui/button"
import { ButtonGroup } from "@/components/ui/button-group"
import { Field, FieldLabel } from "@/components/ui/field"

Form#

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

We'll never share your email with anyone.

import { Button } from "@/components/ui/button"
import {
  Field,

RTL#

To enable RTL support, see the RTL configuration guide.

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

"use client"

import * as React from "react"
Input OTPItem

On This Page

InstallationUsageBasicFieldField GroupDisabledInvalidSizesGhostFileInlineGridRequiredBadgeInput GroupButton GroupFormRTL