Skip to content

Pressable

Gen UI 2.0 standard

A layout container that the user can click or press with Enter or Space. It sends its onClick event, or opens href. A control inside it sends only its own event.

One of the 69 components in CopilotKit's standardUI. The playground's catalog extends it, so every agent here can use Pressable. 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.

PropTypeRequiredDescription
childrenstring[] | { componentId, path }NoIds of child components, or a template { componentId, path } over a data list.
onClickAction (event or functionCall)NoSent when the user clicks or presses the container.
hrefstringNoOpens this URL in a new tab on click, instead of onClick
disabledbooleanNo-
tooltipstringNoShown on hover
ariaPressedbooleanNoFor a toggle
onVisibleAction (event or functionCall)NoSent once, the first time the container scrolls into view. Use it to load more content lazily.
align"start" | "center" | "end" | "baseline" | "stretch"No-
justify"start" | "center" | "end" | "spaceBetween" | "spaceAround" | "spaceEvenly" | ...No-
wrap"nowrap" | "wrap" | "wrap-reverse"No-
gapnumber | stringNo4px steps when a number
rowGapnumber | stringNo-
columnGapnumber | stringNo-
paddingnumber | stringNo4px steps when a number
backgroundstringNoLeave it unset. A surface token such as surface, surface-secondary, info, success, warning, danger, discovery, or one with -solid, or a CSS color. Only one summary panel in a Card uses "surface-secondary"
borderbooleanNo-
borderColor"default" | "subtle" | "strong" | "info" | "warning" | "caution" | ...No-
radius"2xs" | "xs" | "sm" | "md" | "lg" | "xl" | ... | number | string | { topLeft?, topRight?, bottomLeft?, bottomRight? }No-
widthnumber | stringNo-
heightnumber | stringNo-
minWidthnumber | stringNo-
maxWidthnumber | stringNo-
minHeightnumber | stringNo-
maxHeightnumber | stringNo-
flexnumberNo-
weightnumberNoflex-grow in a Row or Column
aspectRatiostringNo-
scrollablebooleanNo-
clipbooleanNo-
shadowbooleanNo-
inlinebooleanNo-
rolestringNoARIA role
flushbooleanNoNo padding
minSizenumber | stringNoMinimum width and height
maxSizenumber | stringNoMaximum width and height
disableAutoSpacingbooleanNoNo default gap between children
hoverBackgroundstringNo-
insetBorderbooleanNoA 1px border inside the box