Label

Form field label with required, invalid and disabled states.

A form field label. String children are wrapped in Label.Text for you.

Installation

Label ships with the library — no separate install.

import { Label, Input } from 'panelui-native';

Usage

<Label isRequired>Password</Label>
<Input placeholder="Create a password" secureTextEntry />

<Label>
  <Label.Text className="text-base font-semibold">API key</Label.Text>
</Label>

Composition

<Label>
  <Label.Text>…</Label.Text>
</Label>
  • Label.Text — The label text. Renders the required asterisk when the label is required.

API Reference

Label

PropTypeDefaultDescription
classNamestring
isRequiredbooleanAppends an asterisk marking the field as required.
isInvalidbooleanRecolours the label to signal a validation error.
isDisabledboolean

Label.Text

PropTypeDefaultDescription
classNamestring
asteriskClassNamestringClasses for the required asterisk.

Every part also accepts the underlying React Native props (ViewProps or TextProps) and a className for Tailwind utilities.

On this page