HextaUI

Input: Long content

Long values scroll inside the field and long placeholders are cut off, without widening the layout.

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

export function InputLongContent() {
  return (
    <div className="flex w-full max-w-56 flex-col gap-3">
      <Input
        aria-label="URL"
        defaultValue="https://example.com/a/really/long/url/without/any/spaces/at/all"
      />
      <Input
        aria-label="Note"
        placeholder="A placeholder that is far too long to fit in this field"
      />
    </div>
  )
}

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

pnpm dlx shadcn@latest add https://hextaui.com/r/input-long-content.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
defaultValue
string | number | string[]–

Every prop is in the Input API reference.

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