• Primary
    Surface
    Theme
    AuraMaterialLaraNora
    Ripple
  • Get PrimeUI
Get PrimeUI
  • Guides
  • Components
  1. PRO Suite
    1. Charts
    2. Scheduler
    3. Task Board
    4. Text Editor
    5. DataGridRoadmap
    6. SheetRoadmap
    7. Gantt ChartRoadmap
    8. DiagramRoadmap
    9. PDF ViewerRoadmap
  2. Form
    1. AutoComplete
    2. CascadeSelect
    3. Checkbox
    4. DatePicker
    5. FloatLabel
    6. IconField
    7. IftaLabel
    8. InputColor
    9. InputGroup
    10. InputMask
    11. InputNumber
    12. InputOtp
    13. InputPassword
    14. InputTags
    15. InputText
    16. KeyFilter
    17. Knob
    18. Label
    19. Listbox
    20. RadioButton
    21. Rating
    22. Select
    23. SelectButton
    24. Slider
    25. Textarea
    26. ToggleButton
    27. ToggleSwitch
    28. TreeSelect
  3. Button
    1. Button
    2. SpeedDial
    3. SplitButton
  4. Data
    1. DataView
    2. OrderList
    3. OrgChart
    4. Paginator
    5. PickList
    6. Table
    7. Timeline
    8. Tree
    9. TreeTable
    10. VirtualScroller
  5. Panel
    1. Accordion
    2. Card
    3. Divider
    4. Fieldset
    5. Panel
    6. ScrollArea
    7. Splitter
    8. Stepper
    9. Tabs
    10. Toolbar
  6. Overlay
    1. ConfirmDialog
    2. ConfirmPopup
    3. Dialog
    4. Drawer
    5. DynamicDialog
    6. Popover
    7. Tooltip
  7. File
    1. FileUpload
  8. Menu
    1. Breadcrumb
    2. CommandMenu
    3. ContextMenu
    4. Dock
    5. MegaMenu
    6. Menu
    7. Menubar
    8. Sidebar
    9. TieredMenu
  9. Messages
    1. Message
    2. Toast
  10. Media
    1. Carousel
    2. Compare
    3. Gallery
  11. Misc
    1. AnimateOnScroll
    2. AutoFocus
    3. Avatar
    4. Badge
    5. Bind
    6. BlockUI
    7. Chip
    8. ClassNames
    9. Fluid
    10. FocusTrap
    11. Inplace
    12. MeterGroup
    13. ProgressBar
    14. ProgressSpinner
    15. Ripple
    16. ScrollTop
    17. Skeleton
    18. StyleClass
    19. Tag
    20. Terminal
  12. Utilities
    1. FilterService
ComponentsMisc

AutoFocus

AutoFocus manages focus on focusable element on load.

AutoFocus is applied to any focusable input element with the pAutoFocus directive.

PREVIEW

Usage #

Examples #

Basic #

AutoFocus is applied to any focusable input element with the pAutoFocus directive.

basic-demo
Resources
View as Markdown Open in Github Open in ChatGPT Open in Claude
On this page
  • Usage
  • Examples
  • Basic
UsageOn this page 1/3
  • Usage
  • Examples
  • Basic
PrimeNG 22.1.0 by PrimeUI
©2026 PrimeTek