HextaUI

Input: Sizes

sm, default and lg match the button heights, so an input and a button of the same size line up in a row.

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

export function InputSizes() {
  return (
    <div className="flex w-full max-w-sm flex-col gap-3">
      <Input size="sm" aria-label="Small" placeholder="Small" />
      <Input aria-label="Default" placeholder="Default" />
      <Input size="lg" aria-label="Large" placeholder="Large" />
    </div>
  )
}

This adds the example as components/examples/input/sizes.tsx, together with the Input component and the HextaUI theme tokens it needs.

pnpm dlx shadcn@latest add https://hextaui.com/r/input-sizes.json

To add only the component, follow the Input installation.

Props in this example

The Input props this example sets, from the API reference.

PropTypeDefault
sizeHeight and padding, matched to the buttons.
"sm" | "default" | "lg""default"

Every prop is in the Input API reference.

See them all, with keyboard support and accessibility notes, on the Input page.