@anguless/angulux/focustrap
focustrap
1 declarations1 demos
import
import { FocusTrapModule } from '@anguless/angulux/focustrap';Basic
aglFocusTrap keeps keyboard focus inside its element, which is what makes a dialog usable without a mouse.
<div aglFocusTrap style="display: flex; gap: 0.75rem; flex-wrap: wrap; justify-content: center"> <input aglInputText placeholder="Tab stays inside" /> <input aglInputText placeholder="this group" /> <agl-button label="Submit" /></div>API
Generated from the committed corpus, which check:corpus holds to the built library.
FocusTrap
directive[aglFocusTrap]Focus Trap keeps focus within a certain DOM element while tabbing.
| Input | Type | Default | Description |
|---|---|---|---|
| aglFocusTrapDisabled | boolean | not documented | When set as true, focus wouldn't be managed. |
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. TRUSTED INPUT ONLY. Whatever you put here is applied to the DOM as given: keys become attributes, and a key that names a DOM property is assigned to that property directly, with no sanitizer in between. That is what makes the API useful, and it means a value reaching it from a user, a database or a CMS can execute script. Treat it like markup you wrote yourself, not like data you received. |
| ptOptions | PassThroughOptions | undefined | undefined | Used to configure passthrough(pt) options of the component. |