Tooltip

Organism

Short hint shown on hover and focus. Accessible via role="tooltip" + aria-describedby. Supports 4 placements, 3 themes, optional arrow, and configurable delay.

Placements

Preview
Top tooltip Bottom tooltip Right tooltip
Code
<%- include('modules/ui/Tooltip', { content: 'Top tooltip', placement: 'top', children: '' }) %>
<%- include('modules/ui/Tooltip', { content: 'Bottom tooltip', placement: 'bottom', children: '' }) %>
<%- include('modules/ui/Tooltip', { content: 'Right tooltip', placement: 'right', children: '' }) %>

Themes

Preview
Default theme Dark theme Light theme
Code
<%- include('modules/ui/Tooltip', { content: 'Default theme', theme: 'default', children: '' }) %>
<%- include('modules/ui/Tooltip', { content: 'Dark theme', theme: 'dark', children: '' }) %>
<%- include('modules/ui/Tooltip', { content: 'Light theme', theme: 'light', children: '' }) %>

With arrow

Preview
Has an arrow Has an arrow
Code
<%- include('modules/ui/Tooltip', {
  content: 'Has an arrow',
  placement: 'top',
  arrow: true,
  children: ''
}) %>

On an icon button

Preview
Open settings
Code
<%- include('modules/ui/Tooltip', {
  content: 'Open settings',
  placement: 'top',
  theme: 'dark',
  children: ''
}) %>
Source modules/ui/Tooltip.ejs