4.2.0
Core

Input

A single-line text field on its own — the moment anything attaches to it, that is an `InputGroup` and not a nested `Input`.

Default

Pair every input with a Label; the Label owns the `htmlFor` wiring.

Usage

import { Input } from '@oceanic-hub/brand-system'

Always pair it with a Label; a placeholder is not a label, and it disappears exactly when a person needs it. Mark a failed field with aria-invalid and a FormMessage, which carries a stuck mark and ink words. aria-invalid turns the border solid stuck on the control itself (@OCE-1877), and a wrapping Field with data-invalid or an InputGroup paints the same line, so the state survives whichever of the three a surface happens to wire. A border on its own is never enough, because it says nothing to a screen reader and nothing about what is wrong. Textarea is the multi-line sibling, and the choice is the content's own shape rather than a size preference — neither grows into the other.

Several upstream examples are layout, not this component, and are refused rather than duplicated. Field Group, Inline and Grid are all Field/FieldGroup orientation and composition — the same Input either way — and are demonstrated on Field's own page. Badge is a decorative label pairing, not an input capability. Required's asterisk is content, per Label's own refusal of a marker prop, so it is composed at the call site rather than documented twice. Input Group and Button Group are each a different, superset component with its own page, and they take opposite children: inside an InputGroup the group owns the surface, so InputGroupInput belongs there and a raw Input gives you a field inside a field; inside a ButtonGroup nothing supplies a surface, so a raw Input is correct and InputGroupInput would render as a hole. One border each.

RTL is not supported. Nothing in this package has ever been laid out or measured right-to-left; the refusal is package-wide, recorded in pairings.json under direction (@OCE-1779).

States

Disabled and read-only render differently on purpose: one refuses, one informs. Invalid is the third, and aria-invalid paints it on the control itself — no wrapper required, though a Field around it adds the sentence that says what is wrong.

In a field

Field adds the help text and the vertical rhythm a bare Label next to an Input does not carry on its own — reach for it the moment the field needs a sentence under it.

Shown in the "from" line of every email this sequence sends.

File

type="file" styles the drop zone through file: utilities on the same Input; the OS still owns the picker itself, which is why the border and background come from className rather than a new prop.

CSV only, one row per contact, up to 10,000 rows.

The dense form scale

size="sm" is h-8 — the same step NativeSelect and the sm Button already sit at, so four controls in a row land on one line instead of three heights. Before this axis existed a dense form got a 32px select beside a 40px input, and the only fix was a height override in className: a copy of a metric that cannot follow a token rename. Textarea takes the axis too, because otherwise the mismatch just moves one control along — there sm lowers the height floor and tightens padding, since a textarea's height is rows and the caller's. The native character-width size={40} still works and still means what HTML means by it.

API Reference

See the Input API page for every prop of every part, with types, defaults and the contract that pins them.

On this page