Skip to content
angulux
@anguless/angulux/inputtext

InputText

1 declaration4 demosinputtext.md
import
import { InputTextModule } from '@anguless/angulux/inputtext';

Basic

InputText is a directive, applied to a native input element so every attribute you already know keeps working.

<input aglInputText [(ngModel)]="value" placeholder="Name" />

Sizes

Size is set with aglSize, which accepts small and large.

<input aglInputText aglSize="small" [(ngModel)]="small" placeholder="Small" /><input aglInputText [(ngModel)]="normal" placeholder="Normal" /><input aglInputText aglSize="large" [(ngModel)]="large" placeholder="Large" />

Invalid

The invalid property styles the field as failing validation, independently of any forms API.

<input aglInputText [invalid]="!value" [(ngModel)]="value" placeholder="Required" />

Disabled

Disabling uses the native attribute, because the directive does not replace the element.

<input aglInputText [(ngModel)]="value" [disabled]="true" placeholder="Disabled" />

API

Generated from the committed corpus, which check:corpus holds to the built library.

InputText

directive[aglInputText]

InputText directive is an extension to standard input element with theming.

InputTypeDefaultDescription
hostNameanynot documented
ptInputText
deprecated — use pInputTextPT instead.
InputTextPassThrough undefined Used to pass attributes to DOM elements inside the InputText component.
pInputTextPTInputTextPassThrough undefined Used to pass attributes to DOM elements inside the InputText component.
pInputTextUnstyledboolean | undefined undefined Indicates whether the component should be rendered without styles.
aglSize'large' | 'small' | undefinednot documentedDefines the size of the component.
variant'filled' | 'outlined' | undefined undefined Specifies the input variant of the component.
fluid undefined Spans 100% width of the container when enabled.
invalid false When present, it specifies that the component should have invalid state style. Left unbound, an element bound through `formControlName`, `[formControl]` or `ngModel` shows the state of that control once it is touched or dirty.
touchedboolean | undefined undefined Whether the user has visited the field. Once this or `dirty` is set, the invalid state style waits for interaction: it appears when the field is touched or dirty. Signal Forms' `[formField]` sets both, so an untouched required field is not shown as invalid. Leave both unset and `invalid` alone decides.
dirtyboolean | undefined undefined Whether the user has changed the value. See `touched`.

Inherited from BaseComponent

inherited
InputTypeDefaultDescription
dtObject | undefined undefined Defines scoped design tokens of the component.
unstyledboolean | undefined undefined Indicates whether the component should be rendered without styles.
ptPT | undefined undefined Used to pass attributes to DOM elements inside the component. Keys become attributes, and a key that names a DOM property is also assigned to that property. Values the browser would execute go through Angular's sanitizer first, as in a template binding: markup in `innerHTML`, `outerHTML` and `srcdoc`, and URLs in `href`, `src`, `action`, `formaction` and `xlink:href`. To write one of those unsanitized on purpose, pass a `DomSanitizer.bypassSecurityTrustHtml` or `bypassSecurityTrustUrl` value. An `on*` key must be a function, and any other value for it is ignored. Keys themselves are applied as given, so let data from users choose values, never keys.
ptOptionsPassThroughOptions | undefined undefined Used to configure passthrough(pt) options of the component.