Skip to main content

Dot

Info:Feedback
27

A standalone status dot: a bare indicator in any tone, with optional ping, glow, and pulse.

status indicator presence online offline live ping pulse pip led

Live demo

live · @xtyle/astro

Dot

Every tone

Accents

Statuses

Named hues

Three sizes

sm

md

lg

Live status

A chip-less indicator for presence without a label around it: a connection light, a per-row streaming pip. pulse breathes the dot at a slow or fast cadence.

Connected

Streaming

Offline

To grab the eye, ping radiates an expanding ring and glow adds a soft halo. Both compose, and both hold still under reduced-motion.

Recording

Live (ping + glow)

Glow only

Color escape hatch

color paints the dot any raw value past the tone set, so a per-state color from an app's own status map (or a color-mix(…) expression) drives the dot, ping ring, and glow alike.

--purple

#f59e0b

color-mix

Dot is the bare indicator for "presence without a full chip": a connection light in a titlebar, a per-row streaming pip, an online/offline marker. tone colors it across the six semantic roles (plus the accent variants and named hues), size picks sm, md, or lg, and a color escape hatch paints any raw value past the tone set (a color-mix(...) expression, a per-state color from a status map).

Three composable animations layer on: ping radiates an expanding ring, glow adds a soft halo, and pulse breathes the dot at a slow or fast cadence; all three hold still under prefers-reduced-motion. It ships as a first-class element that self-styles in its own shadow root, so a shadow-DOM consumer with no global stylesheet gets it for free, and the .xtyle-dot utility class stays available for global-CSS pages. A labelled dot is exposed as a named role="img"; an unlabelled one is decorative and hidden from assistive tech.

When to use

How this component composes with the rest of the set.

Reach for Dot when you want a color-coded status without a label chip; reach for Badge when the status wants a word beside it.
Compose ping + glow for a strong live indicator; add pulse for a quieter breathe when a full ping ring is too loud.
Use color for a per-state palette wider than the tone set (a run-state map, a color-mix(...) expression); tone covers the common semantic cases.

Props

7 props, straight from the manifest.

PropTypeDefaultBindingsDescription
tone FullTone
accent neutral danger success warn info accent-2 accent-3 accent-4 red orange yellow green blue purple brown pink cyan gray white black
neutral
html svelte astro
Semantic color role (or named hue) driving the dot color.
size DotSize
sm md lg
md
html svelte astro
Dot diameter, stepped off the spacing scale.
pulse DotPulse
slow fast
html svelte astro
Breathe the dot's opacity at a slow or fast cadence.
ping boolean false
html svelte astro
Radiate an expanding ring for a live/active indicator.
glow boolean false
html svelte astro
Add a soft halo in the dot color.
color string
html svelte astro
Escape hatch: paint the dot any raw color, past the tone set. Sets `--dot-color` and wins over `tone`.
label string
html svelte astro
Accessible name. When set, the dot is exposed as `role="img"`; when absent, it is decorative and hidden.

Appearance

Variants

accent

.xtyle-dot--accent

accent-toned dot.

neutral

.xtyle-dot--neutral

neutral-toned dot.

danger

.xtyle-dot--danger

danger-toned dot.

success

.xtyle-dot--success

success-toned dot.

warn

.xtyle-dot--warn

warn-toned dot.

info

.xtyle-dot--info

info-toned dot.

accent-2

.xtyle-dot--accent-2

accent-2-toned dot.

accent-3

.xtyle-dot--accent-3

accent-3-toned dot.

accent-4

.xtyle-dot--accent-4

accent-4-toned dot.

red

.xtyle-dot--red

red-toned dot.

orange

.xtyle-dot--orange

orange-toned dot.

yellow

.xtyle-dot--yellow

yellow-toned dot.

green

.xtyle-dot--green

green-toned dot.

blue

.xtyle-dot--blue

blue-toned dot.

purple

.xtyle-dot--purple

purple-toned dot.

brown

.xtyle-dot--brown

brown-toned dot.

pink

.xtyle-dot--pink

pink-toned dot.

cyan

.xtyle-dot--cyan

cyan-toned dot.

gray

.xtyle-dot--gray

gray-toned dot.

white

.xtyle-dot--white

white-toned dot.

black

.xtyle-dot--black

black-toned dot.

Sizes

sm

.xtyle-dot--sm

Compact.

md

default
.xtyle-dot

Default.

lg

.xtyle-dot--lg

Large.

States

ping

.xtyle-dot--ping

An expanding ring radiates outward on a loop.

glow

.xtyle-dot--glow

A soft halo in the dot color.

pulse-slow

.xtyle-dot--pulse-slow

Slow opacity breathe.

pulse-fast

.xtyle-dot--pulse-fast

Fast opacity breathe.

Anatomy

The named parts that make up the component, with their selectors.

dot

.xtyle-dot

The dot itself: a full-radius circle filled with the resolved --dot-color.

--neutral --radius-full --space-2

ping

.xtyle-dot--ping::after

The expanding ring on a ping dot: an ::after clone that scales out and fades on a loop.

--ease-standard

Tokens & coverage

What the component consumes, checked live against what the algorithm produces.

Success:fully covered 27/27 consumed tokens produced default register: 299 tokens

Live coverage check against the xtyle-default register (derive(xtyleDefault, { anchors })coverComponent(manifest, register)). Every token this component consumes must be a key the algorithm produces.

--accent --accent-2 --accent-3 --accent-4 --black --blue --border-thin --brown --cyan --danger --ease-standard --gray --green --info --neutral --orange --pink --purple --radius-full --red --space-2 --space-3 --space-4 --success --warn --white --yellow

Accessibility

A labelled dot is exposed as a named role="img", so its meaning does not rest on color alone.
An unlabelled dot is treated as decorative and hidden from assistive tech, since color without a name carries no meaning to a screen reader.
All three animations (ping, glow shimmer, pulse) hold still under prefers-reduced-motion.

Code

Tones, states, and the color escape hatch

A labelled status dot, a live ping, a glowing accent, and a raw custom color.

<xtyle-dot tone="success" label="Online"></xtyle-dot>

<xtyle-dot tone="danger" ping label="Live"></xtyle-dot>

<xtyle-dot tone="accent" glow size="lg"></xtyle-dot>

<xtyle-dot color="#a855f7" ping></xtyle-dot>
<script lang="ts">
	import { Dot } from "@xtyle/svelte";
</script>

<Dot tone="success" label="Online" />

<Dot tone="danger" ping label="Live" />

<Dot tone="accent" glow size="lg" />

<Dot color="#a855f7" ping />
---
import Dot from "@xtyle/astro/Dot.astro";
---

<Dot tone="success" label="Online" />

<Dot tone="danger" ping label="Live" />

<Dot tone="accent" glow size="lg" />

<Dot color="#a855f7" ping />