Status dot
A small dot with a label for the state of something: live, waiting, down or off. The live one pulses.
Operational
Deploying
Down
Paused
Options
Code
import "./status-dot.css";
export function Status({ state = "live", children }) {
return (
<span className="dh-status" data-state={state}>
{children}
</span>
);
}
export function Example() {
return (
<div className="dh-status-row">
<Status state="live">Operational</Status>
<Status state="wait">Deploying</Status>
<Status state="down">Down</Status>
<Status state="off">Paused</Status>
</div>
);
}.dh-status-row {
display: flex;
flex-wrap: wrap;
gap: 1.5em;
}
.dh-status {
--dot: #8a8a8a;
display: inline-flex;
align-items: center;
gap: 0.5em;
color: var(--dh-fg, #171717);
font-size: 0.875em;
line-height: 1.4;
letter-spacing: -0.01em;
}
.dh-status::before {
content: "";
width: 0.4em;
height: 0.4em;
border-radius: 50%;
background: var(--dot);
}
.dh-status[data-state="live"] {
--dot: #1fa750;
}
.dh-status[data-state="wait"] {
--dot: #e39b0b;
}
.dh-status[data-state="down"] {
--dot: #d92d20;
}
.dh-status[data-state="off"] {
color: var(--dh-muted, #5c5c5c);
}
.dh-status[data-state="live"]::before {
animation: dh-status-pulse 2s cubic-bezier(0.23, 1, 0.32, 1) infinite;
}
@keyframes dh-status-pulse {
from {
box-shadow: 0 0 0 0 color-mix(in srgb, var(--dot) 45%, transparent);
}
to {
box-shadow: 0 0 0 0.4em color-mix(in srgb, var(--dot) 0%, transparent);
}
}
@media (prefers-reduced-motion: reduce) {
.dh-status[data-state="live"]::before {
animation: none;
}
}<div class="dh-status-row">
<span class="dh-status" data-state="live">Operational</span>
<span class="dh-status" data-state="wait">Deploying</span>
<span class="dh-status" data-state="down">Down</span>
<span class="dh-status" data-state="off">Paused</span>
</div>.dh-status-row {
display: flex;
flex-wrap: wrap;
gap: 1.5em;
}
.dh-status {
--dot: #8a8a8a;
display: inline-flex;
align-items: center;
gap: 0.5em;
color: var(--dh-fg, #171717);
font-size: 0.875em;
line-height: 1.4;
letter-spacing: -0.01em;
}
.dh-status::before {
content: "";
width: 0.4em;
height: 0.4em;
border-radius: 50%;
background: var(--dot);
}
.dh-status[data-state="live"] {
--dot: #1fa750;
}
.dh-status[data-state="wait"] {
--dot: #e39b0b;
}
.dh-status[data-state="down"] {
--dot: #d92d20;
}
.dh-status[data-state="off"] {
color: var(--dh-muted, #5c5c5c);
}
.dh-status[data-state="live"]::before {
animation: dh-status-pulse 2s cubic-bezier(0.23, 1, 0.32, 1) infinite;
}
@keyframes dh-status-pulse {
from {
box-shadow: 0 0 0 0 color-mix(in srgb, var(--dot) 45%, transparent);
}
to {
box-shadow: 0 0 0 0.4em color-mix(in srgb, var(--dot) 0%, transparent);
}
}
@media (prefers-reduced-motion: reduce) {
.dh-status[data-state="live"]::before {
animation: none;
}
}Status dot is not in the Figma file yet.
Use the React or HTML code for now.