Components
HelpTooltip
A tooltip component designed to provide additional help or information when users hover over an information icon. Built with Tippy.js for reliable positioning and animations.
Props
children
: ReactNode - The content to be displayed in the tooltip- The component inherits all Tippy.js props for customization
Usage Examples
Basic Tooltip
With Form Field
With Rich Content
Custom Styling
Features
- Automatic positioning
- Smooth animations
- Dark mode support
- Keyboard accessibility
- Touch device support
- Custom styling options
- Rich content support
Styling
The component uses Tailwind CSS for styling and includes:
- Rounded corners
- Consistent padding
- Information icon styling
- Shadow effects
- Theme compatibility
- Transition animations
Best Practices
-
Content Guidelines:
- Keep tooltip content concise
- Use clear, helpful language
- Avoid redundant information
- Consider screen space
-
Positioning:
- Place tooltips logically
- Avoid overlapping content
- Consider viewport edges
- Maintain readability
-
Interaction:
- Ensure sufficient hover area
- Provide keyboard access
- Consider touch devices
- Maintain appropriate timing
Accessibility
- Keyboard focusable
- Screen reader support
- ARIA attributes
- Sufficient color contrast
- Touch target size
- Focus management