Rebar UI

1.0

imitation

Input

A text field.

Text fieldLabel, search, mask
Empty
Error

Pick a date in October.

Disabled
Long text
Sizes

In context

Invite dialogTwo fields and a primary action

Invite to Tideline

Password reveal

Input, revealableAn eye toggle at the end of a password field

Only you can read your journal. We cannot reset this.

Hidden
Controlled, revealed
Error
Disabled
Unlock and createIn context

Reconciliation journal

Unlock

Enter your passphrase

Forgot your passphrase?

Reconciliation journal

Create

Choose a passphrase

The passphrases do not match.

Type, padding and focus tokens

Tokens--rebar-input-* set size, padding, border, radius, fill, colour, focus ring and disabled look; type="date" gives the native date field.

Props

PropTypeRequiredDefault
size"sm" | "md" | "lg" | undefinedNomd
invalidboolean | undefinedNo—
maskstring | undefinedNo—
revealableboolean | { visible: boolean; onVisibleChange?: ((visible: boolean) => void) | undefined; } | undefinedNo—
autoHideboolean | undefinedNo—
startIconReactNodeNo—
fieldStyle"solid" | "translucent" | undefinedNo—
revealIcons{ show: ReactNode; hide: ReactNode; } | undefinedNo—
revealStyle"default" | "plain" | undefinedNo—
toggleLabels{ show: string; hide: string; } | undefinedNo—

Accessibility

A plain <input>: wrap it in a <label> or pass aria-label. mask shapes what is typed (9 digit, a letter, * any, other characters are literals); it does not validate, so pair it with pattern or required and say the constraint in words.

data-rebar-* attributes

data-rebar-size on the element; otherwise a native <input> with every native attribute passed through.

Migrating to Ant Design

Not codemod-covered: AntD's Input has no mask. A masked field needs a mask library alongside AntD's Input.

fieldStyle, revealIcons, revealStyle

fieldStyle="translucent" is a glass field for photo or dark surfaces (--rebar-auth-field-* tokens). revealIcons={{ show, hide }} swaps the eye glyphs and revealStyle="plain" makes the eye a bare 70% glyph inset by --rebar-input-reveal-inset.