Component

Status Tooltip

Status indicator dot with a color-themed tooltip - success (green), warning (amber), error (red), info (blue). The tooltip background and arrow match the semantic status. Pure CSS, hover or focus to reveal.

  • Component
  • Tailwind
  • HTML
  • MIT

What it does

Capabilities

  • Status dot indicators
  • 4 semantic colors
  • Themed tooltip + arrow
  • Data-tooltip-status attribute
  • Hover + focus triggers
  • Pure CSS no JS
  • Aria-label
  • Role=tooltip companion

Preview

Live component

Interactive preview
Open preview
9:41 100%
devsnips.site/library/tailwind/components/tooltips/status-tooltip/
fluid · no fixed width 100%
No dependencies Production-ready

Install

Add to your project

terminal
npx devsnips add Tailwind/Components/Tooltips/status-tooltip
registry path: Tailwind/Components/Tooltips/status-tooltip

Source

Implementation

code.html
<!--
Snippet Name: Status Tooltip
Description: Status indicator dot with a color-themed tooltip (success, warning, error, info). The tooltip color matches the semantic status. Pure CSS, hover or focus to reveal.
Author: DevSnips Contributors
Usage Example: Add data-tooltip="text" data-tooltip-status="success|warning|error|info" to the status dot button.
-->
<div class="flex items-center gap-5">
  <button type="button" class="tt-status group inline-flex items-center gap-2 focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 rounded-full" data-tooltip="All systems operational" data-tooltip-status="success" aria-label="Status: operational" aria-describedby="tt-st-success">
    <span class="status-dot h-2.5 w-2.5 rounded-full bg-green-500 ring-4 ring-green-100"></span>
    <span class="text-sm font-medium text-gray-700">Operational</span>
  </button>
  <span id="tt-st-success" role="tooltip" class="sr-only">All systems operational</span>

  <button type="button" class="tt-status group inline-flex items-center gap-2 focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 rounded-full" data-tooltip="Degraded performance in EU region" data-tooltip-status="warning" aria-label="Status: warning" aria-describedby="tt-st-warning">
    <span class="status-dot h-2.5 w-2.5 rounded-full bg-amber-500 ring-4 ring-amber-100"></span>
    <span class="text-sm font-medium text-gray-700">Degraded</span>
  </button>
  <span id="tt-st-warning" role="tooltip" class="sr-only">Degraded performance in EU region</span>

  <button type="button" class="tt-status group inline-flex items-center gap-2 focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 rounded-full" data-tooltip="API is down — investigating" data-tooltip-status="error" aria-label="Status: error" aria-describedby="tt-st-error">
    <span class="status-dot h-2.5 w-2.5 rounded-full bg-red-500 ring-4 ring-red-100"></span>
    <span class="text-sm font-medium text-gray-700">Down</span>
  </button>
  <span id="tt-st-error" role="tooltip" class="sr-only">API is down — investigating</span>
</div>

<style>
  .tt-status { position: relative; }
  .tt-status::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%) translateY(4px);
    padding: 6px 10px;
    border-radius: 8px;
    color: #fff;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity .15s ease, transform .15s ease, visibility .15s;
    pointer-events: none;
    z-index: 50;
  }
  .tt-status::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: calc(100% + 4px);
    transform: translateX(-50%) translateY(4px);
    border: 6px solid transparent;
    opacity: 0;
    visibility: hidden;
    transition: opacity .15s ease, visibility .15s;
    pointer-events: none;
    z-index: 50;
  }
  /* status theming */
  .tt-status[data-tooltip-status="success"]::after { background: #059669; }
  .tt-status[data-tooltip-status="success"]::before { border-top-color: #059669; }
  .tt-status[data-tooltip-status="warning"]::after { background: #d97706; }
  .tt-status[data-tooltip-status="warning"]::before { border-top-color: #d97706; }
  .tt-status[data-tooltip-status="error"]::after { background: #dc2626; }
  .tt-status[data-tooltip-status="error"]::before { border-top-color: #dc2626; }
  .tt-status[data-tooltip-status="info"]::after { background: #2563eb; }
  .tt-status[data-tooltip-status="info"]::before { border-top-color: #2563eb; }
  /* reveal */
  .tt-status:hover::after, .tt-status:focus-visible::after {
    opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
  }
  .tt-status:hover::before, .tt-status:focus-visible::before {
    opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
  }
</style>
77 lines UTF-8 · LF · Spaces: 2
DevSnips AI ready Claude · Cursor · Windsurf

Agent skill & Model Context Protocol

Pass this component straight into your AI workflow. DevSnips exposes each resource as a structured, addressable registry entry, so your agent installs the real files instead of approximating them.

devsnips://components/tooltips/status-tooltip
Prompt instruction
I want to use this DevSnips resource in production:

Page:
https://devsnips.site/library/tailwind/components/tooltips/status-tooltip/

Install: npx devsnips add
Tailwind/Components/Tooltips/status-tooltip

This is the Status Tooltip — Status indicator dot with a color-themed tooltip - success (green), warning (amber), error (red), info (blue). The tooltip background and arrow match the semantic status. Pure CSS, hover or focus to reveal.

Use this DevSnips resource as the starting point for my project.
Adapt it to my project's stack and conventions, fix any issues,
and make it production-ready while preserving its intended design
and behavior.

Paste into ChatGPT, Claude or your agent — it already carries the page URL and the exact install path.

Resource URI
devsnips://components/tooltips/status-tooltip