Skip to Content
Forms & Inputs@hacline/ui/input

Input

A text input built on @ui-sdk/react/input supporting variants and sizes, InputGroup prefix/suffix composition, one-click clearing, and input filtering.

Imports

import {
  Input,
  InputAddon,
  InputClear,
  InputGroup,
} from "@/components/ui/hacline/components/input";

Variants

Switch between the standard outline (default) and filled background (filled) styles via variant.

Sizes

Supports three sizes — sm, md (default), and lg — aligned with Button heights.

Input Group & Clear Button

Wrap Input, InputAddon, and InputClear inside InputGroup: borders and focus rings are managed by the outer container, clicking prefix text focuses the input, and the clear button appears automatically when there is content.

https://

Clicking the prefix focuses the input; press Esc to clear.

Input Filtering

Call details.cancel() inside onValueChange to block disallowed input while automatically restoring the previous value and caret position.

Invalid characters are blocked via `details.cancel()` without moving the cursor.

Read-only & Disabled

Props

Input

Prop

Type

Also inherits all native <input> HTML attributes and ref.

InputGroup

Prop

Type