AutoFocus manages focus on focusable element on load.
import { AutoFocusModule } from 'primeng/autofocus';
AutoFocus is applied to any focusable input element on initial load. It's disabled by default and needs to be enabled manually.
<input type="text" pInputText pAutoFocus [autofocus]="true" placeholder="Automatically focused" />
API defines helper props, events and others for the PrimeNG AutoFocus module.
Name | Type | Default | Description |
---|---|---|---|
autofocus | boolean | null | When present, it specifies that the component should automatically get focus on load. |