Equality Design System: Install, Source and Security

Equality Design System

Published by eqtylab in equality

No known issues14 installs

What this skill does

Build React UI with Equality, EQTY Lab's design system (@eqtylab/equality) — accessible React components, design tokens, and light/dark theming. Use when building, restyling, or reviewing any React UI, prototype, mockup, dashboard, or admin screen for an EQTY Lab project; when the user mentions Equality, EQTY Lab, @eqtylab/equality, or equality.eqtylab.io; and before writing ANY NEW COMPONENT from scratch. ALWAYS check if one is available from this package that you can use.

Add Equality Design System to your agent

Review the source and files first. When you are ready, copy the prompt instruction or use the CLI command supported by your environment.

Install with a prompt

Paste this into a compatible coding agent:

add this skill "equality-design-system" from https://github.com/eqtylab/equality

Install with the CLI

Run this command in a controlled environment after reviewing the repository:

npx skills add https://github.com/eqtylab/equality --skill equality-design-system

Skill instructions

Equality Design System

Equality is EQTY Lab's React design system. Components are built on Radix UI and Tailwind v4, with a token-driven theme that ships light and dark modes. It is the house style for every EQTY Lab interface, prototypes included.

Important Rules to Follow:

Compose Equality's components. Do not rebuild them.

A hand-rolled <button className="rounded bg-blue-600 px-4 py-2">, a <div> pretending to be a card, or a bespoke modal is wrong here even in a throwaway mockup. Reinvented components drift in colour, spacing, focus behaviour, and dark mode.

If you catch yourself writing raw HTML controls or arbitrary colour classes, stop and look at our components to see what exists first. If you are creating a new cluster component within an app, check if you should be composing it with parts from Equality's existing library.

Before You Write ANY UI

  1. Fetch the index: https://equality.eqtylab.io/llms.txt. This lists Every component on one page — component name, one-line purpose, docs link, plus the compound families, anything deprecated, and anything shipping without docs. It is generated from the library at build time, so it never lies about what exists. Fetch it once per session and work from it.
  2. Translate the name. If you are thinking of a component it may be under a different name than Equality uses. Check the table below, then fetch docs pages for ALL similar sounding components, and check if it already exists.
  3. Read the component's docs. Follow the link from the index — https://equality.eqtylab.io/components/<slug>.md — for full props, variants, and copyable examples. Those .md URLs serve plain Markdown specifically so agents like you can read them!
  4. Then write the code, importing from @eqtylab/equality.

Do not skip step 3 for anything with variants or compound parts. Guessing prop names produces code that type-checks in your head and fails in the editor.

If you have no network access or web fetching fails, tell your user that you couldn't reach the index.

Name translation

