Skip to main content

Skeletons.Messenger

A rich message input for chat and messaging interfaces. Combines text entry with send behavior, auto-focus, auto-clear, and optional file upload support.


Signature

Skeletons.Messenger(props, style?)

Common Props

PropTypeDescription
classNameStringCSS class(es) to apply
sys_pnStringNamed part — enables onPartReady and ensurePart
uiHandlerWidgetRoutes interaction events to onUiEvent
serviceStringService triggered when the message is sent
modeString"commit" to send on Enter key
contentStringPre-fill the input with existing content
autofocusNumber1 to focus the input automatically on render
autoclearNumber1 to clear the input after sending
no_uploadNumber1 to disable file attachment support
bubbleNumber0 to prevent the event from bubbling up
datasetObjectdata-* attributes — e.g. { mode: "open" }

Examples

Standard chat messenger

Skeletons.Messenger({
className: `${fig}__messenger`,
sys_pn: "message",
mode: "commit",
service: "send",
autofocus: 1,
autoclear: 1,
bubble: 0,
content: ui.getStoredMessage(),
dataset: { mode: "open" },
uiHandler: ui,
});

Text-only messenger (no file upload)

Skeletons.Messenger({
className: `${fig}__messenger`,
sys_pn: "message",
mode: "commit",
autofocus: 1,
autoclear: 1,
no_upload: 1,
dataset: { mode: "open" },
uiHandler: ui,
});