Tooltip
A small informational popup appearing on hover, supporting beak placements (Top, Bottom, Left, Right, None) and On Color variants.
<Tooltip beakPlacement="top" beakAlignment="start" title="Welcome to SDAIA Platform" description="This is your central hub for monitoring APIs, managing users, and reviewing analytics."Installation
npx sdaia-ui@latest add tooltip
Usage
import { Tooltip } from "@/components/ui/tooltip"<Tooltip />Examples
Brand
Tooltip with type={brand}.
<Tooltip type="brand" icon title="Tooltip title" description="..."Neutral
Tooltip with neutral colors.
<Tooltip type="neutral" icon title="Tooltip title" description="Max width of tooltips is 240px - text will wrap automatically"Beak Top
Tooltip with beak positioned top.
<Tooltip type="neutral" beakPlacement="top" beakAlignment="start" iconBeak Left
Tooltip with beak positioned left.
<Tooltip type="neutral" beakPlacement="left" beakAlignment="start" iconTooltip with type brand and beak positioned left.
<Tooltip type="brand" beakPlacement="bottom" beakAlignment="centre" iconAPI Reference
TooltipProps
Props for the Tooltip component.
Prop | Type | Default | Required |
|---|---|---|---|
type | 'neutral' | 'brand' | 'neutral' | optional |
beakPlacement | 'none' | 'top' | 'bottom' | 'left' | 'right' | 'none' | optional |
beakAlignment | 'start' | 'centre' | 'end' | 'start' | optional |
title | ReactNode | - | optional |
description | ReactNode | - | optional |
icon | ReactNode | boolean | - | optional |
media | ReactNode | - | optional |
primaryAction | TooltipAction | - | optional |
secondaryAction | TooltipAction | - | optional |
link | TooltipLinkAction | - | optional |
counting | ReactNode | - | optional |