If you're thinking of…Use in EqualityDon't hand-roll it from
Combobox, searchable select, filterable single-selectSelect with SelectSearchPopover + Command
Command palette, ⌘K launcherCommandDialog + Input + a list
Modal, lightboxDialogA fixed-position div
Confirmation or destructive-action promptAlertDialogDialog with two buttons
Drawer, side panel, slide-overSheetDialog with custom styles
Snackbar, notificationToastA timed, positioned div
Page status strip, archived or read-only bannerBannerA gradient div under the header
Activity feed, history, audit trail, event logTimelineA list with a border for a rail
ToggleSwitchA styled checkbox
Chip, pill, tag, status labelBadgeA rounded span
Loader, activity indicatorSpinnerAn animated SVG
Button group or toggle group for mutually exclusive valuesSegmentedControlsA row of Buttons
Multi-select filterFilterDropdownDropdownMenu with checkboxes
Footer action, "Select all" or "Other" while searchingpersistent itemsButtons outside the list items
Title switcher, inline dropdown in a heading or textSelectTrigger variant="inline"SelectTrigger with ! overrides
Radio card, selectable card in a setCard selectedCard with ! overrides
Pass/fail or status-tinted cardCard variant="success"Card with ! overrides
Textarea inside an editor frameTextarea variant="bare"Textarea with ! overrides
Field-like trigger for a date or people pickerButton variant="field"A tertiary Button with overrides
Clear button inside a picker fieldIconButton size="xs"IconButton with a size override
Avatar in a list or row, one line per person (even in a card)Avatar with no sizeAvatar with a negative margin
Person with a subline (name over email) in a table or list rowTitleBlock with an Avatar size="md" markAn Avatar beside a hand-stacked name and email
Avatar for one person: card or page header, "Assigned to" field, name with a line under itAvatar size="md"Avatar with !size-9
Avatar sized to match a controlAvatar with the control's sizeAvatar with !size-9
Row action, kebab or copy button at the end of a table rowIconButton at its default size, in a TableCellIconButton with a negative margin
ID or hash in a table cellPlain text, when the row's menu or the view it opens can copy itA CopyButton in the cell, unless neither can copy it
Taller table rows, comfortable or touch-friendly tableTableContainer density="comfortable"Extra padding on TableRow
Sidebar rows, settings list, NavItem/NavSectionNavListItem in NavListGroupStyled links in a ul
App sidebar, icon railNavPanel + NavRailA fixed aside with links
Sliding sub-panel, drill-in navNavDrillSwapped lists with CSS transitions
Collapsible nav group, tree sidebar, folder rowsNavListExpandable<details> or a toggled ul
Page title beside its actionstext-title-1 on an h1, such as <h1 className="text-title-1">text-2xl with a line height
Docs page title, marketing section title, landing page herotext-display-2 for a docs page's title or a marketing section, text-display-1 for a landing hero; never in app screens. Heading's h1 titles long-form content; on a page whose title is already an h1 (docs and app pages), start Heading at h2text-4xl or text-5xl with font-bold
Article or docs reading text, help page paragraphstext-prose on the reading text; product screens keep text-bodytext-base with leading-6 or leading-relaxed
Table cell text, log line, dense list or panelTableCell sets text-data already; text-data for a list or panel; forms and descriptions keep text-bodytext-[13px], or text-xs/text-sm with a line height
Bold or highlighted name column, right-aligned number columnThe row's name in a TableRowAction, or TableCell identifier without one; numeric on the column's TableHead and TableCells for plain numbersfont-semibold or text-text-primary on a cell; text-right tabular-nums
Status pill in a table, coloured status dotBadge with dot; keep the filled Badge for categoriesA hand-drawn dot beside text, or filled badges down a status column
KPI tile, stat, big number in a cardMetricCard; for a number you place yourself, text-title-1 or text-title-2 with font-medium and tabular-numstext-2xl or text-3xl with font-bold
Dialog, sheet or tab panel titleDialogTitle, SheetTitle or AlertDialogTitle; for a tab panel, text-section on an h2–h6, as for a cardtext-xl or text-lg font-medium with a line height
Card or section title beside a small buttonCardContentHeader for a card's top, SectionHeading for a page section, TitleBlock size="sm" when it also needs a badge or description, else text-section on an h2–h6text-lg or font-semibold with a line height
Media object, icon or avatar beside a title and a line under it, list-item headerTitleBlock with TitleBlockMark, or an Avatar of the block's size (sm, md or lg): md for a name and a short fact, lg for a title and a sentenceA flex row with a hand-sized icon box
Icon tile, icon in a rounded square or circle beside a titleTitleBlockMark, with shape="round" for a circleIcon background="square" with size overrides
Loading placeholder for a title blockTitleBlockSkeletonSkeleton bars sized by hand

Common Mistakes

  • Heading is for long-form writing. On a page with its own title, already the h1 (a docs page's title uses text-display-2; an app page's, text-title-1), start Heading at h2. On a page with no title of its own, such as a standalone article or marketing page, Heading's h1 is the page's title. It sets the tag and a heading's style (as sets the tag, displayAs the visual level): h1 is text-title-1, h2 text-title-2 and h3 to h6 text-section; no level uses a display style. A page, card or section title that sits on a line with controls takes text-title-1 or text-section in place of Heading's sizes, still on an h1–h6, such as <h1 className="text-title-1">.
  • text-caption (12) is for metadata only: badges, timestamps, counts, ids and help under an input. Never a sentence people read; a description is text-body, or text-data in a table or list, in text-text-secondary.
  • A row is one line (36, or 44 comfortable) or two (52: a title over a short caption), never three. Long descriptions and ids go to a detail view or drawer.
  • Tables: comfortable (44) for a table people click into, regular (36) for one people mostly read and scan, such as a log, evaluations or a history; on a touch screen every table is 44. Put a row's actions in its last cell: they stay visible, grey until the row is hovered or focused. Never hide them until hover.
  • Small label titles should use Label to describe
  • NEVER make custom badges!! There are more than enough properties in Badge
    • Use ResourceBadge when referencing integrity-backed resources and ControlStatusBadge when referencing control statuses.
    • Avoid using badge size="sm" except for specific scenarios where space is at a premium like within tables. Most badges should be the default size="md"
  • Icons should be used sparingly. Ensure consistency when using them, try not to conflate multiple concepts with the same icon
  • Nav: decide between drill in, expand and NavSwitcher with "Which One to Use" on the Nav docs page, and follow its "Best Practices". Statuses go in a row's suffix, never its prefix. Under a sticky header, set --eq-nav-offset to the header's height on the element around the rail and panel; never override the nav's own top or max-height.
  • Avatar: no size in a list or row with one line per person, even inside a card. md for a person on their own: card or page header, an "Assigned to" field, a name with a line under it. lg in profile headers, xl for a profile or page hero (the largest person on a page). xs only beside an extra-small control. As a TitleBlock mark, give the Avatar the block's size (sm, md or lg): it does not take it from the block.
  • Table: rows draw a thin line between them. Don't add an nth-child fill. A button in a cell reaches into the cell's padding, so buttons you stack in one cell, or a row of them that wraps, overlap: give each my-0!. To change a cell's padding, set [--eq-table-cell-padding:4px] on the TableCell, not py-*.
  • No custom hex codes, no bg-{color}-{number} palette classes.
  • Keep interactive and status colours apart. They are two different purples, and they clash side by side:
    • button-* tokens and the primary variants of controls are lilac, for things you can click, select or toggle and their states. Never use them to colour a non-interactive surface, label or decoration.
    • brand-primary is the same lilac family as a brand accent. Equality uses it for progress, loading and charts; that's fine.
    • badge-* tokens and Badge, Alert, Banner, Timeline and Toast colours are for non-interactive status. Their primary is the purple palette, not the brand lilac, despite the name. Never use them for a hover, selected, active, checked, in-range or current-step state.
    • Get interactive states from the component that owns them (Button, IconButton, SegmentedControls, Tabs, Checkbox). If you need an interactive tint no component gives you, that's a gap: say so, as in rung 4 below, instead of borrowing a badge colour.

