Guidance
Use tooltips for short, non-interactive hints. Use popovers when the content needs structure, multiple lines, or actions.
When To Use Tooltips
When To Use Popovers
Framework Contract
Tooltip Classes
.ak-tooltip-trigger creates the relative positioning context.
.ak-tooltip-content is the floating hint element.
.ak-tooltip-right, .ak-tooltip-bottom, .ak-tooltip-left change placement.
Top placement is the default when no direction modifier is present.
<button type="button" class="ak-tooltip-trigger ak-btn"> Save <span class="ak-tooltip-content" role="tooltip">Saves your draft</span> </button>
Popover Classes
.ak-popover-trigger creates the positioning context.
.ak-popover-content is the floating panel.
.ak-popover-header, .ak-popover-body, .ak-popover-footer structure content.
.ak-popover-sm, .ak-popover-lg, .ak-popover-interactive extend behavior.
<div tabindex="0" role="button"
class="ak-popover-trigger ak-popover-right ak-btn ak-btn-outline">
More
<div class="ak-popover-content">
<div class="ak-popover-header">Quick Actions</div>
<div class="ak-popover-body">Structured guidance or actions.</div>
</div>
</div>
Tooltip Positions
All four placement classes already exist in the framework. The default tooltip opens above the trigger.
<button type="button" class="ak-tooltip-trigger ak-btn">...</button> <button type="button" class="ak-tooltip-trigger ak-tooltip-right ak-btn ak-btn-outline">...</button> <button type="button" class="ak-tooltip-trigger ak-tooltip-bottom ak-btn ak-btn-secondary">...</button> <button type="button" class="ak-tooltip-trigger ak-tooltip-left ak-btn ak-btn-ghost">...</button>
Tooltip Patterns
Icon Actions
Recommended for icon-only buttons where the visible label would add clutter.
<button type="button" class="ak-tooltip-trigger ak-btn ak-btn-square" aria-label="Edit item"> <i data-lucide="pencil" class="ak-w-4 ak-h-4"></i> <span class="ak-tooltip-content" role="tooltip">Edit item</span> </button>
Inline Help
Use this when a field needs one compact explanation, but not a whole help panel.
Keep this token private.
<div class="ak-flex ak-items-center ak-gap-3">
<input type="text" class="ak-input">
<button type="button" class="ak-tooltip-trigger ak-btn ak-btn-square ak-btn-ghost">
<i data-lucide="info" class="ak-w-4 ak-h-4"></i>
<span class="ak-tooltip-content" role="tooltip">Used for server-to-server requests</span>
</button>
</div>
Popovers
Positions & Sizes
Use popovers when the content needs hierarchy, multiple lines, or a clearer visual container.
<div tabindex="0" role="button" class="ak-popover-trigger ak-popover-bottom ak-popover-lg ak-btn ak-btn-secondary">
Large Bottom
<div class="ak-popover-content">
<div class="ak-popover-header">Release Checklist</div>
<div class="ak-popover-body">Popover bodies can span multiple lines.</div>
</div>
</div>
Interactive Popover
Choose .ak-popover-interactive only when the floating panel contains clickable controls.
<div tabindex="0" role="button"
class="ak-popover-trigger ak-popover-interactive ak-popover-right ak-btn ak-btn-outline">
Quick Actions
<div class="ak-popover-content">
<div class="ak-popover-header">Team Access</div>
<div class="ak-popover-body">Invite editors or copy a review link.</div>
<div class="ak-popover-footer">
<button type="button" class="ak-btn ak-btn-sm ak-btn-ghost">Later</button>
<button type="button" class="ak-btn ak-btn-sm ak-btn-primary">Invite</button>
</div>
</div>
</div>