Files
tai/research/tui-framework-design/ratatui-kit-theming.md
T
2026-10-12 00:53:52 +02:00

2.2 KiB

ratatui-kit theming docs — palette-as-source-of-truth resolution

Metadata

Field Value
Institute Molodetz Institute — Research & Retrieval Division
Subject tui-framework-design
Document type Source Dossier
Tier 1
Source title ratatui-kit theming documentation — Palette, themes, Provider switching
Source URL https://github.com/yexiyue/ratatui-kit/blob/HEAD/docs/src/content/docs/core/theming.mdx
Source publisher / author yexiyue (ratatui-kit project)
Source type vendor docs
Source date (published) Unknown — not stated
Date researched 2026-10-11
Researched by tai (agent), model: Muse Spark, on behalf of retoor
Research method direct page fetch
Confidence Medium
Status Active

Summary

The best style-resolution pattern surveyed: a 16-slot Palette in 5 groups serves as the single source of truth, component themes derive via FooTheme::from_palette, and an Atom + Provider pair switches the active theme. The palette-derives-everything flow is what tai ports.

Key findings

  • One 16-slot Palette organized in 5 groups is the source of truth; component themes derive from it (FooTheme::from_palette).
  • Theme switching goes through an Atom + Provider pair that swaps the active theme for all derived styles.
  • The palette type is marked non-exhaustive, leaving room for the role set to grow.

Pros / strengths

  • Derive-don't-duplicate: components never hardcode colors, so a switch propagates everywhere by construction.
  • Non-exhaustive palette is the right growth story for a role set that will gain members.

Cons / limitations / caveats

  • The Atom/Provider reactivity machinery is framework-scale; tai ports the derivation direction (theme → styles at draw time), not the reactive plumbing.

Relevance to tai

  • Resolution pattern behind the palette-role conclusion: style objects store role names and resolve against the current theme at draw time, with raw colors as an escape hatch; the non-exhaustive lesson becomes tai's growth headroom.

Changelog

Date Change
2026-10-11 Initial dossier created from 2026-10-11 research-pass evidence (body opened via web_fetch by researching agent).