agentsclimarketplace

Ritual dapp design

Skill ritual-foundation/ritual-dapp-skills/skills/ritual-dapp-design

Ritual dApp design system — dark-mode-first color tokens, typography, Tailwind config, async lifecycle state visuals, precompile icons, and AI slop prevention. Use when styling a Ritual Chain frontend, building React/Next.js UI components, implementing async precompile status indicators, or reviewing dApp visual design for brand consistency.From its SKILL.md

Install
npx -y skills add ritual-foundation/ritual-dapp-skills --skill ritual-dapp-design

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

17.5 KB, as published. Nobody here has run it

Ritual dApp Design System

Design tokens and visual direction for Ritual Chain dApp frontends. Dark-mode-first, technically precise, and unmistakably Ritual.

How to Use This Skill

When styling a new Ritual dApp frontend:

  1. Copy the Tailwind tokens (Section 4) into your tailwind.config.ts.
  2. Set CSS custom properties for fonts (Section 3).
  3. Apply component class patterns (Section 5) to your UI elements.
  4. Map async precompile states to the 9-state lifecycle visuals (Section 6).
  5. Use the precompile icon table (Section 7) for any precompile selector or status display.
  6. Before shipping, run the AI slop self-check (Section 8) against your output.

When reviewing an existing dApp:

  1. Check the color palette against Section 2 — are semantic meanings preserved?
  2. Run the AI slop checklist (Section 8) to flag generic AI-generated patterns.
  3. Verify accessibility (Section 9) — especially gray-500 on elevated surfaces (fails WCAG AA).

Common edge cases:

  • Izoard is a licensed font. If you don't have it, substitute Archivo Black from Google Fonts.
  • gray-500 text on bg-ritual-elevated fails WCAG AA (3.7:1 ratio). Use gray-400 minimum.
  • The 9-state lifecycle covers all async precompiles, but synchronous precompiles (ONNX, Ed25519, JQ) don't have lifecycle states — they return in the same block.

1. Design Philosophy

Core Principles

  1. Precision over decoration. Every element earns its pixels. No ornament that doesn't communicate state, identity, or hierarchy. A green glow means TEE-verified. A pink border means AI-generated. If an element has no semantic reason to exist, remove it.

  2. Atmosphere over brightness. The dark canvas is not a concession to dark mode — it is the medium. Glows, mesh gradients, and noise grain create depth and dimension that only work on black. Light is used surgically: to draw attention, to signal state, to reward completion.

  3. Semantic honesty. Colors, shapes, and motion always mean what they mean. Green never decorates — it certifies. Gold never highlights — it warns. Pink never accents arbitrarily — it marks machine intelligence. Users learn to read the interface once and trust it forever.

What Ritual Is NOT

  • Not a generic DeFi dashboard (no candy gradients)
  • Not a Web2 SaaS (no rounded-everything pastel cards)
  • Not cyberpunk (no neon-on-neon chaos)
  • Not minimal to the point of sterile (has texture, has atmosphere)

2. Color Palette

Backgrounds

TokenHexUsage
bg-primary#000000Page background, base layer
bg-elevated#111827Cards, modals, elevated surfaces
bg-surface#1F2937Input fields, dropdown menus
bg-overlayrgba(0,0,0,0.8)Modal overlays, sheet backgrounds

Accent Colors

TokenHexUsage
accent-green#19D184Primary CTAs, success states, TEE verified, active indicators
accent-lime#BFFF00Highlight text, data emphasis, hover states
accent-pink#FF1DCEAI/agent features, persistent agent UI, creative precompiles
accent-gold#FACC15Warnings, pending states, fee displays
accent-red#EF4444Errors, failed states, destructive actions

Grays

TokenHexUsage
gray-700#374151Borders, dividers
gray-500#6B7280Secondary text, labels
gray-400#9CA3AFBody text (on dark backgrounds)
gray-300#D1D5DBPrimary text headings
gray-100#F3F4F6High-emphasis text (use sparingly)

