Docs / Infrastructure
SenseBindDirective
Attribute directive from @artificialsenselabs/ui that applies a map of DOM properties to the host, normalizing aria-* keys to camelCase equivalents.
Live demo: run nx serve showcase and open /guides/bind (port 4202).
Overview
Category: Infrastructure. Selector: [senseBind]. Import: import { SenseBindDirective } from '@artificialsenselabs/ui';
<button
[senseBind]="{ 'aria-expanded': open(), 'aria-controls': panelId }"
>
Menu
</button>Inputs
| Input | Type | Default | Description |
|---|---|---|---|
senseBind | Record<string, unknown> | {} | Map of DOM properties to apply. aria-* keys are normalized to camelCase. |
Behavior
- Removed keys are cleared when the host still holds the previously applied value.
- Use for composite widgets where several ARIA attributes change together.
- Prefer explicit bindings for single static attributes on simple elements.