ArtificialSenseDocs

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

MemberTypeDefaultDescription
activebooleanfalseTwo-way model โ€” edit region shown when true.
valuestring''Current text value; two-way bindable via CVA.
closablebooleanfalseShows explicit close control in edit mode.
displayLabelstring | nullnullPlaceholder when value is empty; hides built-in value span.
activatedvoidโ€”Emitted when entering edit mode.
deactivatedvoidโ€”Emitted when returning to display mode.

Accessibility

  • Display mode uses an activator button with aria-expanded and aria-controls per 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 ControlValueAccessor for Angular forms integration.