Color Rules

  1. Green = trust. Use accent-green for anything verified, successful, or connected.
  2. Pink = AI. Any precompile output, agent action, or generated content gets pink accents.
  3. Lime = data. Highlighted numbers, key metrics, and interactive data points.
  4. Gold = caution. Pending operations, fee warnings, lock durations.
  5. Avoid pure white #FFFFFF for backgrounds. Maximum is gray-100 for text.
  6. Prefer green over blue for primary actions. Blue is best reserved for link affordances.

3. Typography

Font Stack

RoleFontFallback
Display / HeadlinesIzoard'Izoard', system-ui, sans-serif
Body / UIBarlow'Barlow', 'Inter', system-ui, sans-serif
Code / DataJetBrains Mono'JetBrains Mono', 'Fira Code', monospace

Note: Izoard is a licensed font from atipo foundry. For open-source projects, substitute with Archivo or Archivo Black (Google Fonts). The key functional requirement: always use a monospace font for hex addresses, data values, and block numbers.

Open-Source Font Alternatives

RoleLicensedOpen-Source SubstituteGoogle Fonts
DisplayIzoard 700Archivo Black 400 (reads as bold)Yes
Display (lighter)Izoard 400Archivo 600Yes
BodyBarlow 400/600Barlow 400/600 (already free)Yes
MonoJetBrains MonoJetBrains Mono (already free)Yes

Type Scale

ElementFontSizeWeightLetter-spacingTransform
Hero titleIzoard4rem (64px)700-0.02em—
Section titleIzoard2.5rem (40px)700-0.01em—
Card titleBarlow1.25rem (20px)6000—
BodyBarlow1rem (16px)4000—
Body smallBarlow0.875rem (14px)4000—
Data labelBarlow0.75rem (12px)5000.1emuppercase
Data valueJetBrains Mono0.875rem (14px)5000—
Hex/addressJetBrains Mono0.75rem (12px)4000—
ButtonBarlow0.875rem (14px)6000.02em—

CSS Custom Properties

