Color Dot

View as Markdown

A small mark in a project's, label's or calendar's color.

  • Mobile app41
  • Billing migration18
  • Design system7
  • Onboarding23
  • Infrastructure and on-call rotation5

When to use

A small mark in a project's, label's or calendar's color. Use Glyphs instead when the mark says status or priority, not a color someone chose.

Usage

import { ColorDot } from "./ui/uicontext/components/ColorDot.ts"
export const ProjectName = <M>(h: Html.H<M>) => h.span.children(ColorDot(h, { color: "#7c3aed" }), " Mobile app")

Examples

Shown and hidden

square for a calendar that shows, ring once it's hidden.

API reference

Options

ColorDot options
NameTypeDescription
colorrequiredstringAny CSS color: "#7c3aed", "oklch(62% 0.2 300)", a theme variable.
shape"dot" | "square" | "ring"dot (the default), square for labels and calendars, ring for one that's off or hidden.
sizekeyof typeof sizes8px (sm) by default.
labelstringWhat the color means, when nothing beside it says: "Work calendar".
styleStyle—

Installation

pnpm dlx shadcn@latest add checkfu/uicontext/color-dot

Source