Docs / Components
SenseInplaceComponent
Inline display/edit toggle from @artificialsenselabs/ui with keyboard support and forms integration.
Live demo: run nx serve showcase and open /components/inplace (port 4202).
Overview
Category: Display. Selector: sense-inplace. Import: import { SenseInplaceComponent } from '@artificialsenselabs/ui';
<sense-inplace
[(ngModel)]="title"
(activated)="onEditStart()"
(deactivated)="onEditEnd()"
/> Project custom display or editor markup via [senseInplaceDisplay] and [senseInplaceContent].
Inputs & outputs
| Member | Type | Default | Description |
|---|---|---|---|
active | boolean | false | Two-way model โ edit region shown when true. |
value | string | '' | Current text value; two-way bindable via CVA. |
closable | boolean | false | Shows explicit close control in edit mode. |
displayLabel | string | null | null | Placeholder when value is empty; hides built-in value span. |
activated | void | โ | Emitted when entering edit mode. |
deactivated | void | โ | Emitted when returning to display mode. |
Accessibility
- Display mode uses an activator button with
aria-expandedandaria-controlsper the ARIA disclosure pattern. - Enter/Space activates edit mode; Escape returns to display and restores focus.
- Blur closes edit mode and returns focus to the activator.
- Implements
ControlValueAccessorfor Angular forms integration.