@tenphi/tasty 0.0.0-snapshot.fafcbfe → 0.0.0-snapshot.fc19da9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (330) hide show
  1. package/README.md +497 -266
  2. package/dist/babel-types-DpUCD2L_.d.ts +18 -0
  3. package/dist/chunks/async-storage-f9j9JRtq.js +37 -0
  4. package/dist/chunks/async-storage-f9j9JRtq.js.map +1 -0
  5. package/dist/chunks/build-config-BDLYGmKn.js +60 -0
  6. package/dist/chunks/build-config-BDLYGmKn.js.map +1 -0
  7. package/dist/chunks/collector-DqcB0UUT.js +210 -0
  8. package/dist/chunks/collector-DqcB0UUT.js.map +1 -0
  9. package/dist/chunks/config-engine-CGIMO2PV.js +272 -0
  10. package/dist/chunks/config-engine-CGIMO2PV.js.map +1 -0
  11. package/dist/chunks/config-file-DlZXJMj8.js +25 -0
  12. package/dist/chunks/config-file-DlZXJMj8.js.map +1 -0
  13. package/dist/chunks/css-definitions-BibU6ZnP.js +904 -0
  14. package/dist/chunks/css-definitions-BibU6ZnP.js.map +1 -0
  15. package/dist/chunks/css-resources-P7IBUUZs.js +142 -0
  16. package/dist/chunks/css-resources-P7IBUUZs.js.map +1 -0
  17. package/dist/chunks/debug-BzYPQ0H2.js +502 -0
  18. package/dist/chunks/debug-BzYPQ0H2.js.map +1 -0
  19. package/dist/chunks/dsl-DRhFWQzo.js +1378 -0
  20. package/dist/chunks/dsl-DRhFWQzo.js.map +1 -0
  21. package/dist/chunks/hydration-TRcz5vnk.js +41 -0
  22. package/dist/chunks/hydration-TRcz5vnk.js.map +1 -0
  23. package/dist/chunks/react-runtime-B2e-Wha-.js +689 -0
  24. package/dist/chunks/react-runtime-B2e-Wha-.js.map +1 -0
  25. package/dist/chunks/runtime-engine-yeyCAx2e.js +2431 -0
  26. package/dist/chunks/runtime-engine-yeyCAx2e.js.map +1 -0
  27. package/dist/chunks/runtime-state-C0u1jp-Q.js +141 -0
  28. package/dist/chunks/runtime-state-C0u1jp-Q.js.map +1 -0
  29. package/dist/{utils/merge-styles.js → chunks/shared-utils-y-HjvPN4.js} +61 -58
  30. package/dist/chunks/shared-utils-y-HjvPN4.js.map +1 -0
  31. package/dist/chunks/style-engine-D35rvcdB.js +5420 -0
  32. package/dist/chunks/style-engine-D35rvcdB.js.map +1 -0
  33. package/dist/chunks/zero-engine-DpkieEPZ.js +310 -0
  34. package/dist/chunks/zero-engine-DpkieEPZ.js.map +1 -0
  35. package/dist/collector-D4POJ53X.d.ts +164 -0
  36. package/dist/config-DvPUj4cw.d.ts +1364 -0
  37. package/dist/core/index.d.ts +5 -33
  38. package/dist/core/index.js +9 -26
  39. package/dist/hydrate-CRyjjAyl.d.ts +22 -0
  40. package/dist/index-DC4q-xDq.d.ts +1946 -0
  41. package/dist/index.d.ts +5 -40
  42. package/dist/index.js +11 -33
  43. package/dist/{utils/merge-styles.d.ts → merge-styles-Jb5iZ-Jf.d.ts} +3 -4
  44. package/dist/ssr/astro-client.d.ts +1 -0
  45. package/dist/ssr/astro-client.js +6 -0
  46. package/dist/ssr/astro-client.js.map +1 -0
  47. package/dist/ssr/astro-middleware-extract-static.d.ts +10 -0
  48. package/dist/ssr/astro-middleware-extract-static.js +9 -0
  49. package/dist/ssr/astro-middleware-extract-static.js.map +1 -0
  50. package/dist/ssr/astro-middleware-extract.d.ts +10 -0
  51. package/dist/ssr/astro-middleware-extract.js +9 -0
  52. package/dist/ssr/astro-middleware-extract.js.map +1 -0
  53. package/dist/ssr/astro-middleware-static.d.ts +17 -0
  54. package/dist/ssr/astro-middleware-static.js +7 -0
  55. package/dist/ssr/astro-middleware-static.js.map +1 -0
  56. package/dist/ssr/astro-middleware.d.ts +18 -0
  57. package/dist/ssr/astro-middleware.js +7 -0
  58. package/dist/ssr/astro-middleware.js.map +1 -0
  59. package/dist/ssr/astro.d.ts +127 -0
  60. package/dist/ssr/astro.js +221 -0
  61. package/dist/ssr/astro.js.map +1 -0
  62. package/dist/ssr/client.d.ts +2 -0
  63. package/dist/ssr/client.js +2 -0
  64. package/dist/ssr/index.d.ts +17 -0
  65. package/dist/ssr/index.js +10 -0
  66. package/dist/ssr/index.js.map +1 -0
  67. package/dist/ssr/next-config.d.ts +64 -0
  68. package/dist/ssr/next-config.js +123 -0
  69. package/dist/ssr/next-config.js.map +1 -0
  70. package/dist/ssr/next.d.ts +46 -0
  71. package/dist/ssr/next.js +60 -0
  72. package/dist/ssr/next.js.map +1 -0
  73. package/dist/static/index.d.ts +90 -5
  74. package/dist/static/index.js +31 -4
  75. package/dist/static/index.js.map +1 -0
  76. package/dist/static/inject.d.ts +4 -0
  77. package/dist/static/inject.js +17 -0
  78. package/dist/static/inject.js.map +1 -0
  79. package/dist/types-ZbF2_6LV.d.ts +1567 -0
  80. package/dist/zero/babel.d.ts +49 -90
  81. package/dist/zero/babel.js +252 -119
  82. package/dist/zero/babel.js.map +1 -1
  83. package/dist/zero/index.d.ts +117 -3
  84. package/dist/zero/index.js +23 -3
  85. package/dist/zero/index.js.map +1 -0
  86. package/dist/zero/next.d.ts +58 -33
  87. package/dist/zero/next.js +89 -59
  88. package/dist/zero/next.js.map +1 -1
  89. package/docs/README.md +42 -0
  90. package/docs/adoption.md +331 -0
  91. package/docs/ai-agents.md +252 -0
  92. package/docs/comparison.md +449 -0
  93. package/docs/configuration.md +943 -0
  94. package/docs/debug.md +333 -0
  95. package/docs/design-system.md +557 -0
  96. package/docs/dsl.md +1093 -0
  97. package/docs/getting-started.md +297 -0
  98. package/docs/injector.md +633 -0
  99. package/docs/methodology.md +673 -0
  100. package/docs/migration-v3.md +285 -0
  101. package/docs/pipeline.md +768 -0
  102. package/docs/plugins.md +333 -0
  103. package/docs/react-api.md +703 -0
  104. package/docs/runtime-benchmarks.md +388 -0
  105. package/docs/ssr.md +630 -0
  106. package/docs/styles.md +725 -0
  107. package/docs/tasty-static.md +659 -0
  108. package/package.json +238 -50
  109. package/tasty.config.ts +6 -0
  110. package/dist/_virtual/_rolldown/runtime.js +0 -8
  111. package/dist/chunks/cacheKey.js +0 -70
  112. package/dist/chunks/cacheKey.js.map +0 -1
  113. package/dist/chunks/definitions.d.ts +0 -37
  114. package/dist/chunks/definitions.js +0 -260
  115. package/dist/chunks/definitions.js.map +0 -1
  116. package/dist/chunks/renderChunk.js +0 -61
  117. package/dist/chunks/renderChunk.js.map +0 -1
  118. package/dist/config.d.ts +0 -280
  119. package/dist/config.js +0 -403
  120. package/dist/config.js.map +0 -1
  121. package/dist/debug.d.ts +0 -204
  122. package/dist/debug.js +0 -733
  123. package/dist/debug.js.map +0 -1
  124. package/dist/hooks/useGlobalStyles.d.ts +0 -27
  125. package/dist/hooks/useGlobalStyles.js +0 -56
  126. package/dist/hooks/useGlobalStyles.js.map +0 -1
  127. package/dist/hooks/useKeyframes.d.ts +0 -56
  128. package/dist/hooks/useKeyframes.js +0 -54
  129. package/dist/hooks/useKeyframes.js.map +0 -1
  130. package/dist/hooks/useProperty.d.ts +0 -79
  131. package/dist/hooks/useProperty.js +0 -91
  132. package/dist/hooks/useProperty.js.map +0 -1
  133. package/dist/hooks/useRawCSS.d.ts +0 -53
  134. package/dist/hooks/useRawCSS.js +0 -28
  135. package/dist/hooks/useRawCSS.js.map +0 -1
  136. package/dist/hooks/useStyles.d.ts +0 -40
  137. package/dist/hooks/useStyles.js +0 -169
  138. package/dist/hooks/useStyles.js.map +0 -1
  139. package/dist/injector/index.d.ts +0 -157
  140. package/dist/injector/index.js +0 -154
  141. package/dist/injector/index.js.map +0 -1
  142. package/dist/injector/injector.d.ts +0 -139
  143. package/dist/injector/injector.js +0 -404
  144. package/dist/injector/injector.js.map +0 -1
  145. package/dist/injector/sheet-manager.d.ts +0 -127
  146. package/dist/injector/sheet-manager.js +0 -714
  147. package/dist/injector/sheet-manager.js.map +0 -1
  148. package/dist/injector/types.d.ts +0 -135
  149. package/dist/keyframes/index.js +0 -206
  150. package/dist/keyframes/index.js.map +0 -1
  151. package/dist/parser/classify.js +0 -319
  152. package/dist/parser/classify.js.map +0 -1
  153. package/dist/parser/const.js +0 -33
  154. package/dist/parser/const.js.map +0 -1
  155. package/dist/parser/lru.js +0 -109
  156. package/dist/parser/lru.js.map +0 -1
  157. package/dist/parser/parser.d.ts +0 -25
  158. package/dist/parser/parser.js +0 -116
  159. package/dist/parser/parser.js.map +0 -1
  160. package/dist/parser/tokenizer.js +0 -69
  161. package/dist/parser/tokenizer.js.map +0 -1
  162. package/dist/parser/types.d.ts +0 -51
  163. package/dist/parser/types.js +0 -46
  164. package/dist/parser/types.js.map +0 -1
  165. package/dist/pipeline/conditions.d.ts +0 -134
  166. package/dist/pipeline/conditions.js +0 -400
  167. package/dist/pipeline/conditions.js.map +0 -1
  168. package/dist/pipeline/exclusive.js +0 -231
  169. package/dist/pipeline/exclusive.js.map +0 -1
  170. package/dist/pipeline/index.d.ts +0 -53
  171. package/dist/pipeline/index.js +0 -641
  172. package/dist/pipeline/index.js.map +0 -1
  173. package/dist/pipeline/materialize.js +0 -908
  174. package/dist/pipeline/materialize.js.map +0 -1
  175. package/dist/pipeline/parseStateKey.d.ts +0 -15
  176. package/dist/pipeline/parseStateKey.js +0 -430
  177. package/dist/pipeline/parseStateKey.js.map +0 -1
  178. package/dist/pipeline/simplify.js +0 -557
  179. package/dist/pipeline/simplify.js.map +0 -1
  180. package/dist/plugins/okhsl-plugin.d.ts +0 -35
  181. package/dist/plugins/okhsl-plugin.js +0 -371
  182. package/dist/plugins/okhsl-plugin.js.map +0 -1
  183. package/dist/plugins/types.d.ts +0 -69
  184. package/dist/properties/index.js +0 -158
  185. package/dist/properties/index.js.map +0 -1
  186. package/dist/states/index.d.ts +0 -49
  187. package/dist/states/index.js +0 -416
  188. package/dist/states/index.js.map +0 -1
  189. package/dist/static/tastyStatic.d.ts +0 -46
  190. package/dist/static/tastyStatic.js +0 -31
  191. package/dist/static/tastyStatic.js.map +0 -1
  192. package/dist/static/types.d.ts +0 -49
  193. package/dist/static/types.js +0 -24
  194. package/dist/static/types.js.map +0 -1
  195. package/dist/styles/align.d.ts +0 -15
  196. package/dist/styles/align.js +0 -14
  197. package/dist/styles/align.js.map +0 -1
  198. package/dist/styles/border.d.ts +0 -25
  199. package/dist/styles/border.js +0 -114
  200. package/dist/styles/border.js.map +0 -1
  201. package/dist/styles/color.d.ts +0 -14
  202. package/dist/styles/color.js +0 -23
  203. package/dist/styles/color.js.map +0 -1
  204. package/dist/styles/createStyle.js +0 -77
  205. package/dist/styles/createStyle.js.map +0 -1
  206. package/dist/styles/dimension.js +0 -97
  207. package/dist/styles/dimension.js.map +0 -1
  208. package/dist/styles/display.d.ts +0 -37
  209. package/dist/styles/display.js +0 -67
  210. package/dist/styles/display.js.map +0 -1
  211. package/dist/styles/fade.d.ts +0 -15
  212. package/dist/styles/fade.js +0 -58
  213. package/dist/styles/fade.js.map +0 -1
  214. package/dist/styles/fill.d.ts +0 -44
  215. package/dist/styles/fill.js +0 -51
  216. package/dist/styles/fill.js.map +0 -1
  217. package/dist/styles/flow.d.ts +0 -16
  218. package/dist/styles/flow.js +0 -12
  219. package/dist/styles/flow.js.map +0 -1
  220. package/dist/styles/gap.d.ts +0 -31
  221. package/dist/styles/gap.js +0 -37
  222. package/dist/styles/gap.js.map +0 -1
  223. package/dist/styles/height.d.ts +0 -17
  224. package/dist/styles/height.js +0 -20
  225. package/dist/styles/height.js.map +0 -1
  226. package/dist/styles/index.d.ts +0 -2
  227. package/dist/styles/index.js +0 -9
  228. package/dist/styles/index.js.map +0 -1
  229. package/dist/styles/inset.d.ts +0 -52
  230. package/dist/styles/inset.js +0 -150
  231. package/dist/styles/inset.js.map +0 -1
  232. package/dist/styles/justify.d.ts +0 -15
  233. package/dist/styles/justify.js +0 -14
  234. package/dist/styles/justify.js.map +0 -1
  235. package/dist/styles/list.d.ts +0 -16
  236. package/dist/styles/list.js +0 -98
  237. package/dist/styles/list.js.map +0 -1
  238. package/dist/styles/margin.d.ts +0 -24
  239. package/dist/styles/margin.js +0 -104
  240. package/dist/styles/margin.js.map +0 -1
  241. package/dist/styles/outline.d.ts +0 -29
  242. package/dist/styles/outline.js +0 -65
  243. package/dist/styles/outline.js.map +0 -1
  244. package/dist/styles/padding.d.ts +0 -24
  245. package/dist/styles/padding.js +0 -104
  246. package/dist/styles/padding.js.map +0 -1
  247. package/dist/styles/predefined.d.ts +0 -73
  248. package/dist/styles/predefined.js +0 -241
  249. package/dist/styles/predefined.js.map +0 -1
  250. package/dist/styles/preset.d.ts +0 -47
  251. package/dist/styles/preset.js +0 -126
  252. package/dist/styles/preset.js.map +0 -1
  253. package/dist/styles/radius.d.ts +0 -14
  254. package/dist/styles/radius.js +0 -51
  255. package/dist/styles/radius.js.map +0 -1
  256. package/dist/styles/scrollbar.d.ts +0 -21
  257. package/dist/styles/scrollbar.js +0 -105
  258. package/dist/styles/scrollbar.js.map +0 -1
  259. package/dist/styles/shadow.d.ts +0 -14
  260. package/dist/styles/shadow.js +0 -24
  261. package/dist/styles/shadow.js.map +0 -1
  262. package/dist/styles/styledScrollbar.d.ts +0 -47
  263. package/dist/styles/styledScrollbar.js +0 -38
  264. package/dist/styles/styledScrollbar.js.map +0 -1
  265. package/dist/styles/transition.d.ts +0 -14
  266. package/dist/styles/transition.js +0 -158
  267. package/dist/styles/transition.js.map +0 -1
  268. package/dist/styles/types.d.ts +0 -498
  269. package/dist/styles/width.d.ts +0 -17
  270. package/dist/styles/width.js +0 -20
  271. package/dist/styles/width.js.map +0 -1
  272. package/dist/tasty.d.ts +0 -982
  273. package/dist/tasty.js +0 -191
  274. package/dist/tasty.js.map +0 -1
  275. package/dist/tokens/typography.d.ts +0 -19
  276. package/dist/tokens/typography.js +0 -237
  277. package/dist/tokens/typography.js.map +0 -1
  278. package/dist/types.d.ts +0 -184
  279. package/dist/utils/cache-wrapper.js +0 -26
  280. package/dist/utils/cache-wrapper.js.map +0 -1
  281. package/dist/utils/case-converter.js +0 -8
  282. package/dist/utils/case-converter.js.map +0 -1
  283. package/dist/utils/colors.d.ts +0 -5
  284. package/dist/utils/colors.js +0 -9
  285. package/dist/utils/colors.js.map +0 -1
  286. package/dist/utils/css-types.d.ts +0 -7
  287. package/dist/utils/dotize.d.ts +0 -26
  288. package/dist/utils/dotize.js +0 -122
  289. package/dist/utils/dotize.js.map +0 -1
  290. package/dist/utils/filter-base-props.d.ts +0 -15
  291. package/dist/utils/filter-base-props.js +0 -45
  292. package/dist/utils/filter-base-props.js.map +0 -1
  293. package/dist/utils/get-display-name.d.ts +0 -7
  294. package/dist/utils/get-display-name.js +0 -10
  295. package/dist/utils/get-display-name.js.map +0 -1
  296. package/dist/utils/hsl-to-rgb.js +0 -38
  297. package/dist/utils/hsl-to-rgb.js.map +0 -1
  298. package/dist/utils/is-dev-env.js +0 -19
  299. package/dist/utils/is-dev-env.js.map +0 -1
  300. package/dist/utils/is-valid-element-type.js +0 -15
  301. package/dist/utils/is-valid-element-type.js.map +0 -1
  302. package/dist/utils/merge-styles.js.map +0 -1
  303. package/dist/utils/mod-attrs.d.ts +0 -8
  304. package/dist/utils/mod-attrs.js +0 -21
  305. package/dist/utils/mod-attrs.js.map +0 -1
  306. package/dist/utils/okhsl-to-rgb.js +0 -296
  307. package/dist/utils/okhsl-to-rgb.js.map +0 -1
  308. package/dist/utils/process-tokens.d.ts +0 -31
  309. package/dist/utils/process-tokens.js +0 -171
  310. package/dist/utils/process-tokens.js.map +0 -1
  311. package/dist/utils/resolve-recipes.d.ts +0 -17
  312. package/dist/utils/resolve-recipes.js +0 -147
  313. package/dist/utils/resolve-recipes.js.map +0 -1
  314. package/dist/utils/string.js +0 -8
  315. package/dist/utils/string.js.map +0 -1
  316. package/dist/utils/styles.d.ts +0 -183
  317. package/dist/utils/styles.js +0 -585
  318. package/dist/utils/styles.js.map +0 -1
  319. package/dist/utils/typography.d.ts +0 -36
  320. package/dist/utils/typography.js +0 -53
  321. package/dist/utils/typography.js.map +0 -1
  322. package/dist/utils/warnings.d.ts +0 -16
  323. package/dist/utils/warnings.js +0 -16
  324. package/dist/utils/warnings.js.map +0 -1
  325. package/dist/zero/css-writer.d.ts +0 -45
  326. package/dist/zero/css-writer.js +0 -74
  327. package/dist/zero/css-writer.js.map +0 -1
  328. package/dist/zero/extractor.d.ts +0 -24
  329. package/dist/zero/extractor.js +0 -150
  330. package/dist/zero/extractor.js.map +0 -1
