diff --git a/content/solid/composer.mdx b/content/solid/composer.mdx index 879f51a..86ea7fe 100644 --- a/content/solid/composer.mdx +++ b/content/solid/composer.mdx @@ -31,9 +31,19 @@ import { Composer } from "@/components/ui/composer" ```tsx const [text, setText] = React.useState("") - + ``` +`textareaProps` names and describes the input itself. It accepts `id`, `aria-label`, +`aria-labelledby`, and `aria-describedby`; use its `id` with an external label's +`htmlFor`. Other HTML attributes, including a top-level `id` or `aria-label`, +continue to apply to the outer wrapper. + ## While a turn runs The send mark has no block behind it in any state: its brightness says what it will do. With `running`, it is the quiet square that stops the turn, until something is typed, which is then sent behind it. @@ -52,6 +62,7 @@ The send mark has no block behind it in any state: its brightness says what it w | `onValueChange` | `(value: string) => void` | - | | `onSubmit` | `(value: string) => void` | - | | `onStop` | `() => void` | - | +| `textareaProps` | `Pick, "id" \| "aria-label" \| "aria-labelledby" \| "aria-describedby">` | - | | `running` | `boolean` | `false` | | `leading` | `ReactNode` | - | | `tags` | `ReactNode` | - | diff --git a/src/blocks/agent-workspace.tsx b/src/blocks/agent-workspace.tsx index 00da0d1..3466cee 100644 --- a/src/blocks/agent-workspace.tsx +++ b/src/blocks/agent-workspace.tsx @@ -564,6 +564,7 @@ export default function AgentWorkspace() {
void running?: boolean placeholder?: string + /** Names and describes the input; other HTML attributes belong to the wrapper. */ + textareaProps?: Pick, "id" | "aria-label" | "aria-labelledby" | "aria-describedby"> leading?: React.ReactNode tags?: React.ReactNode /** Stands above the line of text: pictures going with the message. */ @@ -115,6 +118,7 @@ function Composer({ mark is never left on a line of its own. */}