Skip to content

Search

Start typing to search.


Show all pages

Documentation

controls

Prompt input

A framed composer — a borderless textarea and a row of actions inside one bordered box.

NewCSS onlyPlain classes; no JavaScript in any stack.

Usage

The frame carries the border and the focus ring; the textarea inside stays naked.

HTML

Examples

Guidance and accessibility

When to use

  • Use the prompt input for a message composer — a chat box, an AI prompt — where a bare bordered textarea looks like a form field instead of a conversation.
  • The actions row holds buttons under the text: ca-button--icon for an attach or send button, plain ca-button variants for the rest.
  • A row of suggestions above the composer is a cluster of ca-button pills, not part of this contract.

Accessibility

  • The focus ring lands on the frame (through has-focus-visible), not the textarea — keyboard users see one ring for the whole composer.
  • The frame shows cursor: text; data-disabled on it dims the box and switches to the not-allowed cursor. Disable the real textarea too.
  • Give the textarea an accessible name with aria-label or a visible label, and label icon-only action buttons.

Classes

Generated from the component contract. Parts use __, modifiers use --.

Classes of the prompt-input component
ClassKindUse it for
ca-prompt-inputComponentThe frame; draws the box and the focus ring, and shows a text cursor.
ca-prompt-input__textareaPartThe borderless textarea inside the frame; autosize it with field-sizing or your own script.
ca-prompt-input__actionsPartA row for the controls under the text — attach, send.

Skins

The same markup, dressed by each skin. Structure and behavior stay the same; only the look changes.

Base skin

Neutral grayscale starting point; product skins extend it and change what differs.

Calaca skin

The Calaca UI brand: hueso paper and tinta ink, cempasúchil marigold, rosa and jade.

Bloque skin

Example skin pushed far from base: square, heavy, offset shadows, larger targets.

Pliego skin

Example skin from the press sheet: cool ground, bond-paper sheets, rule-grey hairlines, one red mark.

Framework notes

Link the prebuilt stylesheet of your skin next to your brand stylesheet. No build step.

HTML
<link rel="stylesheet" href="brand.css" />
<link rel="stylesheet" href="ca-base.css" />