:root {
  --font-display: 'Izoard', system-ui, sans-serif;
  --font-body: 'Barlow', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

Typographic Rules

  • Italic: Use only for AI-generated content attribution (e.g., "Generated by claude-sonnet-4-5-20250929") and inline emphasis. Not for body paragraphs.
  • Long-form body text: max-width: 65ch, line-height: 1.75, Barlow 16px/400.
  • Fluid display sizes: Use clamp() for hero and section titles to scale without breakpoints: font-size: clamp(2.5rem, 5vw, 4rem).

4. Tailwind Tokens

Extend your Tailwind config with these Ritual-specific tokens:

const config = {
  theme: {
    extend: {
      colors: {
        ritual: {
          black: '#000000', elevated: '#111827', surface: '#1F2937',
          green: '#19D184', lime: '#BFFF00', pink: '#FF1DCE', gold: '#FACC15',
        },
      },
      fontFamily: {
        display: ['var(--font-display)', 'system-ui', 'sans-serif'],
        body: ['var(--font-body)', 'Inter', 'system-ui', 'sans-serif'],
        mono: ['var(--font-mono)', 'Fira Code', 'monospace'],
      },
      boxShadow: {
        'glow-green': '0 0 30px -5px rgba(25, 209, 132, 0.25)',
        'glow-pink': '0 0 30px -5px rgba(255, 29, 206, 0.2)',
        'card': '0 4px 40px -12px rgba(0, 0, 0, 0.5)',
      },
    },
  },
};

5. Component Style Patterns

Class-level patterns. Build your own components around these tokens.

ElementRecommended Classes
Page backgroundbg-black min-h-screen text-gray-300 font-body
Cardbg-ritual-elevated border border-gray-800 rounded-xl shadow-card p-6
Primary buttonborder border-ritual-green text-ritual-green hover:bg-ritual-green/10 px-4 py-2.5 rounded-lg font-semibold
Secondary buttonborder border-dashed border-ritual-gold text-ritual-gold hover:bg-ritual-gold/10
Ghost buttonborder border-gray-700 text-gray-400 hover:border-gray-600
Danger buttonborder border-red-500/50 text-red-400 hover:bg-red-500/10
Text inputbg-ritual-surface border border-gray-700 rounded-lg px-4 py-3 text-sm text-gray-300
Data labeltext-xs text-gray-500 uppercase tracking-wider
Data valuetext-sm text-gray-300 font-mono
Hex addressfont-mono text-xs text-gray-500 (truncate to 0x1234...5678)
Section dividerh-px bg-gradient-to-r from-ritual-green/30 via-gray-800 to-transparent
Focus ringfocus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ritual-green/50 focus-visible:ring-offset-2 focus-visible:ring-offset-black

Ritual buttons are transparent with borders, not filled. The primary button is a green-bordered outline that glows on hover — filled buttons feel consumer/SaaS, outlines feel technical/crypto-native. Use rounded-xl max; mix with sharper corners where appropriate.


6. Async Lifecycle States

Every async precompile operation passes through up to 9 states. Each state has a distinct visual treatment. Always pair color with an icon and text label — never rely on color alone (see Accessibility).

StateDot ColorAnimatedText ColorIcon
Submittinggraypulsetext-gray-400·
Awaiting Executorgoldpulsetext-ritual-gold◌
Committedgoldstatictext-ritual-gold◉
Processinggreenpulsetext-ritual-green⟳
Result Readygreenstatictext-ritual-green◈
Settlinggoldstatictext-ritual-gold◎
Settledgreenstatictext-ritual-green✓
Failedredstatictext-red-400✗
Expiredgray-600nonetext-gray-500⊘

7. Ritual Visual Language

Precompile Type Icons

Each precompile type has a geometric icon. Green = data operations, pink = AI/inference, lime = cryptographic, gold = scheduling.

TypeAddressIconColor
ONNX0x0800⬡green
HTTP0x0801⇄green
LLM0x0802◇pink
JQ0x0803{}green
Long HTTP0x0805⟳green
ZK Long-Running0x0806△lime
FHE0x0807◈lime
Sovereign Agent0x080C▣pink
Image0x0818◐pink
Audio0x0819♫pink
Video0x081A▶pink
Persistent Agent0x0820⊞pink

TEE Verification Badge

A green badge with "TEE Verified" text signals enclave-computed results. Style: bg-ritual-green/10 text-ritual-green border border-ritual-green/20. Include a small geometric icon (rotated square suggesting a hexagon) for visual weight.

AI Output Treatment

Any content produced by an AI precompile (LLM, Agent, Image, etc.) should be visually distinguished with a pink top-border gradient (border-ritual-pink/20), a diamond icon ◇ with "AI Output" label, and the model name in gray monospace.

Scheduler Badge

Transactions from the system scheduler (sender 0x000...fa7e, type 0x10) should show a gold ⏲ Scheduled badge to distinguish them from user-initiated calls.

spcCalls Receipt Display

Ritual transaction receipts include an spcCalls array (precompile input/output pairs inline). Display these as collapsible monospace blocks with a "Decode" action.

Encrypted Content

ECIES-encrypted results should show a blurred placeholder with a lock icon and "Decrypt" button. Only the user's key can read the content.


8. AI Slop Detection Checklist

Before shipping any Ritual dApp UI, audit against these signals of generic AI-generated design:

Red FlagWhy It's WrongFix
Purple/violet gradientsDefault AI color scheme, screams "ChatGPT made this"Use Ritual's green/lime/pink accents on black
System fonts (Inter everywhere)No brand identityUse Izoard for display, Barlow for body
Perfectly symmetric grid layoutsFeels templated, no visual tensionBreak one column wider, offset elements
Generic gray #f5f5f5 backgroundsWeb2 SaaS energyPure black #000000 with #111827 cards
box-shadow: 0 2px 8px rgba(0,0,0,0.1)The default AI shadowUse dramatic shadow-card or glow variants
Rounded-2xl on everythingFriendly/consumer, not crypto-nativeMix sharp corners with selective rounding
Blue primary buttonsEvery AI defaultGreen border buttons with glow
Stock gradient hero sectionsImmediately recognizable as AIMesh gradients with noise texture
backdrop-blur-xl everywhereOverused glassmorphismOne blur layer max, for overlays only
Rainbow/multicolor schemesNo focus, no brandDisciplined 3-color maximum per screen
Centered everythingNo visual hierarchyLeft-align text, use asymmetric layouts
animate-bounce on CTAsAnnoying, unprofessionalSubtle pulse-green glow or no animation

Self-Check Protocol

Before generating any UI component, check your output for these patterns and replace with the Ritual equivalent:

Pattern to DetectReplacement
Inter or Roboto as display fontvar(--font-display) (Izoard / Archivo)
#6366f1 or #3b82f6 (indigo/blue)#19D184 (ritual-green) or #FF1DCE (ritual-pink)
bg-white or bg-gray-50bg-black (page) or bg-ritual-elevated (card)
shadow-md or shadow-lgshadow-card or shadow-glow-green
rounded-2xl or rounded-3xlrounded-xl max
animate-bounceanimate-pulse-green or remove
bg-blue-500 text-white buttonborder border-ritual-green text-ritual-green

9. Accessibility

Color Contrast Audit

ForegroundBackgroundRatioWCAG AA (4.5:1)
gray-300 (#D1D5DB)black (#000000)13.8:1Pass
gray-400 (#9CA3AF)black (#000000)8.3:1Pass
gray-500 (#6B7280)black (#000000)4.6:1Pass
green (#19D184)black (#000000)7.5:1Pass
green (#19D184)elevated (#111827)6.0:1Pass
pink (#FF1DCE)elevated (#111827)4.6:1Pass
red (#EF4444)black (#000000)4.6:1Pass
gray-500 (#6B7280)elevated (#111827)3.7:1Fail

Key finding: gray-500 on bg-ritual-elevated fails WCAG AA. Use gray-400 (#9CA3AF) minimum for any text on elevated surfaces.

Colorblind Safety

Green and red are the primary success/error pair. For red-green colorblind users (~8% of males), never rely on color alone:

StateColorRequired Non-Color Signal
SuccessGreenCheckmark icon (✓) + "Success" text
ErrorRedX icon (✗) + "Failed" text + shake animation
PendingGoldClock icon (◌) + "Pending" text + pulse
AI outputPinkDiamond icon (◇) + "AI Output" label

ARIA Patterns

ComponentRequired ARIA
Status indicatorsrole="status" + aria-label="Job status: {text}"
Progress barsrole="progressbar" + aria-valuenow + aria-valuemax
Streaming textrole="log" + aria-live="polite"
Toastsrole="alert"
Modalsrole="dialog" + aria-modal="true" + aria-label="{title}"

Additional Requirements

  • Focus ring on all interactive elements: focus-visible:ring-2 focus-visible:ring-ritual-green/50 focus-visible:ring-offset-2 focus-visible:ring-offset-black
  • Reduced motion: Wrap animations in @media (prefers-reduced-motion: reduce) or use Framer Motion's useReducedMotion.
  • Touch targets: 44x44px minimum on mobile for all interactive elements.
  • Semantic HTML: Use <main>, <nav>, <table>, <dialog> — not divs for everything.
  • Skip navigation: Add a visually-hidden skip link at the top of every page.

10. Responsive Design

BreakpointWidthBehavior
sm640pxStack to single column, reduce padding
md768pxSidebar moves below main content
lg1024pxTwo-column layout activates
xl1280pxMaximum content width
  • Transaction status cards stack vertically and become full-width on mobile.
  • Hex addresses always truncate to 0x1234...5678.
  • Toast notifications anchor to bottom-center on mobile, bottom-right on desktop.
  • Font sizes use fluid clamp() — see Typography section.
  • Buttons become full-width on mobile (w-full sm:w-auto).

Quick Reference

ConceptValue
Page backgroundbg-black (#000000)
Card backgroundbg-ritual-elevated (#111827)
Primary accentritual-green (#19D184) — trust, success
AI accentritual-pink (#FF1DCE) — agent/generated
Warning accentritual-gold (#FACC15) — pending, fees
Data accentritual-lime (#BFFF00) — metrics, emphasis
Display fontIzoard (licensed) / Archivo Black (open-source)
Body fontBarlow (free)
Mono fontJetBrains Mono (free)
Chain ID1979
Scheduler system sender0x000...fa7e (type 0x10)
Button styleTransparent + colored border + glow on hover
Max roundingrounded-xl — mix with sharper corners
Min text on elevatedgray-400 (#9CA3AF) for WCAG AA compliance

Keep looking

Skills are one crate of 627,801. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.