Controls

Input

Preview
Reduced motion

Simulates prefers-reduced-motion for the demo. Off follows your system setting.

Keyboard stepping

Steps focus through the demo with ] and [. Tab, arrows, and Escape stay native so the component behaves as shipped.

Input

Input

A text field whose label floats up out of the way as you type.

Installation

npx shadcn@latest add ikislay/pixel-ui/input

How to use

import { Input } from "@/components/ui/input"
export function Demo() {
return <Input label="Email" type="email" />
}

Source Code

// Loading…

Props

Options you can pass to customize this component.

Prop
Type
Description
label*
string

The field's name. It doubles as the placeholder and stays visible once filled.

error
ReactNode

An error message. Setting it marks the field invalid and announces the message.

onFeedback
(event: "error") => void

Called at each semantic moment, for wiring sound or haptics.

className
string

Merged onto the wrapper. Other props go to the input.