Usage
Chat Composer Drawer presents attachments, feedback, progress, or context inside the Chat family while retaining the original consumer nodes.
import "@nordhealth/components/lib/ChatComposerDrawer"
Composition
Disclosure state
The presence of count enables disclosure behavior and displays the normalized item count. Omit open for uncontrolled behavior and use default-open only for the initial state. For controlled behavior, set the open JavaScript property and echo the proposed value from the bubbling nord-toggle event. label names the region and trigger.
Examples
Always-visible drawers
Drawers without disclosure configuration remain an always-visible composition region. The component never serializes, clones, or moves its consumer content.
Accessibility
The disclosure trigger exposes expanded state and controls the labelled Drawer host. Consumer content remains a direct child of that region, preserving framework ownership and its natural interaction order. Use a concise label which describes the content, and do not hide essential validation or blocking status inside a closed drawer.
Templates
See this component composed into complete application views:
API reference
ChatComposerDrawer
Collapsible Composer region for attachments, feedback, progress, or context.
Consumer nodes remain direct children so framework renderers retain ownership
of their DOM relationships. The host itself is the disclosure region.
The disclosure is intentionally a native button: Nord Button does not expose
aria-controls on its shadow-owned control, which this composite requires.
<nord-chat-composer-drawer></nord-chat-composer-drawer>Props
| Property | Attribute | Description | Type | Default |
|---|---|---|---|---|
open | open | Controlled open state. Leave undefined for uncontrolled state. | boolean | undefined | — |
defaultOpen | default-open | Initial uncontrolled state. | boolean | false |
label | label | Disclosure label. | string | undefined | — |
count | count | Optional item count. Its presence enables disclosure behavior. | number | undefined | — |
disabled | disabled | Prevents disclosure interaction. | boolean | false |
Slots
| Slot name | Description |
|---|---|
Default slot | Drawer content. |
| Event | Detail Type | Description |
|---|---|---|
nord-toggle | ChatComposerToggleEvent | Reports an open-state proposal. |
CSS Properties
CSS Custom Properties provide more fine grain control over component presentation. We advise utilizing existing properties on the component before using these.
| Property | Description | Default |
|---|---|---|
--n-chat-composer-drawer-max-block-size | Maximum expanded drawer size. | 20rem |
Dependencies
This component is internally dependent on the following components:
- <nord-badge>
Badge
Badges are used to inform users of the status of an object or of an action that’s been taken. Commonly used in tabular data to indicate status.
- <nord-icon>
Icon
Icons are used to provide additional meaning or in places where text label doesn’t fit. Icon component allows you to display an icon from the Nordicons library.