Docs / Components
SenseAutoFocusDirective
Focuses the host element or a descendant selector after view init from @artificialsenselabs/ui. Skips when another element already has focus.
Live demo: run nx serve showcase and open /components/auto-focus (port 4202).
Overview
Category: Infrastructure. Selector: [senseAutoFocus]. Import: import { SenseAutoFocusDirective } from '@artificialsenselabs/ui';
Accessibility
- Focuses only when no other element is already focused in the document.
- Warns in dev mode when the target is not programmatically focusable.
- Set
disabledto opt out without removing the directive.