Simal UI
Components

Field

The standard web form input: a label above an inset well.

It is web-only — field.web.tsx has no native counterpart, so the bare specifier resolves here and nowhere else.

The well has a transparent 1.5px border at rest rather than no border, so focusing the field paints the ring without shifting the row it sits in.

Import

import { Field } from '@simal/ui/nativewindui';

Props

PropValuesDefaultDescription
label"Legal name"Sits above the input and stays visible. This is not a placeholder.
placeholder"Simal Ventures Pvt. Ltd."Hint shown only while the field is empty.
errorAny non-empty string turns the label and border red and renders the message below. Presence is the trigger; there is no separate hasError.
disabledbooleanfalseDims the well and blocks input. The field keeps its height, so a disabled row does not reflow.
numericbooleanfalseStrips every non-digit on change and switches the keyboard to a number pad. Use for IDs and counts, not for currency.
prefixStatic text rendered inside the well before the input, such as a currency symbol or dial code.
value""Makes the field controlled. Pair with onChangeText or it will not accept typing.
onChangeTextRequired. Receives the new value on every keystroke.
onBlurFires after focus leaves. Use it to run validation once rather than per keystroke.

Examples

States

The three states a field can be in, stacked so the well colours are comparable.

With Error

The error message replaces nothing — it is added below, so the row grows.

With Prefix

A prefix sits inside the well, so it reads as part of the value rather than a separate control.

In A Grid

Two fields on one row is the dense-grid case the 48px height was chosen for.

On this page