Non-negotiables

  • Correctness over convention. How something is currently done in the project you are working in is NOT evidence it is correct; existing usage is often wrong, and correcting it is the point. Judge against the Equality Docs guidance, never against the surrounding code. If a common, widely-copied pattern conflicts with the guidance, call it wrong rather than matching it.
  • Ground in the guidance, or stop. Read the relevant Equality docs guidance before you advise or review. If you cannot read it, say so plainly and stop; do not substitute repo conventions or your own assumptions and present them as guidance.
  • Correct is the floor, not the bar. A screen can use every component exactly as documented and still be a poor screen: cluttered, off the spacing scale, over-emphasized, saying the same thing twice. A model adds by default and rarely removes, so judge what is on the screen and whether each element earns its place, not only how each element is built. Do this as its own pass, and when you can run the UI, do it on the rendered result.

Equality Gaps

Verified absent — do not go hunting:

  • Accordion (use MotionCollapsibleContent)
  • Breadcrumb
  • Slider
  • Standalone Calendar or single date picker (only DateRangePicker)
  • Free-text or async autocomplete (Select with SelectSearch only filters fixed options)
  • Carousel
  • Rating
  • Resizable panels
  • File upload/dropzone
  • Rich text editor
  • Colour picker
  • Tree view
  • Charts beyond BarGraph and RadialGraph

Some of these components may exist in the project you're working within. If you find that they are used frequently tell your user — a repeated gap is a component request!

Setup

For a new app or prototype that doesn't have Equality yet, read references/setup.md before wiring it up — it covers the React/Astro requirement, install, theme wiring (Tailwind v4 vs. ThemeProvider), portal containers, embedding in a host with its own styles, and dark mode.

Writing Code

Everything comes from one entry point:

import { Badge, Button, Card, CardContent } from '@eqtylab/equality';

Variants carry the meaning. Components share a status vocabulary — primary, secondary, tertiary, success, warning, danger, neutral (exact set varies, so check the docs). ALWAYS reach for a variant before overriding with a colour class:

<Button variant="danger">Delete</Button>   // yes
<Button className="bg-red-600">Delete</Button>  // no

Button also takes size (sm/md/lg), prefix/suffix slots for icons, asChild to render as another element, and href to become a link.

Icons are Lucide. <Icon icon="Shield" /> takes a name string, so you don't need a direct Lucide dependency, and several components accept an icon name the same way (Badge, InfoCard, MetricCard, EmptyTableState). Button's prefix/suffix slots take a Lucide element instead — prefix={<Shield />}, with pnpm add lucide-react — because Icon wraps its glyph in a sized container of its own.

Never hardcode colour, and never invent spacing. Use the semantic Tailwind classes backed by tokens — bg-background, bg-background-raised, text-text-primary, text-text-secondary, border-border, text-text-danger. These flip correctly in dark mode; bg-slate-800 and #1e293b do not.

