Skip to content

Clickable

Turns non-interactive phrasing content into one button or link target. Use `ClickableContainer` instead when the content contains independent interactive descendants.

<Clickable
label="Select Engineering"
onClick={() => {}}
>
<Badge color="info" label="Engineering" />
</Clickable>
<Clickable
label="Select Engineering"
onClick={() => {}}
tooltip="Click to select the Engineering team"
>
<Badge color="info" label="Engineering" />
</Clickable>
<Clickable
label="View Engineering team"
onClick={undefined}
href="/teams/engineering"
>
<Badge color="info" label="Engineering" />
</Clickable>
<Clickable
label="View Design team"
onClick={undefined}
as={RouterLink}
href="/teams/design"
>
<Badge color="purple" label="Design" />
</Clickable>
Read only
<HStack align="center" gap={4}>
<Clickable label="Enabled" onClick={() => {}}>
<Badge color="success" label="Enabled" />
</Clickable>
<Clickable
disabledReason="You do not have access to this team"
isDisabled
label="Disabled"
onClick={() => {}}>
<Badge color="neutral" label="Disabled" />
</Clickable>
<Clickable isReadOnly label="Read only" onClick={() => {}}>
<Badge color="warning" label="Read only" />
</Clickable>
</HStack>
<Clickable
label="Select rounded item"
onClick={() => {}}
style={{borderRadius: 9999}}
>
<Badge color="teal" label="Rounded" />
</Clickable>
Quarterly reportUpdated a few minutes ago
<ClickableContainer
className={surfaceClassName}
label="Open quarterly report"
onClick={() => {}}
style={{borderRadius: 12}}
>
{( <VStack gap={1}> <Text type="label">Quarterly report</Text> <Text color="secondary" type="supporting"> Updated a few minutes ago </Text> </VStack> )}
</ClickableContainer>
Quarterly reportUpdated a few minutes ago
<ClickableContainer
className={surfaceClassName}
label="Open quarterly report"
onClick={undefined}
style={{borderRadius: 12}}
href="/reports/quarterly"
>
{( <VStack gap={1}> <Text type="label">Quarterly report</Text> <Text color="secondary" type="supporting"> Updated a few minutes ago </Text> </VStack> )}
</ClickableContainer>
ApolloNested controls remain independent from the row action.
Settings
<ClickableContainer
className={surfaceClassName}
href="/projects/apollo"
label="Open Apollo project"
style={{borderRadius: 12}}>
<VStack gap={3}>
<VStack gap={1}>
<Text type="label">Apollo</Text>
<Text color="secondary" type="supporting">
Nested controls remain independent from the row action.
</Text>
</VStack>
<HStack align="center" gap={3}>
<Button label="Archive project" onClick={() => {}} size="sm" />
<Link href="/projects/apollo/settings">Settings</Link>
</HStack>
</VStack>
</ClickableContainer>
Disabled surface
Read-only surface
<HStack align="start" gap={4} wrap="wrap">
<ClickableContainer
className={surfaceClassName}
disabledReason="The report is still being generated"
isDisabled
label="Open pending report"
onClick={() => {}}
style={{borderRadius: 12}}>
<Text type="label">Disabled surface</Text>
</ClickableContainer>
<ClickableContainer
className={surfaceClassName}
isReadOnly
label="Read-only report"
onClick={() => {}}
style={{borderRadius: 12}}>
<Text type="label">Read-only surface</Text>
</ClickableContainer>
</HStack>

Turns non-interactive phrasing content into one button or link target. Use `ClickableContainer` instead when the content contains independent interactive descendants.

PropTypeDefaultDescription
asLinkComponentCustom link component used when href is provided. This overrides the component configured by LinkProvider for this instance.
refRef<HTMLElement>Ref forwarded to the rendered button, link, or static span.
tooltipReactNodeContent shown in a tooltip during normal interaction. When the action is disabled, a non-empty disabledReason takes precedence.
children*ReactNodeNon-interactive phrasing content that becomes the action's visual target.
classNamestringAdditional CSS class names applied to the root element.
data-testidstringTest ID applied to the root element.
disabledReasonstringExplanation shown in a tooltip and exposed as the control's accessible description while disabled.
hrefstringNavigation URL. When provided, the action renders as a link and takes precedence over onClick.
isDisabledbooleanfalseWhether the action is disabled. Disabled actions remain focusable and use aria-disabled so their reason can be discovered.
isReadOnlybooleanfalseWhether to preserve the content's appearance while removing interaction.
label*stringAccessible name for the action. It is not rendered visually.
onClickMouseEventHandler<HTMLElement>Called when the action is activated. Also fires for link clicks when href is provided.
relstringLink relationship. noopener noreferrer are added for _blank targets.
styleCSSPropertiesInline styles applied to the root element.
targetstring'_self'Link browsing-context target.
PropTypeDefaultDescription
refRef<HTMLDivElement>Ref forwarded to the outer, non-interactive container.
children*ReactNodeNon-interactive phrasing content that becomes the action's visual target.
classNamestringAdditional CSS class names applied to the root element.
data-testidstringTest ID applied to the root element.
disabledReasonstringExplanation shown in a tooltip and exposed as the control's accessible description while disabled.
hrefstringNavigation URL. When provided, the action renders as a link and takes precedence over onClick.
isDisabledbooleanfalseWhether the action is disabled. Disabled actions remain focusable and use aria-disabled so their reason can be discovered.
isReadOnlybooleanfalseWhether to preserve the content's appearance while removing interaction.
label*stringAccessible name for the action. It is not rendered visually.
onClickMouseEventHandler<HTMLElement>Called when the action is activated. Also fires for link clicks when href is provided.
relstringLink relationship. noopener noreferrer are added for _blank targets.
styleCSSPropertiesInline styles applied to the root element.
targetstring'_self'Link browsing-context target.