Button
Gen UI 2.0 standardSends its onClick event; with href it opens the URL, with copy it copies the text. Variant "primary" for the one main Button in a Row. submit true submits the Form around it. Its children render instead of the label. With checks it is disabled while a check fails.
One of the 69 components in CopilotKit's standardUI. The playground's catalog extends it, so every agent here can use Button. Standard catalog docs
Props
Read from standardUI.manifestComponents in the installed @copilotkit/react-core. In A2UI 1.0 any value may also be a { "@path" } binding into the surface data model or a { "@call" } function call.
| Prop | Type | Required | Description |
|---|---|---|---|
| label | string | No | The button text |
| onClick | Action (event or functionCall) | No | Sent when the user clicks the button. |
| checks | { condition?, message? }[] | No | Validation rules. The control shows the first failed one |
| text | string | No | Same as label. Used when label is not set |
| variant | "default" | "primary" | "soft" | "borderless" | No | Default "default": outlined. "primary" is filled, for the one main action. "borderless" has no box, like a link |
| block | boolean | No | Full width |
| disabled | boolean | No | - |
| loading | boolean | No | - |
| submit | boolean | No | Submits the Form around it. The Form sends its onSubmit event |
| icon | string | No | Lucide icon name |
| uniform | boolean | No | A square button, for an icon |
| href | string | No | Opens this URL in a new tab on click, instead of onClick |
| copy | string | No | Copies this text to the clipboard on click and shows a check mark, instead of onClick |
| child | component id | No | Id of one child component. |
| children | string[] | { componentId, path } | No | Ids of child components, or a template { componentId, path } over a data list. |
| color | "primary" | "secondary" | "danger" | No | Default "primary" |
| size | "sm" | "md" | "lg" | No | Default "lg" |
| weight | number | No | flex-grow in a Row or Column |
| pill | boolean | No | Default true |