← All proposals

Composer

A labelled textarea with a toolbar inside the same bordered box:

Net-new componentOpen in Storybook

proposals/Composer/custom.md31 lines · View on GitHub

Custom and net-new: Composer

Everything in this proposal that is not plain PDS v2. npm run check:tokens reads this file: each net-new class, custom CSS variable and raw value found in the code must appear here in backticks.

Net-new components

  • .pds-composer — Textarea-style field with a toolbar inside it (aboveField, fieldHeader, actionsStart / actionsEnd slots).
    • Parts and modifiers: .pds-composer--compact, .pds-composer--m, .pds-composer__above-field, .pds-composer__actions, .pds-composer__actions-end, .pds-composer__actions-start, .pds-composer__drop-label, .pds-composer__field-header, .pds-composer__row, .pds-composer__field, .pds-composer__textarea

Net-new code (not a component)

  • useFileDrop (proposals/_base/useFileDrop/useFileDrop.ts) — new, shared by Composer and Chat Panel: file drag and drop (drag counter, only file drags react, a drop a child already handled is skipped, off while disabled). Returns isDragOver, canDrop and the four handlers. The toolkit has src/utilities/hooks/, where it would go.

Additions to existing PDS components

None.

Net-new props

All props of ComposerProps are new (net-new component), in alphabetical order: aboveField, actionsEnd, actionsStart, className, defaultValue, disabled, dropLabel, fieldHeader, id, isResizable, label, message, onChange, onFilesDrop, placeholder, rows, showLabel, size, textareaProps, value, variant. Most mirror Textarea (defaultValue, disabled, id, isResizable, label, message, onChange, placeholder, rows, showLabel, size, textareaProps, value). Genuinely new: aboveField, actionsEnd, actionsStart, dropLabel, fieldHeader, onFilesDrop, variant.

The pds-is-drag-over state class is new, following the pds-is-resizable / pds-is-disabled pattern.

Custom CSS variables

  • --composer-padding — set on .pds-composer

Raw values kept on purpose

None. The drop label's font size is the package class pds-copy-s (2026-11-20), so the size token that was in the CSS for it is gone.