Skip to content
Okaapiأوكابي
Framework for the code
Theme
Okaapi on GitHub

Chapter 04 Fields

Input group

A text field with fixed text inside its box, before or after the value: a currency, a unit, a domain. The text is read with the field, so 'Price, EGP' is heard, but it is never part of the value.

Use it in Angular
import { TextFieldComponent } from '@okaapi-ui/angular';

Before and after

Set prefix or suffix on a text field.

EGP
kg
https://.okaapi.shop
Angular
<ui-text-field label="Price" type="number" prefix="EGP" />
<ui-text-field label="Weight" type="number" suffix="kg" />
<ui-text-field label="Shop address" prefix="https://" suffix=".okaapi.shop" />

In Arabic

جنيه
Angular
<ui-text-field label="السعر" type="number" suffix="جنيه" />

When to use something else

If you needUse
A number with − and + buttonsNumber field
A phone number with its country codePhone field
A search box with a clear buttonSearch field

Inputs

NameTypeDefaultWhat it does
prefixstring — Text before the value, such as "EGP". Read after the label.
suffixstring — Text after the value, such as "kg" or ".com".
labelstring — Required. Every other Text field option works too: see Text field.

Keyboard and screen readers

  • The text before or after the value is read with the field, such as Price, EGP, but is never part of the value.