A shadcn-style tooltip component built with Ark UI primitives.

Installation

npx shadcn@latest add @ark-cn/tooltip

Usage

import * as Tooltip from "@/components/ui/tooltip"

Read exported parts in src/components/ui/tooltip.tsx and compose the primitive according to the Ark UI pattern for this component.

Examples

Basic

Arrow

Context

Controlled

Delay

Positioning

Different Placements

Root Provider

Open: false

Within Fixed Container

Hover the fixed trigger in the bottom-right viewport corner.

API reference

This component mirrors the upstream Ark UI primitive. All props and DOM behavior are defined by Ark unless you see an ark-cn-only row below.

TooltipPopup

PropTypeDescription
arrowClassName?stringClass on the arrow element.
arrowTipClassName?stringClass on the arrow tip.
disablePortal?booleanRenders content in-place instead of portaled.
positionerClassName?stringExtra class on the positioner wrapper.
showArrow?booleanToggles the arrow (default true).

See the ARK UI documentation for the full API.

Accessibility

See the Ark UI documentation for clarification.