@@ -0,0 +1,673 @@
1
+ # Methodology
2
+
3
+ State maps keep a property’s branches from fighting. This guide applies the same goal to component architecture: keep state ownership explicit, expose intentional public APIs, and make extension predictable as a component system grows.
4
+
5
+ The patterns are recommended rather than required. Tasty works without them, but they help design-system teams carry its state-resolution guarantees across roots, sub-elements, typed props, tokens, and styled wrappers.
6
+
7
+ ---
8
+
9
+ ## Component architecture: root + sub-elements
10
+
11
+ This model matters most for design-system authors and platform teams building reusable, stateful components. It turns Tasty's selector guarantees into a component architecture that stays predictable as states, variants, and compound parts accumulate.
12
+
13
+ ### The model
14
+
15
+ Every Tasty component has a **root element** and zero or more **sub-elements**. The root owns the state context. Sub-elements participate in the same context by default.
16
+
17
+ ```tsx
18
+ const Alert = tasty({
19
+ styles: {
20
+ padding: '3x',
21
+ fill: { '': '#surface', 'type=danger': '#danger.10' },
22
+ border: { '': '1bw solid #border', 'type=danger': '1bw solid #danger' },
23
+ radius: '1r',
24
+
25
+ Icon: {
26
+ color: { '': '#text-secondary', 'type=danger': '#danger' },
27
+ width: '3x',
28
+ height: '3x',
29
+ },
30
+ Message: {
31
+ preset: 't2',
32
+ color: '#text',
33
+ },
34
+ },
35
+ elements: { Icon: 'span', Message: 'div' },
36
+ });
37
+ ```
38
+
39
+ When `<Alert mods={{ type: 'danger' }}>` is rendered, the root gets `data-type="danger"` and **all** sub-elements react to it through their state maps. The `Icon` turns `#danger`, the border changes — from a single modifier on the root.
40
+
41
+ ### How this differs from BEM
42
+
43
+ BEM organizes CSS around blocks, elements, and modifiers. Each element applies its own modifier classes independently:
44
+
45
+ ```html
46
+ <!-- BEM: each element carries its own modifier -->
47
+ <div class="alert alert--danger">
48
+ <span class="alert__icon alert__icon--danger">!</span>
49
+ <div class="alert__message">Something went wrong</div>
50
+ </div>
51
+ ```
52
+
53
+ In BEM, `alert__icon--danger` is a separate class that must be applied to the icon element explicitly. The block modifier `alert--danger` does not automatically propagate to elements — each element needs its own modifier class, and the CSS for each element+modifier combination is written separately.
54
+
55
+ In Tasty, sub-elements inherit the root's state context automatically:
56
+
57
+ ```tsx
58
+ <Alert mods={{ type: 'danger' }}>
59
+ <Alert.Icon>!</Alert.Icon>
60
+ <Alert.Message>Something went wrong</Alert.Message>
61
+ </Alert>
62
+ ```
63
+
64
+ One `mods` prop on the root. No modifier classes on sub-elements. The CSS for `type=danger` is declared once per property, and every sub-element that references that state key reacts to it.
65
+
66
+ This is the fundamental design choice: **state flows from root to sub-elements**, not from each element independently.
67
+
68
+ ### When sub-elements need their own state
69
+
70
+ Use `@own(...)` when a sub-element should react to its own state rather than the root's:
71
+
72
+ ```tsx
73
+ const Nav = tasty({
74
+ styles: {
75
+ NavItem: {
76
+ color: {
77
+ '': '#text',
78
+ '@own(:hover)': '#primary',
79
+ '@own(:focus-visible)': '#primary',
80
+ selected: '#primary',
81
+ },
82
+ },
83
+ },
84
+ elements: { NavItem: 'a' },
85
+ });
86
+ ```
87
+
88
+ Here, `:hover` and `:focus-visible` belong to the individual `NavItem` being hovered, not the root `Nav`. But `selected` is still a root-level modifier — a parent component controls which item is selected.
89
+
90
+ The default (root state context) is the right choice most of the time. Use `@own()` only when the sub-element has interactive states that are independent of the root.
91
+
92
+ ---
93
+
94
+ ## styleProps as the public API
95
+
96
+ `styleProps` define which CSS properties a component exposes as typed React props. They are the primary mechanism for product engineers to customize a component without breaking its design constraints.
97
+
98
+ ```tsx
99
+ const Space = tasty({
100
+ as: 'div',
101
+ styles: { display: 'flex', flow: 'column', gap: '1x' },
102
+ styleProps: ['flow', 'gap', 'padding', 'fill', 'placeItems', 'placeContent'],
103
+ });
104
+
105
+ // Product engineer uses it:
106
+ <Space flow="row" gap="2x" padding="4x" placeItems="center">
107
+ ```
108
+
109
+ Style props accept state maps, so responsive values work through the same API:
110
+
111
+ ```tsx
112
+ <Space
113
+ flow={{ '': 'column', '@tablet': 'row' }}
114
+ gap={{ '': '2x', '@tablet': '4x' }}
115
+ >
116
+ ```
117
+
118
+ ### Choosing what to expose
119
+
120
+ Tasty exports predefined style prop lists that group properties by role. Use them instead of hand-picking arrays:
121
+
122
+ | Preset | Properties | Typical use |
123
+ | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- |
124
+ | `FLOW_STYLES` | flow, gap, columnGap, rowGap, align, justify, place, placeItems, placeContent, alignItems, alignContent, justifyItems, justifyContent, gridColumns, gridRows, gridTemplate, gridAreas | Layout containers (`Space`, `Grid`) |
125
+ | `POSITION_STYLES` | gridArea, gridColumn, gridRow, order, placeSelf, alignSelf, justifySelf, zIndex, physical/logical margin, inset, scroll margin/padding, position | Positioned elements (`Button`, `Badge`) |
126
+ | `DIMENSION_STYLES` | width, height, blockSize, inlineSize, flexBasis, flexGrow, flexShrink, flex | Sized elements |
127
+ | `COLOR_STYLES` | color, fill, fade, image | Color-customizable elements |
128
+ | `BLOCK_STYLES` | padding, blockPadding, inlinePadding, overflow, scrollbar, textAlign, border, blockBorder, inlineBorder, radius, shadow, outline | Block-level containers |
129
+ | `TEXT_STYLES` | textTransform, fontWeight, fontStyle | Text elements |
130
+ | `CONTAINER_STYLES` | All of the above combined (+ BASE_STYLES) | Fully flexible containers |
131
+ | `OUTER_STYLES` | POSITION_STYLES + DIMENSION_STYLES + block outer (border, radius, shadow, outline) | Components whose outer shell is customizable |
132
+ | `INNER_STYLES` | BASE_STYLES + COLOR_STYLES + block inner (padding, overflow, scrollbar) + FLOW_STYLES | Components whose inner layout is customizable |
133
+
134
+ ```tsx
135
+ import { tasty, FLOW_STYLES, POSITION_STYLES } from '@tenphi/tasty';
136
+
137
+ const Space = tasty({
138
+ as: 'div',
139
+ styles: { display: 'flex', flow: 'column', gap: '1x' },
140
+ styleProps: FLOW_STYLES,
141
+ });
142
+
143
+ const Button = tasty({
144
+ as: 'button',
145
+ styles: { padding: '1.5x 3x', fill: '#primary', radius: true },
146
+ styleProps: POSITION_STYLES,
147
+ });
148
+ ```
149
+
150
+ You can also combine presets or mix them with individual properties:
151
+
152
+ ```tsx
153
+ styleProps: [...FLOW_STYLES, ...DIMENSION_STYLES, 'fill'],
154
+ ```
155
+
156
+ Match the preset to the component's role:
157
+
158
+ - **Layout containers** (`Space`, `Box`, `Grid`) — `FLOW_STYLES`, optionally with `DIMENSION_STYLES`
159
+ - **Positioned elements** (`Button`, `Badge`) — `POSITION_STYLES`
160
+ - **Text elements** — `['color', ...TEXT_STYLES]`
161
+
162
+ `BASE_STYLES` (`display`, `font`, `preset`, `hide`, `whiteSpace`, `opacity`, `transition`) are accepted as props on every component without being listed; extend that set app-wide with [`configure({ baseStyleProps })`](configuration.md#base-style-props).
163
+
164
+ - **Compound components** — typically none; styling happens via sub-elements and extension
165
+
166
+ ### The governance trade-off
167
+
168
+ Exposing every CSS property as a prop defeats the purpose of a design system. The more props a component exposes, the more ways product engineers can deviate from the intended design. A good rule of thumb: expose props that product engineers _need_ to adjust for layout and composition, and keep visual identity (colors, borders, typography) controlled through the component definition, variants, or styled wrappers.
169
+
170
+ ---
171
+
172
+ ## modProps and mods
173
+
174
+ `modProps` expose modifier keys as top-level component props — the modifier equivalent of `styleProps`. Use them when a component has a fixed set of known state modifiers.
175
+
176
+ ```tsx
177
+ const Card = tasty({
178
+ modProps: {
179
+ isLoading: Boolean,
180
+ isSelected: Boolean,
181
+ },
182
+ styles: {
183
+ fill: { '': '#surface', isLoading: '#surface.5' },
184
+ border: { '': '1bw solid #outline', isSelected: '2bw solid #primary' },
185
+ },
186
+ });
187
+
188
+ // Clean prop API — no mods object needed
189
+ <Card isLoading isSelected>
190
+ Content
191
+ </Card>;
192
+ ```
193
+
194
+ ### When to use which
195
+
196
+ | Pattern | Use when |
197
+ | ------------ | --------------------------------------------------------------------------------------------------------------------------------------- |
198
+ | `modProps` | The component has a fixed set of known boolean/string states that drive styles. Provides TypeScript autocomplete and a cleaner JSX API. |
199
+ | `mods` prop | The component needs arbitrary or dynamic modifiers that aren't known at definition time. |
200
+ | Both | Combine `modProps` for the known states and `mods` for ad-hoc overrides. Mod props take precedence. |
201
+ | `styleProps` | Exposing CSS properties (layout, sizing) for customization — different from modifiers. |
202
+
203
+ ### Typed modProps vs array form
204
+
205
+ The object form gives precise TypeScript types using JS constructors (`Boolean`, `String`, `Number`) or enum arrays:
206
+
207
+ ```tsx
208
+ const Button = tasty({
209
+ modProps: {
210
+ isLoading: Boolean,
211
+ size: ['small', 'medium', 'large'] as const,
212
+ },
213
+ // ...
214
+ });
215
+
216
+ // TypeScript knows: isLoading?: boolean, size?: 'small' | 'medium' | 'large'
217
+ ```
218
+
219
+ The array form is simpler but types all values as `ModValue`:
220
+
221
+ ```tsx
222
+ modProps: ['isLoading', 'isSelected'] as const,
223
+ ```
224
+
225
+ For the full API reference, see [React API — Mod Props](react-api.md#mod-props).
226
+
227
+ ### variants vs modProps
228
+
229
+ Use `variants` for looks that replace each other (primary, danger, ghost) and `modProps` for states that combine (`isLoading`, `size`):
230
+
231
+ ```tsx
232
+ const Button = tasty({
233
+ as: 'button',
234
+ modProps: { isLoading: Boolean, size: ['sm', 'md', 'lg'] as const },
235
+ styles: { padding: { '': '1.5x 3x', 'size=sm': '1x 2x' }, radius: '1r' },
236
+ variants: {
237
+ default: { fill: '#primary', color: '#on-primary' },
238
+ danger: { fill: '#danger', color: '#on-danger' },
239
+ },
240
+ });
241
+
242
+ <Button variant="danger" size="sm" isLoading />;
243
+ ```
244
+
245
+ `variant` is typed from the variant keys, the `default` variant applies when no `variant` prop is passed, and only variants that render emit CSS. See [React API — Variants](react-api.md#variants).
246
+
247
+ ---
248
+
249
+ ## tokens prop for dynamic values
250
+
251
+ Every Tasty component accepts a `tokens` prop that renders as inline CSS custom properties on the element. This is the mechanism for per-instance dynamic values.
252
+
253
+ ```tsx
254
+ const ProgressBar = tasty({
255
+ styles: {
256
+ width: '100%',
257
+ height: '1x',
258
+ fill: '#surface',
259
+ Bar: {
260
+ width: '$progress',
261
+ height: '100%',
262
+ fill: '#primary',
263
+ transition: 'width',
264
+ },
265
+ },
266
+ elements: { Bar: 'div' },
267
+ });
268
+
269
+ // Usage: the progress value comes from a prop, not from styles
270
+ <ProgressBar tokens={{ $progress: `${percent}%` }} />;
271
+ ```
272
+
273
+ The `tokens` prop sets `style="--progress: 75%"` on the DOM element. The `$progress` reference in styles maps to `var(--progress)`, so the bar width updates without regenerating any CSS.
274
+
275
+ ### When to use tokens vs other mechanisms
276
+
277
+ | Need | Use |
278
+ | ----------------------------------------------------------------------------- | --------------------------------------------------------- |
279
+ | Value changes per instance at render time (progress, user color, avatar size) | `tokens` prop (on component) |
280
+ | Value is constant across all instances (card padding, border radius) | `configure({ tokens })` for `:root` CSS custom properties |
281
+ | Value should be inlined at parse time (alias for another token) | `configure({ replaceTokens })` |
282
+ | Value changes based on component state (hover, disabled, breakpoint) | State map in `styles` |
283
+ | Value changes based on a variant (primary, danger, outline) | `variants` option |
284
+
285
+ Design tokens (via `configure({ tokens })`) are injected as CSS custom properties on `:root`. Replace tokens (via `configure({ replaceTokens })`) are resolved at parse time and baked into the generated CSS. The `tokens` prop on components is resolved at render time via inline CSS custom properties. Use design tokens for design-system constants, replace tokens for value aliases, and the `tokens` prop for truly dynamic per-instance values.
286
+
287
+ ### tokenProps
288
+
289
+ `tokenProps` expose token keys as top-level component props — the token equivalent of `styleProps` and `modProps`. Use them when a component has a fixed set of known dynamic token values.
290
+
291
+ #### Array form
292
+
293
+ Prop names are plain camelCase identifiers. Names ending in `Color` map to `#` color tokens; everything else maps to `$` custom property tokens:
294
+
295
+ ```tsx
296
+ const ProgressBar = tasty({
297
+ tokenProps: ['progress', 'accentColor'] as const,
298
+ styles: { width: '$progress', fill: '#accent' },
299
+ });
300
+
301
+ // Clean prop API — no tokens object needed
302
+ <ProgressBar progress="75%" accentColor="#purple" />;
303
+
304
+ // Conversion:
305
+ // 'progress' → $progress → --progress
306
+ // 'accentColor' → #accent → --accent-color
307
+ ```
308
+
309
+ #### Object form
310
+
311
+ Keys are prop names; values are `$`/`#`-prefixed token keys. No suffix convention needed — the prefix in the value is explicit:
312
+
313
+ ```tsx
314
+ const Card = tasty({
315
+ tokenProps: {
316
+ size: '$card-size',
317
+ color: '#card-accent',
318
+ },
319
+ styles: { padding: '$card-size', fill: '#card-accent' },
320
+ });
321
+
322
+ <Card size="4x" color="#purple" />;
323
+ ```
324
+
325
+ #### Merge order
326
+
327
+ When all three token sources are present, values merge with increasing priority:
328
+
329
+ 1. `tokens` option in `tasty({...})` — default tokens (lowest)
330
+ 2. `tokens` prop on the component instance — runtime overrides
331
+ 3. `tokenProps`-derived values — highest priority (explicit named props win)
332
+
333
+ The `tokens` prop remains available for ad-hoc or dynamic tokens alongside `tokenProps`.
334
+
335
+ ---
336
+
337
+ ## styles prop vs style prop
338
+
339
+ Tasty components accept both `styles` and `style`, but they serve very different purposes.
340
+
341
+ ### styles — Tasty extension mechanism
342
+
343
+ The `styles` prop is processed through the full Tasty pipeline. Tokens, custom units, state maps, sub-element keys — everything works:
344
+
345
+ ```tsx
346
+ <Card styles={{ padding: '6x', Title: { color: '#danger' } }} />
347
+ ```
348
+
349
+ However, **using `styles` directly is discouraged in design-system code.** The recommended pattern is to create a styled wrapper instead:
350
+
351
+ ```tsx
352
+ // Preferred: create a styled wrapper
353
+ const LargeCard = tasty(Card, {
354
+ styles: { padding: '6x', Title: { color: '#danger' } },
355
+ });
356
+
357
+ <LargeCard />;
358
+ ```
359
+
360
+ Why? Styled wrappers are:
361
+
362
+ - **Stable** — the style object is defined once at module level, not recreated on every render
363
+ - **Composable** — another engineer can extend `LargeCard` further
364
+ - **Inspectable** — give it a `qa` (`tasty(Card, { qa: 'LargeCard', styles })`) and it appears as `TastyWrappedComponent(LargeCard)` in React DevTools and as `data-qa="LargeCard"` in the DOM
365
+ - **Lint-friendly** — the ESLint plugin's `no-styles-prop` rule flags direct usage
366
+
367
+ The `styles` prop exists as an escape hatch — for prototyping, one-off overrides during development, or cases where wrapping is impractical. It should not be the default way product engineers customize components.
368
+
369
+ ### style — React inline styles (escape hatch)
370
+
371
+ The `style` prop is standard React `CSSProperties`. It bypasses Tasty entirely — no tokens, no units, no state maps:
372
+
373
+ ```tsx
374
+ <Card style={{ marginTop: 16 }} />
375
+ ```
376
+
377
+ Reserve `style` for third-party library integration where you need to set CSS properties that Tasty does not control (e.g. a library that reads inline `style` for positioning). Never use `style` as a styling mechanism for your own components.
378
+
379
+ See [Best practices](#best-practices) below for the full list of do's and don'ts.
380
+
381
+ ---
382
+
383
+ ## Wrapping and extension
384
+
385
+ `tasty(Base, { styles })` is the primary extension mechanism. It creates a new component whose styles are merged with the base component's styles.
386
+
387
+ ```tsx
388
+ import { Button } from 'my-ds';
389
+
390
+ const DangerButton = tasty(Button, {
391
+ styles: {
392
+ fill: { '': '#danger', ':hover': '#danger-hover' },
393
+ color: '#danger-text',
394
+ },
395
+ });
396
+ ```
397
+
398
+ ### Extend mode vs replace mode
399
+
400
+ Merge behavior depends on whether the child provides a `''` (default) key in a state map:
401
+
402
+ - **No `''` key** — extend mode: parent states are preserved, child adds or overrides specific states
403
+ - **Has `''` key** — replace mode: child defines everything from scratch for that property
404
+
405
+ ```tsx
406
+ // Extend: adds `loading` state, overrides `disabled`, keeps parent's '' and ':hover'
407
+ tasty(Button, {
408
+ styles: {
409
+ fill: {
410
+ loading: '#yellow',
411
+ disabled: '#gray.20',
412
+ },
413
+ },
414
+ });
415
+
416
+ // Replace: provides '' key, so parent's fill states are dropped entirely
417
+ tasty(Button, {
418
+ styles: {
419
+ fill: {
420
+ '': '#danger',
421
+ ':hover': '#danger-hover',
422
+ },
423
+ },
424
+ });
425
+ ```
426
+
427
+ For full details on merge semantics, `@inherit`, `null`, and `false` tombstones, see [Style DSL — Extending vs. Replacing State Maps](dsl.md#extending-vs-replacing-state-maps).
428
+
429
+ ### Styling non-Tasty components or string tags
430
+
431
+ `tasty(Component, { ... })` always forwards every prop to `Component`, which means `Component` must be Tasty-aware (i.e. it knows how to consume `styles`, `mods`, `qa`, etc.). To apply styles to a third-party component (Next.js `Link`, `react-router`'s `Link`, Radix primitives, MUI, etc.) or to a plain DOM tag, use the options-only form with `as`:
432
+
433
+ ```tsx
434
+ import NextLink from 'next/link';
435
+
436
+ const Link = tasty({
437
+ as: NextLink,
438
+ styles: {
439
+ color: { '': '#accent-text', ':hover': '#text' },
440
+ textDecoration: 'underline',
441
+ },
442
+ styleProps: ['padding'],
443
+ });
444
+
445
+ const Span = tasty({
446
+ as: 'span',
447
+ styles: { preset: 'strong' },
448
+ });
449
+
450
+ <Link href="/blog" padding="1x">
451
+ Blog
452
+ </Link>;
453
+ ```
454
+
455
+ The wrapped component only needs to forward `className` (and ideally `style` and `ref`) to its underlying DOM node. Tasty-specific props (`qa`, `qaVal`, `mods`, `tokens`, `isDisabled`, `isHidden`, `isChecked`, and any `styleProps`/`modProps`/`tokenProps` you declared) are consumed by the wrapper and converted to `data-*` attributes or CSS custom properties — they never leak to the DOM.
456
+
457
+ ### When to use styleProps vs wrapping
458
+
459
+ If the component exposes the properties you need as `styleProps`, use them directly — that is what they are for:
460
+
461
+ ```tsx
462
+ // Card exposes padding and gap as styleProps — just use them
463
+ <Card padding="2x" gap="1x">
464
+ ```
465
+
466
+ Wrapping is for changes that go beyond what `styleProps` expose — overriding colors, adding state mappings, restyling sub-elements:
467
+
468
+ ```tsx
469
+ const DangerCard = tasty(Card, {
470
+ styles: {
471
+ border: '1bw solid #danger',
472
+ Title: { color: '#danger' },
473
+ },
474
+ });
475
+ ```
476
+
477
+ This is preferred over `<Card styles={{ border: '1bw solid #danger' }}>` because:
478
+
479
+ 1. The styles live in one module-level definition instead of being rebuilt inside render
480
+ 2. `DangerCard` can be extended further by others
481
+ 3. It is searchable in code, and named in DevTools once you give it a `qa`
482
+ 4. The ESLint `no-styles-prop` rule encourages this pattern
483
+
484
+ A wrapper does not re-expose the base's sub-element components: `DangerCard.Title` is `undefined` and not part of its type. Keep using the base's parts inside it — `<DangerCard><Card.Title>…</Card.Title></DangerCard>`. The wrapper's `Title` styles still apply, because they target `[data-element="Title"]`.
485
+
486
+ ---
487
+
488
+ ## How configuration simplifies components
489
+
490
+ Tasty's `configure()` is not just setup — it directly reduces the complexity of every component in the system.
491
+
492
+ ### State aliases eliminate repetition
493
+
494
+ Without aliases, every component inlines the full query:
495
+
496
+ ```tsx
497
+ // Without aliases
498
+ padding: { '': '4x', '@media(w < 768px)': '2x' },
499
+ flow: { '': 'row', '@media(w < 768px)': 'column' },
500
+ ```
501
+
502
+ With aliases:
503
+
504
+ ```tsx
505
+ // With aliases
506
+ padding: { '': '4x', '@mobile': '2x' },
507
+ flow: { '': 'row', '@mobile': 'column' },
508
+ ```
509
+
510
+ The alias is defined once. If the breakpoint changes from `768px` to `640px`, you update one line in `configure()` and every component adjusts.
511
+
512
+ ### Recipes extract repeated patterns
513
+
514
+ Without recipes, every card-like component repeats the same base styles:
515
+
516
+ ```tsx
517
+ // Without recipes — repeated in Card, ProfileCard, SettingsPanel, ...
518
+ styles: {
519
+ padding: '4x',
520
+ fill: '#surface',
521
+ radius: '1r',
522
+ border: true,
523
+ // ...component-specific styles
524
+ }
525
+ ```
526
+
527
+ With recipes:
528
+
529
+ ```tsx
530
+ // With recipes
531
+ styles: {
532
+ recipe: 'card',
533
+ // ...component-specific styles only
534
+ }
535
+ ```
536
+
537
+ The recipe encapsulates the shared pattern. Change `card`'s radius from `1r` to `2r` and every component using it updates.
538
+
539
+ ### Design tokens enforce consistency
540
+
541
+ ```tsx
542
+ configure({
543
+ tokens: {
544
+ '$card-padding': '4x',
545
+ '$input-height': '5x',
546
+ },
547
+ });
548
+ ```
549
+
550
+ Components use `$card-padding` instead of hardcoding `4x`. If the DS team decides to change card padding, the token is the single source of truth. Tokens support state maps for theme-aware values. Token values are parsed through the Tasty DSL, so you can use units (`4x`), color syntax (`#purple`), and other DSL features in token definitions.
551
+
552
+ See [Configuration](configuration.md) for the full `configure()` API.
553
+
554
+ ---
555
+
556
+ ## Best practices
557
+
558
+ ### Do
559
+
560
+ - **Create styled wrappers** instead of passing `styles` directly — faster, composable, inspectable
561
+ - **Use design tokens and custom units** (`#text`, `2x`, `1r`) instead of raw CSS values
562
+ - **Use semantic transition names** (`transition: 'theme'`) instead of listing CSS properties; omit the duration to use the motion tokens
563
+ - **Use `elements` prop** to declare typed sub-components for compound components
564
+ - **Use `styleProps`** to define what product engineers can customize
565
+ - **Use `modProps`** to expose known modifier states as clean component props
566
+ - **Use `tokenProps`** to expose known token keys as clean component props
567
+ - **Use `tokens` prop** for ad-hoc or dynamic per-instance token values (progress, user color)
568
+ - **Use modifiers** (`mods` or `modProps`) for state-driven style changes instead of runtime `styles` prop changes
569
+
570
+ ### Avoid
571
+
572
+ ### Using raw CSS values when tokens exist
573
+
574
+ ```tsx
575
+ // Bad: hardcoded color
576
+ fill: 'oklch(55% 0.25 265)',
577
+
578
+ // Good: token reference
579
+ fill: '#primary',
580
+ ```
581
+
582
+ Tokens ensure consistency across components and make theme changes a one-line update. The recommended lint config flags this with `tasty/no-raw-color-values` and `tasty/consistent-token-usage`.
583
+
584
+ ### Using CSS property names when Tasty alternatives exist
585
+
586
+ ```tsx
587
+ // Bad: raw CSS properties
588
+ backgroundColor: '#fff',
589
+ borderRadius: '4px',
590
+ flexDirection: 'column',
591
+
592
+ // Good: Tasty shorthands
593
+ fill: '#surface',
594
+ radius: '1r',
595
+ flow: 'column',
596
+ ```
597
+
598
+ Tasty's enhanced properties provide concise syntax, better composability, and simpler overrides. See [recommended props](styles.md#recommended-props) for the full mapping. `tasty/prefer-shorthand-property` flags the native spellings.
599
+
600
+ ### Changing styles prop at runtime
601
+
602
+ ```tsx
603
+ // Bad: styles object changes every render
604
+ <Card styles={{ padding: isCompact ? '2x' : '4x' }} />
605
+
606
+ // Good: use modifiers via modProps
607
+ <Card isCompact={isCompact} />
608
+
609
+ // Or via mods object
610
+ <Card mods={{ isCompact }} />
611
+
612
+ // In the component definition:
613
+ const Card = tasty({
614
+ modProps: ['isCompact'] as const,
615
+ styles: {
616
+ padding: { '': '4x', isCompact: '2x' },
617
+ },
618
+ });
619
+ ```
620
+
621
+ Modifiers are compiled into exclusive selectors once. Changing `styles` at runtime forces Tasty to regenerate and re-inject CSS. `tasty/no-styles-prop` and `tasty/no-runtime-styles-mutation` flag these patterns.
622
+
623
+ ### Overusing style prop
624
+
625
+ ```tsx
626
+ // Bad: bypassing Tasty for custom styling
627
+ <Button style={{ backgroundColor: 'red', padding: '12px 24px' }} />;
628
+
629
+ // Good: create a styled wrapper
630
+ const DangerButton = tasty(Button, {
631
+ styles: { fill: '#danger', padding: '1.5x 3x' },
632
+ });
633
+ ```
634
+
635
+ The `style` prop bypasses tokens, units, and state maps. It should only be used for third-party library integration. `tasty/no-style-prop` flags it on Tasty components.
636
+
637
+ ### Skipping elements for compound components
638
+
639
+ ```tsx
640
+ // Less ideal: manual data-element attributes
641
+ <Card>
642
+ <div data-element="Title">Card Title</div>
643
+ <div data-element="Content">Card content</div>
644
+ </Card>;
645
+
646
+ // Better: declare elements for typed sub-components
647
+ const Card = tasty({
648
+ styles: {
649
+ Title: { preset: 'h3', color: '#primary' },
650
+ Content: { preset: 't2', color: '#text' },
651
+ },
652
+ elements: { Title: 'h2', Content: 'div' },
653
+ });
654
+
655
+ <Card>
656
+ <Card.Title>Card Title</Card.Title>
657
+ <Card.Content>Card content</Card.Content>
658
+ </Card>;
659
+ ```
660
+
661
+ The `elements` prop gives you typed sub-components with automatic `data-element` attributes, `mods` support, and better discoverability.
662
+
663
+ ---
664
+
665
+ ## Learn more
666
+
667
+ - **[Getting Started](getting-started.md)** — Installation, first component, tooling setup
668
+ - **[Building a Design System](design-system.md)** — Practical guide to building a DS layer with Tasty
669
+ - **[Style DSL](dsl.md)** — State maps, tokens, units, extending semantics, keyframes, @property
670
+ - **[React API](react-api.md)** — `tasty()` factory, component props, variants, sub-elements, style functions
671
+ - **[Configuration](configuration.md)** — Full `configure()` API: tokens, recipes, custom units, style handlers
672
+ - **[Style Properties](styles.md)** — Complete reference for all enhanced style properties
673
+ - **[Adoption Guide](adoption.md)** — Who should adopt Tasty, incremental phases, what changes for product engineers