Skip to content
Forms

Input

A single line of text: names, emails, search, numbers.

import { Input } from "@flinbu/seed";

Sizes

import { Input } from "@flinbu/seed";

<div className="flex w-full min-w-72 max-w-sm flex-col gap-sm">
  <Input size="sm" placeholder="Small" />
  <Input placeholder="Medium" />
  <Input size="lg" placeholder="Large" />
</div>

Icons, invalid and disabled

import { Input } from "@flinbu/seed";
import { Search, Mail } from "lucide-react";

<div className="flex w-full min-w-72 max-w-sm flex-col gap-sm">
  <Input leftIcon={<Search />} placeholder="Search tokens" />
  <Input leftIcon={<Mail />} type="email" defaultValue="ana@flinbu.co" invalid />
  <Input placeholder="Disabled" disabled />
</div>

Use it for

  • Short free text. Wrap it in Field for a label, hint and error.

Use something else for

  • More than one line: use Textarea.

Props

PropTypeDefaultDescription
size'sm' | 'md' | 'lg''md'sm 32px, md 40px, lg 48px.
invalidbooleannoneError border and aria-invalid. Field sets it from error.
leftIconIconPropnoneIcon inside the start of the field. An element like <Search /> (works in server components) or, in client components, the component itself.
rightIconIconProp | ReactNodenoneAn icon, or a small ghost Button for an action (clear, show password).
…InputHTMLAttributesnoneEvery native input prop is passed to the <input>; ref points to it.
classNamestringnoneExtra classes. They win over Seed's, so you can adjust one thing without forking.

Accessibility

  • Inside Field it gets its id, aria-describedby and aria-invalid automatically.
  • Placeholder text is never the label.