Delta
interlace-ui/deltaFreeComponent
"It moved, this much, this way." The smallest complete unit of analysis and the most-repeated element in a dense view, so it is worth getting exactly right once.
Install it
npx shadcn@latest add https://ds.interlace.tools/r/delta.jsonSource
1import * as React from 'react';23// @interlace/delta v1.1.0 — Interlace design system.4// Docs, props and live preview: https://ds.interlace.tools/c/delta5// What changed since: https://ds.interlace.tools/c/delta#history6// Generated banner — keep it, the upgrade diff reads this version.78/**9 * @interlace/ui — Delta10 *11 * "It moved, this much, this way." The smallest complete unit of analysis and12 * the most-repeated element in a dense view, so it is worth getting exactly13 * right once.14 *15 * ## Three signals, not one16 *17 * Direction is carried by a **glyph** (▲ ▼ –), a **sign** (+ / −), and a18 * **colour** — in that order of reliability. Colour is last on purpose: it is19 * the one that disappears in greyscale, in bright sun, and for the ~8% of men20 * with red-green colour vision deficiency. Any of the three alone is enough to21 * read the value, which is the actual requirement behind WCAG 1.4.1.22 *23 * ## "Good" is not a property of a number24 *25 * A rising error rate is bad; a rising follower count is good. `polarity`26 * decides which direction gets `--viz-positive`. It defaults to `normal`27 * (up = good) because that is the common case, but a chart of latency,28 * bounce rate, or cost must pass `polarity="inverse"` — otherwise the29 * dashboard cheerfully paints a regression green.30 *31 * ## MIN_VIEWPORT — 32032 *33 * Inline text; wraps with its line.34 *35 * | Rule | Concept | Where in this file |36 * | ---- | -------------------------- | ------------------------------------------------------ |37 * | R6 | data-slot | `data-slot="delta"` |38 * | R7 | className merged + ...rest | `cn(...)` + `{...props}` |39 * | R8 | Enums for >2 states | `polarity` (normal/inverse); `direction` from the data |40 * | R14 | Declares min viewport | `data-min-viewport={String(MIN_VIEWPORT)}` |41 * | R18 | Tailwind only | zero inline `style` |42 * | R19 | Tokens only | `text-viz-positive/-negative/-neutral` |43 * | R20 | AA contrast | aliases `--success` / `--destructive` (≥7:1 both themes)|44 * | R26 | A11y | glyph is `aria-hidden`; the sentence is in the label |45 */4647import { cn } from '@/lib/utils';48// … truncated
More from interlace-ui
All 140 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| A11y Startera11y-starter | interlace-ui | Components | Free | no deps | |
| Accordionaccordion | interlace-ui | Components | Free | no deps | |
| Alertalert | interlace-ui | Components | Free | no deps | |
| Alert Dialogalert-dialog | interlace-ui | Components | Free | no deps | |
| Animated Gradient Textanimated-gradient-text | interlace-ui | Components | Free | no deps | |
| Animated Grid Patternanimated-grid-pattern | interlace-ui | Components | Free | no deps | |
| Animated Listanimated-list | interlace-ui | Components | Free | no deps | |
| Article Cardarticle-card | interlace-ui | Components | Free | no deps |
