@anguless/angulux/autofocus
AutoFocus
import
import { AutoFocusModule } from '@anguless/angulux/autofocus';Basic
aglAutoFocus puts the cursor in a field as soon as it renders.
<input aglInputText [aglAutoFocus]="true" placeholder="Focused on load" />API
Generated from the committed corpus, which check:corpus holds to the built library.
AutoFocus
directive[aglAutoFocus]AutoFocus manages focus on focusable element on load.
| Input | Type | Default | Description |
|---|---|---|---|
| agl property autofocus | boolean | not documented | When present, it specifies that the component should automatically get focus on load. |
Inherited from BaseComponent
inherited| Input | Type | Default | Description |
|---|---|---|---|
| dt | Object | undefined | undefined | Defines scoped design tokens of the component. |
| unstyled | boolean | undefined | undefined | Indicates whether the component should be rendered without styles. |
| pt | PT | 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. |
| pt | PassThroughOptions | undefined | undefined | Used to configure passthrough(pt) options of the component. |