A control or row you build yourself takes its height, text and side padding from Equality's control decisions: h-(--eq-control-md-height) for height, a text style for its label in medium weight at every size (text-caption font-medium at sm, text-body font-medium at md, text-section font-medium at lg), and --eq-control-padding-x-condensed, -normal or -spacious (8, 12, 16) for side padding. Heights come in xs (24), sm (28), md (36) and lg (44). Use the text styles, not the control text names (--eq-control-*-font-size and -line-height): those are deprecated and a later major removes them. An icon beside the text takes --eq-control-{xs,sm,md,lg}-icon-size, such as size-(--eq-control-md-icon-size). Never write h-10. Text lines, controls, rows and avatars share seven size steps (16, 20, 24, 28, 36, 44, 52); the Sizing page says what sits on each: https://equality.eqtylab.io/getting-started/sizing. The steps are options: the values Equality allows. Control and text sizes are decisions chosen from them, and a part you build reads a decision where one fits. A picture or mark you build that isn't a control takes an option, --eq-size-{3xs,2xs,xs,sm,md,lg,xl}. Control sizes xs to lg, and Avatar's xs to xl, are the step they sit on; Avatar's default follows its line. Badge, Icon, Switch, Checkbox and Timeline use their own size names.

Product UI text takes one of five styles: text-title-1 for a page title, text-section for the title of a card, a section, or a tab panel (Dialog, Sheet and AlertDialog titles already have it), text-body for forms, descriptions and running text, text-data for tables, lists, logs and dense panels, and text-caption for metadata. A big number, such as a count in a dashboard, takes text-title-1 or text-title-2 with font-medium and tabular-nums. text-title-2 is for long-form writing, where Heading's h2 uses it. Docs, help pages and articles set their reading text in text-prose, 16 on 24; product screens keep text-body. A style is named for its role: -1 and -2 only where a role has two sizes, and 1 is the larger; never a size suffix such as -lg, and never a numbered body. Put a title style on an h1–h6, such as <h1 className="text-title-1">, so the title stays a heading. Each line follows its size: caption 12 on 16, data 13 on 20, body 14 on 20, section 16 on 24, title-2 20 on 28, title-1 28 on 36. Docs and marketing pages, never app screens, add text-display-2 36 on 44 for a docs page's or marketing section's title and text-display-1 48 on 52 for a landing page's hero. To line a title up with controls, put it in a row with them and centre it: a section title in a 28 row with small buttons, a page title in a 36 row with default ones. Put a heading's description close under it: none under a section title and 8 under title-1; a dialog or sheet spaces its own. Never pair a size with a hand-written line height, such as text-2xl leading-(--eq-control-md-height).

Merge classes with Equality's cn (import { cn } from '@eqtylab/equality/cn'). That path loads no CSS, so it works in tests and scripts too, and needs Equality 7.2.0 or later: check the app's version first. On 7.1.0, import cn from @eqtylab/equality; earlier versions don't export it. It knows the text styles; a cn of your own built on tailwind-merge drops a style that sits beside a text colour.

Accessibility is mostly free — don't undo it. Radix gives you focus management, escape handling, and ARIA wiring. You still have to supply the text: a label on IconButton, a <Label htmlFor> on every input, an accessible name on icon-only controls, and DialogTitle/SheetTitle on every overlay. Flag it to the developer if a request would make something inaccessible.

When nothing fits

Work down this ladder and stop at the first rung that works:

  1. Use Equality's decisions and text styles. Heights and sizes from the size and control decisions, colours from the semantic colour classes, type from the text styles. Never override Equality's decisions (--eq-*) to get a different value.
  2. Compose existing components. Most "missing" components are a Card with a SectionHeading and a other components inside.
  3. Override with className. Every component accepts it, styles are scoped with CSS Modules, and Tailwind utilities merge cleanly. This is sanctioned — use token-backed classes — but highly discouraged. If your user asks you to do it, note in the summary that they probably shouldn't.
  4. Build a local component out of tokens. Keep it in the app's components directory, name it plainly, and use Equality's tokens and utilities so it still looks native. Add a comment saying which Equality component it wants to become.
  5. Never restyle from scratch with arbitrary hex, bg-blue-500, or a duplicated Radix primitive. That is the failure this skill exists to prevent!

Reaching rung 4 is itself a signal. Say so in your summary, name the component you had to fake, and suggest the developer open an issue on eqtylab/equality so the gap reaches the design system team.

Validation

  • Ensure props were match the docs, not guessed.
  • Your design must survive dark mode and light modes — toggle it and look if you have browser tools.
  • Every input has a label; every icon-only control has an accessible name; every dialog and sheet has a title.
  • Nothing from the deprecated list in the index.

Reference files

  • https://equality.eqtylab.io/llms.txt — every component, import name, and purpose. Not bundled here, because the live copy is generated from the library and can't go stale. Start there!
  • references/setup.md — installation, theming, portals, embedding, dark mode, and the failure modes for each.

Files included

  • references/setup.md
  • SKILL.md

More skills