Anatomy
aegov-input renders a real native <input> inside a small wrapper that adds icon slots and, for password/copyable fields, an inset action button.

| Item | Name | Description |
|---|---|---|
1 |
Icon slot | Optional leading icon (icon-start) |
2 |
Native input | The real <input> element — receives all typing, autofill, and focus |
3 |
Action button | Password reveal or copy-to-clipboard button, inset at the trailing edge |
4 |
Hint / error region | Validation text, then helper text, rendered below the field — the hint stays visible while an error shows |
Input types
type maps directly to the native HTML input type. Use text for general fields, email for addresses (triggers email keyboards on mobile), tel for phone numbers, number for fees and amounts, and search/url for the obvious cases.
<aegov-form-field>
<aegov-label>Full name</aegov-label>
<aegov-input type="text"></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Email address</aegov-label>
<aegov-input type="email" placeholder="you@example.gov.ae"></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Mobile number</aegov-label>
<aegov-input type="tel" placeholder="+971 50 000 0000"></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Number of dependants</aegov-label>
<aegov-input type="number"></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Search services</aegov-label>
<aegov-input type="search"></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Website</aegov-label>
<aegov-input type="url" placeholder="https://"></aegov-input>
</aegov-form-field>
import { AegovFormField, AegovLabel, AegovInput } from '@aegov/designsystem-react';
export default function InputTypes() {
return (
<>
<AegovFormField>
<AegovLabel>Full name</AegovLabel>
<AegovInput type="text" />
</AegovFormField>
<AegovFormField>
<AegovLabel>Email address</AegovLabel>
<AegovInput type="email" placeholder="you@example.gov.ae" />
</AegovFormField>
<AegovFormField>
<AegovLabel>Mobile number</AegovLabel>
<AegovInput type="tel" placeholder="+971 50 000 0000" />
</AegovFormField>
<AegovFormField>
<AegovLabel>Number of dependants</AegovLabel>
<AegovInput type="number" />
</AegovFormField>
<AegovFormField>
<AegovLabel>Search services</AegovLabel>
<AegovInput type="search" />
</AegovFormField>
<AegovFormField>
<AegovLabel>Website</AegovLabel>
<AegovInput type="url" placeholder="https://" />
</AegovFormField>
</>
);
}
<template>
<aegov-form-field>
<aegov-label>Full name</aegov-label>
<aegov-input type="text"></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Email address</aegov-label>
<aegov-input type="email" placeholder="you@example.gov.ae"></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Mobile number</aegov-label>
<aegov-input type="tel" placeholder="+971 50 000 0000"></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Number of dependants</aegov-label>
<aegov-input type="number"></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Search services</aegov-label>
<aegov-input type="search"></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Website</aegov-label>
<aegov-input type="url" placeholder="https://"></aegov-input>
</aegov-form-field>
</template>
import { Component } from '@angular/core';
import { AegovFormField, AegovLabel, AegovInput } from '@aegov/designsystem-angular';
@Component({
selector: 'app-input-types',
imports: [AegovFormField, AegovLabel, AegovInput],
template: `
<aegov-form-field>
<aegov-label>Full name</aegov-label>
<aegov-input type="text"></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Email address</aegov-label>
<aegov-input type="email" placeholder="you@example.gov.ae"></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Mobile number</aegov-label>
<aegov-input type="tel" placeholder="+971 50 000 0000"></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Number of dependants</aegov-label>
<aegov-input type="number"></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Search services</aegov-label>
<aegov-input type="search"></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Website</aegov-label>
<aegov-input type="url" placeholder="https://"></aegov-input>
</aegov-form-field>
`,
})
export class InputTypesComponent {}
Sizes
size accepts five tokens — xs, sm, base (default), lg, and xl — scaling height, padding, and font size together. It also accepts a Tailwind-style responsive string (e.g. size="sm md:base xl:lg") to resize across breakpoints.
<aegov-form-field>
<aegov-label>Extra small (xs)</aegov-label>
<aegov-input size="xs"></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Small (sm)</aegov-label>
<aegov-input size="sm"></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Base (default)</aegov-label>
<aegov-input size="base"></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Large (lg)</aegov-label>
<aegov-input size="lg"></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Extra large (xl)</aegov-label>
<aegov-input size="xl"></aegov-input>
</aegov-form-field>
import { AegovFormField, AegovLabel, AegovInput } from '@aegov/designsystem-react';
export default function InputSizes() {
return (
<>
<AegovFormField>
<AegovLabel>Extra small (xs)</AegovLabel>
<AegovInput size="xs" />
</AegovFormField>
<AegovFormField>
<AegovLabel>Small (sm)</AegovLabel>
<AegovInput size="sm" />
</AegovFormField>
<AegovFormField>
<AegovLabel>Base (default)</AegovLabel>
<AegovInput size="base" />
</AegovFormField>
<AegovFormField>
<AegovLabel>Large (lg)</AegovLabel>
<AegovInput size="lg" />
</AegovFormField>
<AegovFormField>
<AegovLabel>Extra large (xl)</AegovLabel>
<AegovInput size="xl" />
</AegovFormField>
</>
);
}
<template>
<aegov-form-field>
<aegov-label>Extra small (xs)</aegov-label>
<aegov-input size="xs"></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Small (sm)</aegov-label>
<aegov-input size="sm"></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Base (default)</aegov-label>
<aegov-input size="base"></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Large (lg)</aegov-label>
<aegov-input size="lg"></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Extra large (xl)</aegov-label>
<aegov-input size="xl"></aegov-input>
</aegov-form-field>
</template>
import { Component } from '@angular/core';
import { AegovFormField, AegovLabel, AegovInput } from '@aegov/designsystem-angular';
@Component({
selector: 'app-input-sizes',
imports: [AegovFormField, AegovLabel, AegovInput],
template: `
<aegov-form-field>
<aegov-label>Extra small (xs)</aegov-label>
<aegov-input size="xs"></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Small (sm)</aegov-label>
<aegov-input size="sm"></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Base (default)</aegov-label>
<aegov-input size="base"></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Large (lg)</aegov-label>
<aegov-input size="lg"></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Extra large (xl)</aegov-label>
<aegov-input size="xl"></aegov-input>
</aegov-form-field>
`,
})
export class InputSizesComponent {}
Variant
variant selects the colour family for the idle border and value text. The focus ring stays camel and the error border stays red regardless of variant — both are accessibility constants that never change.
| Variant | Idle border | Value text |
|---|---|---|
primary |
primary-600 |
primary-900 |
secondary |
secondary-600 |
secondary-900 |
neutral-max |
aeblack-800 |
aeblack-950 |
neutral-min |
aeblack-400 |
aeblack-700 |
<aegov-form-field>
<aegov-label>Primary</aegov-label>
<aegov-input variant="primary"></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Secondary</aegov-label>
<aegov-input variant="secondary"></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Neutral-max</aegov-label>
<aegov-input variant="neutral-max"></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Neutral-min</aegov-label>
<aegov-input variant="neutral-min"></aegov-input>
</aegov-form-field>
import { AegovFormField, AegovLabel, AegovInput } from '@aegov/designsystem-react';
export default function InputVariants() {
return (
<>
<AegovFormField>
<AegovLabel>Primary</AegovLabel>
<AegovInput variant="primary" />
</AegovFormField>
<AegovFormField>
<AegovLabel>Secondary</AegovLabel>
<AegovInput variant="secondary" />
</AegovFormField>
<AegovFormField>
<AegovLabel>Neutral-max</AegovLabel>
<AegovInput variant="neutral-max" />
</AegovFormField>
<AegovFormField>
<AegovLabel>Neutral-min</AegovLabel>
<AegovInput variant="neutral-min" />
</AegovFormField>
</>
);
}
<template>
<aegov-form-field>
<aegov-label>Primary</aegov-label>
<aegov-input variant="primary"></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Secondary</aegov-label>
<aegov-input variant="secondary"></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Neutral-max</aegov-label>
<aegov-input variant="neutral-max"></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Neutral-min</aegov-label>
<aegov-input variant="neutral-min"></aegov-input>
</aegov-form-field>
</template>
import { Component } from '@angular/core';
import { AegovFormField, AegovLabel, AegovInput } from '@aegov/designsystem-angular';
@Component({
selector: 'app-input-variants',
imports: [AegovFormField, AegovLabel, AegovInput],
template: `
<aegov-form-field>
<aegov-label>Primary</aegov-label>
<aegov-input variant="primary"></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Secondary</aegov-label>
<aegov-input variant="secondary"></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Neutral-max</aegov-label>
<aegov-input variant="neutral-max"></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Neutral-min</aegov-label>
<aegov-input variant="neutral-min"></aegov-input>
</aegov-form-field>
`,
})
export class InputVariantsComponent {}
States
Set is-disabled to prevent any interaction (the field keeps its value but drops out of the tab order); is-readonly to show a value the user can still focus, select, and copy but not edit; and is-required to add native required validation.
<aegov-form-field>
<aegov-label>Emirates ID number</aegov-label>
<aegov-input is-disabled="true" value="784-1990-1234567-1"></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Application number</aegov-label>
<aegov-input is-readonly="true" value="APP-2026-008421"></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Full name *</aegov-label>
<aegov-input is-required="true" placeholder="Required field"></aegov-input>
</aegov-form-field>
import { AegovFormField, AegovLabel, AegovInput } from '@aegov/designsystem-react';
export default function InputStates() {
return (
<>
<AegovFormField>
<AegovLabel>Emirates ID number</AegovLabel>
<AegovInput isDisabled value="784-1990-1234567-1" />
</AegovFormField>
<AegovFormField>
<AegovLabel>Application number</AegovLabel>
<AegovInput isReadonly value="APP-2026-008421" />
</AegovFormField>
<AegovFormField>
<AegovLabel>Full name *</AegovLabel>
<AegovInput isRequired placeholder="Required field" />
</AegovFormField>
</>
);
}
<template>
<aegov-form-field>
<aegov-label>Emirates ID number</aegov-label>
<aegov-input is-disabled="true" value="784-1990-1234567-1"></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Application number</aegov-label>
<aegov-input is-readonly="true" value="APP-2026-008421"></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Full name *</aegov-label>
<aegov-input is-required="true" placeholder="Required field"></aegov-input>
</aegov-form-field>
</template>
import { Component } from '@angular/core';
import { AegovFormField, AegovLabel, AegovInput } from '@aegov/designsystem-angular';
@Component({
selector: 'app-input-states',
imports: [AegovFormField, AegovLabel, AegovInput],
template: `
<aegov-form-field>
<aegov-label>Emirates ID number</aegov-label>
<aegov-input [isDisabled]="true" value="784-1990-1234567-1"></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Application number</aegov-label>
<aegov-input [isReadonly]="true" value="APP-2026-008421"></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Full name *</aegov-label>
<aegov-input [isRequired]="true" placeholder="Required field"></aegov-input>
</aegov-form-field>
`,
})
export class InputStatesComponent {}
Invalid state
Set is-invalid="true" together with error-message (or an error slot placed inside aegov-input) to show a validation error. The error border and message appear while an error is shown; any hint stays visible below the message, since the hint (format, length, where to find the value) is most needed exactly then.
<aegov-form-field><aegov-label>Email address</aegov-label><aegov-input type="email" value="not-an-email" is-invalid="true" error-message="Enter a valid email in the format name@example.gov.ae."></aegov-input></aegov-form-field>
import { AegovFormField, AegovLabel, AegovInput } from '@aegov/designsystem-react';
export default function InputInvalid() {
return (
<AegovFormField>
<AegovLabel>Email address</AegovLabel>
<AegovInput
type="email"
value="not-an-email"
isInvalid
errorMessage="Enter a valid email in the format name@example.gov.ae."
/>
</AegovFormField>
);
}
<template>
<aegov-form-field>
<aegov-label>Email address</aegov-label>
<aegov-input
type="email"
value="not-an-email"
is-invalid="true"
error-message="Enter a valid email in the format name@example.gov.ae."
></aegov-input>
</aegov-form-field>
</template>
import { Component } from '@angular/core';
import { AegovFormField, AegovLabel, AegovInput } from '@aegov/designsystem-angular';
@Component({
selector: 'app-input-invalid',
imports: [AegovFormField, AegovLabel, AegovInput],
template: `
<aegov-form-field>
<aegov-label>Email address</aegov-label>
<aegov-input
type="email"
value="not-an-email"
[isInvalid]="true"
errorMessage="Enter a valid email in the format name@example.gov.ae."
></aegov-input>
</aegov-form-field>
`,
})
export class InputInvalidComponent {}
Icons
Use the icon-start slot for a leading icon (search, mail, lock) and icon-end for a trailing icon. Omit width/height on the SVG so the component can size it to match the field's size token.
<aegov-form-field>
<aegov-label>Search services</aegov-label>
<aegov-input>
<svg slot="icon-start" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="11" cy="11" r="8"></circle>
<path d="M21 21l-4.35-4.35"></path>
</svg>
</aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Email address</aegov-label>
<aegov-input type="email" placeholder="you@example.gov.ae">
<svg slot="icon-start" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<rect x="3" y="5" width="18" height="14" rx="2"></rect>
<path d="m3 7 9 6 9-6"></path>
</svg>
</aegov-input>
</aegov-form-field>
import { AegovFormField, AegovLabel, AegovInput } from '@aegov/designsystem-react';
export default function InputIcons() {
return (
<>
<AegovFormField>
<AegovLabel>Search services</AegovLabel>
<AegovInput>
<svg slot="icon-start" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
<circle cx="11" cy="11" r="8"></circle>
<path d="M21 21l-4.35-4.35"></path>
</svg>
</AegovInput>
</AegovFormField>
<AegovFormField>
<AegovLabel>Email address</AegovLabel>
<AegovInput type="email" placeholder="you@example.gov.ae">
<svg slot="icon-start" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
<rect x="3" y="5" width="18" height="14" rx="2"></rect>
<path d="m3 7 9 6 9-6"></path>
</svg>
</AegovInput>
</AegovFormField>
</>
);
}
<template>
<aegov-form-field>
<aegov-label>Search services</aegov-label>
<aegov-input>
<svg slot="icon-start" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="11" cy="11" r="8"></circle>
<path d="M21 21l-4.35-4.35"></path>
</svg>
</aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Email address</aegov-label>
<aegov-input type="email" placeholder="you@example.gov.ae">
<svg slot="icon-start" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<rect x="3" y="5" width="18" height="14" rx="2"></rect>
<path d="m3 7 9 6 9-6"></path>
</svg>
</aegov-input>
</aegov-form-field>
</template>
import { Component } from '@angular/core';
import { AegovFormField, AegovLabel, AegovInput } from '@aegov/designsystem-angular';
@Component({
selector: 'app-input-icons',
imports: [AegovFormField, AegovLabel, AegovInput],
template: `
<aegov-form-field>
<aegov-label>Search services</aegov-label>
<aegov-input>
<svg slot="icon-start" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="11" cy="11" r="8"></circle>
<path d="M21 21l-4.35-4.35"></path>
</svg>
</aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Email address</aegov-label>
<aegov-input type="email" placeholder="you@example.gov.ae">
<svg slot="icon-start" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<rect x="3" y="5" width="18" height="14" rx="2"></rect>
<path d="m3 7 9 6 9-6"></path>
</svg>
</aegov-input>
</aegov-form-field>
`,
})
export class InputIconsComponent {}
Password reveal
Set is-revealable="true" together with type="password" to add a show/hide toggle. Useful on sign-in and password-creation screens where users frequently mistype.
<aegov-form-field><aegov-label>Password</aegov-label><aegov-input type="password" is-revealable="true"></aegov-input></aegov-form-field>
import { AegovFormField, AegovLabel, AegovInput } from '@aegov/designsystem-react';
export default function InputPasswordReveal() {
return (
<AegovFormField>
<AegovLabel>Password</AegovLabel>
<AegovInput type="password" isRevealable />
</AegovFormField>
);
}
<template>
<aegov-form-field>
<aegov-label>Password</aegov-label>
<aegov-input type="password" is-revealable="true"></aegov-input>
</aegov-form-field>
</template>
import { Component } from '@angular/core';
import { AegovFormField, AegovLabel, AegovInput } from '@aegov/designsystem-angular';
@Component({
selector: 'app-input-password-reveal',
imports: [AegovFormField, AegovLabel, AegovInput],
template: `
<aegov-form-field>
<aegov-label>Password</aegov-label>
<aegov-input type="password" [isRevealable]="true"></aegov-input>
</aegov-form-field>
`,
})
export class InputPasswordRevealComponent {}
Copy to clipboard
Set is-copyable="true" together with is-readonly="true" to add a button that copies the current value. It briefly switches to a check mark for feedback. Use this for application reference numbers or generated tokens.
<aegov-form-field><aegov-label>Application number</aegov-label><aegov-input is-readonly="true" is-copyable="true" value="APP-2026-008421"></aegov-input></aegov-form-field>
import { AegovFormField, AegovLabel, AegovInput } from '@aegov/designsystem-react';
export default function InputCopyable() {
return (
<AegovFormField>
<AegovLabel>Application number</AegovLabel>
<AegovInput isReadonly isCopyable value="APP-2026-008421" />
</AegovFormField>
);
}
<template>
<aegov-form-field>
<aegov-label>Application number</aegov-label>
<aegov-input is-readonly="true" is-copyable="true" value="APP-2026-008421"></aegov-input>
</aegov-form-field>
</template>
import { Component } from '@angular/core';
import { AegovFormField, AegovLabel, AegovInput } from '@aegov/designsystem-angular';
@Component({
selector: 'app-input-copyable',
imports: [AegovFormField, AegovLabel, AegovInput],
template: `
<aegov-form-field>
<aegov-label>Application number</aegov-label>
<aegov-input [isReadonly]="true" [isCopyable]="true" value="APP-2026-008421"></aegov-input>
</aegov-form-field>
`,
})
export class InputCopyableComponent {}
Input group with add-ons
aegov-input-group wraps an aegov-input (and optionally an aegov-button) to add a static prefix and/or suffix, or a trailing action button. It propagates its size to every child so everything lines up, and its variant cascades to a child that hasn't set its own. The prefix and suffix text is added to the input's description, so a screen reader announces it with the field. Inside a group, the child input's hint or error is shown below the whole group, and while the input is invalid the group shows the error in place of the hint.
<aegov-form-field>
<aegov-label>Amount</aegov-label>
<aegov-input-group addon-prefix="AED">
<aegov-input type="number" placeholder="0.00"></aegov-input>
</aegov-input-group>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Service web address</aegov-label>
<aegov-input-group addon-suffix=".gov.ae">
<aegov-input placeholder="myservice"></aegov-input>
</aegov-input-group>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Search services</aegov-label>
<aegov-input-group size="lg">
<aegov-input type="search"></aegov-input>
<aegov-button variant="primary">Search</aegov-button>
</aegov-input-group>
</aegov-form-field>
import { AegovFormField, AegovLabel, AegovInputGroup, AegovInput, AegovButton } from '@aegov/designsystem-react';
export default function InputGroupAddons() {
return (
<>
<AegovFormField>
<AegovLabel>Amount</AegovLabel>
<AegovInputGroup addonPrefix="AED">
<AegovInput type="number" placeholder="0.00" />
</AegovInputGroup>
</AegovFormField>
<AegovFormField>
<AegovLabel>Service web address</AegovLabel>
<AegovInputGroup addonSuffix=".gov.ae">
<AegovInput placeholder="myservice" />
</AegovInputGroup>
</AegovFormField>
<AegovFormField>
<AegovLabel>Search services</AegovLabel>
<AegovInputGroup size="lg">
<AegovInput type="search" />
<AegovButton variant="primary">Search</AegovButton>
</AegovInputGroup>
</AegovFormField>
</>
);
}
<template>
<aegov-form-field>
<aegov-label>Amount</aegov-label>
<aegov-input-group addon-prefix="AED">
<aegov-input type="number" placeholder="0.00"></aegov-input>
</aegov-input-group>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Service web address</aegov-label>
<aegov-input-group addon-suffix=".gov.ae">
<aegov-input placeholder="myservice"></aegov-input>
</aegov-input-group>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Search services</aegov-label>
<aegov-input-group size="lg">
<aegov-input type="search"></aegov-input>
<aegov-button variant="primary">Search</aegov-button>
</aegov-input-group>
</aegov-form-field>
</template>
import { Component } from '@angular/core';
import { AegovFormField, AegovLabel, AegovInputGroup, AegovInput, AegovButton } from '@aegov/designsystem-angular';
@Component({
selector: 'app-input-group-addons',
imports: [AegovFormField, AegovLabel, AegovInputGroup, AegovInput, AegovButton],
template: `
<aegov-form-field>
<aegov-label>Amount</aegov-label>
<aegov-input-group addon-prefix="AED">
<aegov-input type="number" placeholder="0.00"></aegov-input>
</aegov-input-group>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Service web address</aegov-label>
<aegov-input-group addon-suffix=".gov.ae">
<aegov-input placeholder="myservice"></aegov-input>
</aegov-input-group>
</aegov-form-field>
<aegov-form-field>
<aegov-label>Search services</aegov-label>
<aegov-input-group size="lg">
<aegov-input type="search"></aegov-input>
<aegov-button variant="primary">Search</aegov-button>
</aegov-input-group>
</aegov-form-field>
`,
})
export class InputGroupAddonsComponent {}
Composing with Form Field
Pair aegov-input with aegov-label and aegov-form-field for a fully accessible field. Place hint/error content directly inside aegov-input itself — either the plain-text hint/error-message props, or the hint/error slots — so it's genuinely linked via aria-describedby, not just visually placed nearby.
<aegov-form-field>
<aegov-label>Emirates ID number *</aegov-label>
<aegov-input is-required="true" placeholder="784-YYYY-NNNNNNN-N" hint="15 digits, found on the front of your Emirates ID card."></aegov-input>
</aegov-form-field>
import { AegovFormField, AegovLabel, AegovInput } from '@aegov/designsystem-react';
export default function InputFormField() {
return (
<AegovFormField>
<AegovLabel>Emirates ID number *</AegovLabel>
<AegovInput
isRequired
placeholder="784-YYYY-NNNNNNN-N"
hint="15 digits, found on the front of your Emirates ID card."
/>
</AegovFormField>
);
}
<template>
<aegov-form-field>
<aegov-label>Emirates ID number *</aegov-label>
<aegov-input
is-required="true"
placeholder="784-YYYY-NNNNNNN-N"
hint="15 digits, found on the front of your Emirates ID card."
></aegov-input>
</aegov-form-field>
</template>
import { Component } from '@angular/core';
import { AegovFormField, AegovLabel, AegovInput } from '@aegov/designsystem-angular';
@Component({
selector: 'app-input-form-field',
imports: [AegovFormField, AegovLabel, AegovInput],
template: `
<aegov-form-field>
<aegov-label>Emirates ID number *</aegov-label>
<aegov-input
[isRequired]="true"
placeholder="784-YYYY-NNNNNNN-N"
hint="15 digits, found on the front of your Emirates ID card."
></aegov-input>
</aegov-form-field>
`,
})
export class InputFormFieldComponent {}
RTL support
Layout, icon slots, and the reveal/copy buttons all use CSS logical properties, so they swap sides automatically under dir="rtl". aegov-input-group add-ons flip too — a prefix ends up on the right, a suffix on the left.
<div dir="rtl">
<aegov-form-field>
<aegov-label>رقم الهوية الإماراتية *</aegov-label>
<aegov-input placeholder="784-YYYY-NNNNNNN-N" is-required="true" hint="خمسة عشر رقماً موجودة على الجهة الأمامية من بطاقة الهوية."></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>رقم الهاتف المتحرك</aegov-label>
<aegov-input-group addon-prefix="+971">
<aegov-input type="tel" placeholder="50 000 0000"></aegov-input>
</aegov-input-group>
</aegov-form-field>
</div>
import { AegovFormField, AegovLabel, AegovInput, AegovInputGroup } from '@aegov/designsystem-react';
export default function RtlInput() {
return (
<div dir="rtl">
<AegovFormField>
<AegovLabel>رقم الهوية الإماراتية *</AegovLabel>
<AegovInput
placeholder="784-YYYY-NNNNNNN-N"
isRequired
hint="خمسة عشر رقماً موجودة على الجهة الأمامية من بطاقة الهوية."
/>
</AegovFormField>
<AegovFormField>
<AegovLabel>رقم الهاتف المتحرك</AegovLabel>
<AegovInputGroup addonPrefix="+971">
<AegovInput type="tel" placeholder="50 000 0000" />
</AegovInputGroup>
</AegovFormField>
</div>
);
}
<template>
<div dir="rtl">
<aegov-form-field>
<aegov-label>رقم الهوية الإماراتية *</aegov-label>
<aegov-input
placeholder="784-YYYY-NNNNNNN-N"
is-required="true"
hint="خمسة عشر رقماً موجودة على الجهة الأمامية من بطاقة الهوية."
></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>رقم الهاتف المتحرك</aegov-label>
<aegov-input-group addon-prefix="+971">
<aegov-input type="tel" placeholder="50 000 0000"></aegov-input>
</aegov-input-group>
</aegov-form-field>
</div>
</template>
import { Component } from '@angular/core';
import { AegovFormField, AegovLabel, AegovInput, AegovInputGroup } from '@aegov/designsystem-angular';
@Component({
selector: 'app-rtl-input',
imports: [AegovFormField, AegovLabel, AegovInput, AegovInputGroup],
template: `
<div dir="rtl">
<aegov-form-field>
<aegov-label>رقم الهوية الإماراتية *</aegov-label>
<aegov-input
placeholder="784-YYYY-NNNNNNN-N"
[isRequired]="true"
hint="خمسة عشر رقماً موجودة على الجهة الأمامية من بطاقة الهوية."
></aegov-input>
</aegov-form-field>
<aegov-form-field>
<aegov-label>رقم الهاتف المتحرك</aegov-label>
<aegov-input-group addon-prefix="+971">
<aegov-input type="tel" placeholder="50 000 0000"></aegov-input>
</aegov-input-group>
</aegov-form-field>
</div>
`,
})
export class RtlInputComponent {}
Usage
Here is the recommended usage of an input on any website or application. These are recommended usage guides, however the developer must use the best practices of web and application development to accurately use this component.
Match type to the data being collected
email, tel, and number trigger the right on-screen keyboard on mobile and add free built-in validation — a plain text field gets neither.
Pair with aegov-label inside aegov-form-field
Gives the field a real, persistent accessible name instead of relying on placeholder text, which disappears the moment a value is typed.
Place hint/error content inside aegov-input itself
A hint/error slot only gets picked up when it's a direct child of aegov-input — put it there (or use the plain-text hint/error-message props) so it's genuinely wired into aria-describedby, not just visually nearby.
Reserve is-revealable/is-copyable for their one real purpose
is-revealable only ever matters on a real type="password" field; is-copyable only takes effect once is-readonly="true" is also set — reaching for either outside that pairing renders nothing extra.
Don't use type="password" for anything a user needs to compare or read aloud
One-time codes and confirmation PINs are usually typed once and checked visually — a plain text (or otp-style) field with inputmode="numeric" reads better than a masked password field with a reveal toggle bolted on.
Don't rely on placeholder as a substitute label
It vanishes as soon as the user starts typing, so anyone who returns to the field later — or a screen reader announcing it fresh — has nothing to go on. Use it only for a format example, alongside a real label.
API reference
The following are the properties and references of an input
aegov-input properties
| Attribute | Description | Type | Default |
|---|---|---|---|
| DOM |
| auto-generated |
| Native input type — determines on-screen keyboard, autofill hints, and built-in validation. |
|
|
| Field size token. Accepts a responsive breakpoint string (e.g. |
|
|
| Colour family for the idle border and value text. The focus ring follows the variant's support colour (camel for |
|
|
| Current value. Mutable — kept in sync internally on every |
|
|
| Placeholder text shown when the field is empty. |
| none |
| Native |
| none |
| Disables the input and removes it from the tab order. |
|
|
| Displays a value the user cannot edit, but can still focus, select, and (with |
|
|
| Sets the native |
|
|
| Shows a show/hide toggle button. Only takes effect when |
|
|
| Shows a copy-to-clipboard button. Only takes effect when |
|
|
| Puts the field into error state — sets |
|
|
| Inline error text shown when |
|
|
| Helper text shown below the field. It stays visible while an error shows (below the error message), and both describe the field. Use the |
|
|
| Additional CSS classes applied to the native |
| none |
This component renders inside a real shadow DOM, so extra-class only applies margin/padding (spacing) utilities — e.g. mt-4, md:px-6. Colour, border, typography, and every other visual utility are silently ignored: this is an isolated component whose internal styles can't be overridden, keeping it visually consistent wherever it's used.
aegov-input-group properties
| Attribute | Description | Type | Default |
|---|---|---|---|
| Group size, propagated to every child |
|
|
| Colour family, cascaded to a child that hasn't set its own. |
|
|
| Accessible label for the group wrapper (sets |
| none |
| Static text shown before the input (logical start — flips under RTL). |
| none |
| Static text shown after the input (logical end — flips under RTL). |
| none |
| Additional CSS classes applied to the group wrapper. |
| none |
Slots
| Component | Slot | Description |
|---|---|---|
| (default) | Not used directly — content belongs in the named slots below. |
|
| Icon shown before the value (logical start). |
|
| Icon shown after the value. Hidden automatically while a reveal/copy button is active. |
|
| Rich hint markup, in place of the plain-text |
|
| Rich error markup, in place of the plain-text |
| (default) | Place one |
Events
| Event | Detail | Description |
|---|---|---|
|
| Fires on every keystroke. |
|
| Fires when the value commits (native |
|
| Fires when the input gains focus. |
|
| Fires when the input loses focus. |
|
| Fires on input/change/blur/manual |
Pass-through attributes
| Attribute | Notes | Forwards to |
|---|---|---|
| Forwarded to the native input, except | inner |
| Standard validation-related attributes. | inner |
| Browser/keyboard hints. | inner |
| Remaining standard input attributes. | inner |
| Not forwarded — use | n/a |
| Applied to the host element — stays host-only, never forwarded inward. | host |
Notes
The following notes are applicable of this component.
Built-in accessibility
aegov-inputrenders a real native<input>, preserving native semantics, keyboard handling, autofill, and assistive-technology behaviour.- The label reaches the native
<input>inside the shadow DOM. ID references can't cross that boundary on their own, so the component resolves each naming source to text and gives it to the inner input:aegov-labelinsideaegov-form-field, anaegov-label for="…"pointing at the host'sidorfield-id, a native<label for="…">pointing at the host'sid, andaria-label/aria-labelledbyset on the host. - An
aria-describedbyyou set on the host is handled the same way: the referenced text becomes part of the input's description, read before the component's own error and hint. is-requiredsets the nativerequiredattribute, exposing the requirement to assistive tech automatically.- The reveal and copy buttons each carry a descriptive, bilingual
aria-label("Show password"/"Hide password", "Copy to clipboard") and sit in the natural tab order. The copy button keeps its name after a copy; a visually hiddenrole="status"region announces "Copied" instead. - Decorative SVG icons inside the reveal/copy buttons are
aria-hidden="true". hint/error-message(or thehint/errorslots), when set directly onaegov-input, are wired to the native input'saria-describedbyautomatically (the hint stays visible and described while an error shows), and the error region only takesrole="alert"after the user has blurred the field once, the form has reported it invalid (on submit orcheckValidity()), orvalidate('submit')has run — so a validation message present at initial load isn't announced as an interruption.aegov-input-grouprendersrole="group"and forwards consumeraria-*attributes to it, exceptaria-label; usegroup-labelfor the accessible name, or add your ownaria-labelledbyto reference an external heading.
Developer responsibilities
- Always provide a visible label —
aegov-labelinsideaegov-form-fieldis the preferred pattern. For an unlabelled input (e.g. an icon-only search field), setaria-labelon the host yourself. - Place hint/error content as a direct child of
aegov-inputitself (or use the plain-texthint/error-messageprops) — content placed elsewhere, such as a plain paragraph besideaegov-inputinsideaegov-form-field, is not linked to the field. (An element inaegov-form-field's ownhintslot is the exception: the wrapper links it to the input for you.) - Choose the right
typefor the data being collected — it drives on-screen keyboards, autofill, and built-in validation. - Set
autocompleteon fields that collect the user's own details — for exampleautocomplete="name","email","tel","street-address","postal-code"— so the browser can fill them in and users don't have to retype them (WCAG 1.3.5 Identify Input Purpose). The attribute is passed through to the native input. - For password reveal, remember the toggle only changes what's visible locally — it doesn't warn anyone else who might be looking at the screen.
- For copyable fields, make sure the value is safe to sit in the user's clipboard history.
- Handle form submission yourself. When the browser blocks a submit (for example a required field is empty), it only shows its own temporary bubble, in the browser's language: the field gets no error text on the page and no
aria-invalid. Use the whole-form validation pattern: on submit, callvalidate('submit')on each field and setis-invalidanderror-messagefrom the result, so every error is shown, announced and stays on screen.
Keyboard support
| Key | Function |
|---|---|
Tab |
Move focus into the input, then to the reveal/copy button (if shown), then to the next field. |
Shift + Tab |
Move focus to the previous focusable element. |
Enter |
Commit the value (fires aegovInputChange) and submits the surrounding form. |
| Standard text editing | All native shortcuts apply — selection, cursor movement, cut/copy/paste. |