@cocoar/vue-ui 3.2.0-beta.5 → 3.2.0-beta.6

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 (110) hide show
  1. package/package.json +5 -3
  2. package/skills/cocoar-vue-ui/SKILL.md +244 -0
  3. package/skills/cocoar-vue-ui/references/components/avatar.md +178 -0
  4. package/skills/cocoar-vue-ui/references/components/badge.md +290 -0
  5. package/skills/cocoar-vue-ui/references/components/breadcrumb.md +238 -0
  6. package/skills/cocoar-vue-ui/references/components/button.md +252 -0
  7. package/skills/cocoar-vue-ui/references/components/calendar/agenda-view.md +353 -0
  8. package/skills/cocoar-vue-ui/references/components/calendar/coar-calendar.md +1645 -0
  9. package/skills/cocoar-vue-ui/references/components/calendar/day-view.md +361 -0
  10. package/skills/cocoar-vue-ui/references/components/calendar/index.md +312 -0
  11. package/skills/cocoar-vue-ui/references/components/calendar/month-view.md +475 -0
  12. package/skills/cocoar-vue-ui/references/components/calendar/performance.md +186 -0
  13. package/skills/cocoar-vue-ui/references/components/calendar/timeline-view.md +301 -0
  14. package/skills/cocoar-vue-ui/references/components/calendar/week-view.md +382 -0
  15. package/skills/cocoar-vue-ui/references/components/calendar/work-week-view.md +145 -0
  16. package/skills/cocoar-vue-ui/references/components/calendar/year-view.md +63 -0
  17. package/skills/cocoar-vue-ui/references/components/card.md +151 -0
  18. package/skills/cocoar-vue-ui/references/components/checkbox-group.md +103 -0
  19. package/skills/cocoar-vue-ui/references/components/checkbox.md +279 -0
  20. package/skills/cocoar-vue-ui/references/components/code-block.md +241 -0
  21. package/skills/cocoar-vue-ui/references/components/context-menu.md +355 -0
  22. package/skills/cocoar-vue-ui/references/components/data-grid/checkbox.md +213 -0
  23. package/skills/cocoar-vue-ui/references/components/data-grid/date-columns.md +272 -0
  24. package/skills/cocoar-vue-ui/references/components/data-grid/editing.md +236 -0
  25. package/skills/cocoar-vue-ui/references/components/data-grid/multi-select.md +193 -0
  26. package/skills/cocoar-vue-ui/references/components/data-grid/number.md +147 -0
  27. package/skills/cocoar-vue-ui/references/components/data-grid/select.md +202 -0
  28. package/skills/cocoar-vue-ui/references/components/data-grid/text.md +127 -0
  29. package/skills/cocoar-vue-ui/references/components/data-grid.md +1225 -0
  30. package/skills/cocoar-vue-ui/references/components/data-list.md +2121 -0
  31. package/skills/cocoar-vue-ui/references/components/date-or-time-picker.md +200 -0
  32. package/skills/cocoar-vue-ui/references/components/date-picker.md +203 -0
  33. package/skills/cocoar-vue-ui/references/components/date-time-picker.md +154 -0
  34. package/skills/cocoar-vue-ui/references/components/date-views.md +212 -0
  35. package/skills/cocoar-vue-ui/references/components/dialog.md +148 -0
  36. package/skills/cocoar-vue-ui/references/components/divider.md +157 -0
  37. package/skills/cocoar-vue-ui/references/components/document-viewer/annotations.md +400 -0
  38. package/skills/cocoar-vue-ui/references/components/document-viewer/coar-document-viewer.md +327 -0
  39. package/skills/cocoar-vue-ui/references/components/document-viewer/index.md +234 -0
  40. package/skills/cocoar-vue-ui/references/components/document-viewer/toolbar.md +221 -0
  41. package/skills/cocoar-vue-ui/references/components/drag-drop.md +267 -0
  42. package/skills/cocoar-vue-ui/references/components/dual-listbox.md +449 -0
  43. package/skills/cocoar-vue-ui/references/components/file-explorer/asset-store.md +327 -0
  44. package/skills/cocoar-vue-ui/references/components/file-explorer/in-memory-store.md +176 -0
  45. package/skills/cocoar-vue-ui/references/components/file-explorer/index.md +311 -0
  46. package/skills/cocoar-vue-ui/references/components/file-explorer/use-file-explorer.md +300 -0
  47. package/skills/cocoar-vue-ui/references/components/form-field.md +1025 -0
  48. package/skills/cocoar-vue-ui/references/components/fragment-parser.md +298 -0
  49. package/skills/cocoar-vue-ui/references/components/link.md +235 -0
  50. package/skills/cocoar-vue-ui/references/components/listbox.md +575 -0
  51. package/skills/cocoar-vue-ui/references/components/map/editor.md +448 -0
  52. package/skills/cocoar-vue-ui/references/components/map/index.md +351 -0
  53. package/skills/cocoar-vue-ui/references/components/markdown-diagrams.md +210 -0
  54. package/skills/cocoar-vue-ui/references/components/markdown-editor.md +1478 -0
  55. package/skills/cocoar-vue-ui/references/components/markdown-embeds.md +387 -0
  56. package/skills/cocoar-vue-ui/references/components/markdown-form.md +447 -0
  57. package/skills/cocoar-vue-ui/references/components/markdown.md +276 -0
  58. package/skills/cocoar-vue-ui/references/components/menu.md +380 -0
  59. package/skills/cocoar-vue-ui/references/components/mermaid.md +172 -0
  60. package/skills/cocoar-vue-ui/references/components/navbar.md +147 -0
  61. package/skills/cocoar-vue-ui/references/components/note.md +96 -0
  62. package/skills/cocoar-vue-ui/references/components/notice.md +131 -0
  63. package/skills/cocoar-vue-ui/references/components/number-input.md +215 -0
  64. package/skills/cocoar-vue-ui/references/components/otp-input.md +324 -0
  65. package/skills/cocoar-vue-ui/references/components/page-builder/authoring-contract.md +271 -0
  66. package/skills/cocoar-vue-ui/references/components/page-builder/coar-page-builder.md +476 -0
  67. package/skills/cocoar-vue-ui/references/components/page-builder/coar-page-renderer.md +677 -0
  68. package/skills/cocoar-vue-ui/references/components/page-builder/custom-elements.md +441 -0
  69. package/skills/cocoar-vue-ui/references/components/page-builder/idp-integration.md +122 -0
  70. package/skills/cocoar-vue-ui/references/components/page-builder/index.md +573 -0
  71. package/skills/cocoar-vue-ui/references/components/pagination.md +150 -0
  72. package/skills/cocoar-vue-ui/references/components/panel-layout.md +372 -0
  73. package/skills/cocoar-vue-ui/references/components/password-input.md +175 -0
  74. package/skills/cocoar-vue-ui/references/components/popconfirm.md +186 -0
  75. package/skills/cocoar-vue-ui/references/components/popover.md +173 -0
  76. package/skills/cocoar-vue-ui/references/components/progress-bar.md +178 -0
  77. package/skills/cocoar-vue-ui/references/components/radio-group.md +225 -0
  78. package/skills/cocoar-vue-ui/references/components/script-editor.md +1271 -0
  79. package/skills/cocoar-vue-ui/references/components/segmented-control.md +238 -0
  80. package/skills/cocoar-vue-ui/references/components/select.md +463 -0
  81. package/skills/cocoar-vue-ui/references/components/sidebar.md +421 -0
  82. package/skills/cocoar-vue-ui/references/components/spinner.md +132 -0
  83. package/skills/cocoar-vue-ui/references/components/switch.md +195 -0
  84. package/skills/cocoar-vue-ui/references/components/table.md +170 -0
  85. package/skills/cocoar-vue-ui/references/components/tabs.md +382 -0
  86. package/skills/cocoar-vue-ui/references/components/tag.md +178 -0
  87. package/skills/cocoar-vue-ui/references/components/text-input.md +256 -0
  88. package/skills/cocoar-vue-ui/references/components/toast.md +160 -0
  89. package/skills/cocoar-vue-ui/references/components/tooltip.md +121 -0
  90. package/skills/cocoar-vue-ui/references/components/transitions.md +193 -0
  91. package/skills/cocoar-vue-ui/references/components/tree.md +2388 -0
  92. package/skills/cocoar-vue-ui/references/components/virtual-list.md +212 -0
  93. package/skills/cocoar-vue-ui/references/components/wizard.md +251 -0
  94. package/skills/cocoar-vue-ui/references/components/zoned-date-time-picker.md +177 -0
  95. package/skills/cocoar-vue-ui/references/foundations/colors.md +708 -0
  96. package/skills/cocoar-vue-ui/references/foundations/design-principles.md +115 -0
  97. package/skills/cocoar-vue-ui/references/foundations/icons.md +381 -0
  98. package/skills/cocoar-vue-ui/references/foundations/localization/formatting.md +530 -0
  99. package/skills/cocoar-vue-ui/references/foundations/localization/setup.md +86 -0
  100. package/skills/cocoar-vue-ui/references/foundations/localization/timezones.md +182 -0
  101. package/skills/cocoar-vue-ui/references/foundations/localization/translations.md +305 -0
  102. package/skills/cocoar-vue-ui/references/foundations/motion.md +549 -0
  103. package/skills/cocoar-vue-ui/references/foundations/spacing.md +330 -0
  104. package/skills/cocoar-vue-ui/references/foundations/theming.md +140 -0
  105. package/skills/cocoar-vue-ui/references/foundations/typography.md +206 -0
  106. package/skills/cocoar-vue-ui/references/guide/error-handling.md +162 -0
  107. package/skills/cocoar-vue-ui/references/guide/getting-started.md +119 -0
  108. package/skills/cocoar-vue-ui/references/guide/migration-page-builder-3.md +207 -0
  109. package/skills/cocoar-vue-ui/references/guide/migration.md +140 -0
  110. package/skills/cocoar-vue-ui/references/guide/theming.md +98 -0
@@ -0,0 +1,549 @@
1
+ <!-- Generated from apps/docs/foundations/motion.md by apps/docs/scripts/sync-skill.mjs. Do not edit; edit the docs page. -->
2
+
3
+ # Motion
4
+
5
+ Timing, easing, and pre-composed transitions that make the UI feel responsive and alive.
6
+
7
+ ## Duration
8
+
9
+ How long an animation takes. Short durations suit small changes; longer ones give complex movements room to breathe. Press **Play** to see each duration side by side.
10
+
11
+ **Demo — `motion/demos/DurationDemo.vue`**
12
+
13
+ ```vue
14
+ <template>
15
+ <div class="duration-demo">
16
+ <button class="play-btn" @click="play">
17
+ <svg v-if="!playing" xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="currentColor"><polygon points="5 3 19 12 5 21 5 3"/></svg>
18
+ <svg v-else xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round"><line x1="6" y1="4" x2="6" y2="20"/><line x1="18" y1="4" x2="18" y2="20"/></svg>
19
+ {{ playing ? 'Playing...' : 'Play all' }}
20
+ </button>
21
+
22
+ <div class="duration-tracks">
23
+ <div
24
+ v-for="token in durationTokens"
25
+ :key="token.name"
26
+ class="duration-row"
27
+ >
28
+ <div class="duration-label">
29
+ <span class="duration-name">{{ token.name }}</span>
30
+ <code class="duration-value">{{ token.value }}</code>
31
+ </div>
32
+ <div class="duration-track">
33
+ <div
34
+ class="duration-dot"
35
+ :class="{ 'is-animating': playing }"
36
+ :style="{ transitionDuration: token.value }"
37
+ />
38
+ </div>
39
+ </div>
40
+ </div>
41
+ </div>
42
+ </template>
43
+
44
+ <script setup lang="ts">
45
+ import { ref } from 'vue';
46
+
47
+ const durationTokens = [
48
+ { name: 'Instant', value: '0ms' },
49
+ { name: 'Fast', value: '100ms' },
50
+ { name: 'Normal', value: '200ms' },
51
+ { name: 'Slow', value: '300ms' },
52
+ { name: 'Slower', value: '400ms' },
53
+ { name: 'Slowest', value: '600ms' },
54
+ ];
55
+
56
+ const playing = ref(false);
57
+ let timeout: ReturnType<typeof setTimeout> | null = null;
58
+
59
+ function play() {
60
+ if (playing.value) {
61
+ playing.value = false;
62
+ if (timeout) clearTimeout(timeout);
63
+ return;
64
+ }
65
+ playing.value = true;
66
+ timeout = setTimeout(() => {
67
+ playing.value = false;
68
+ }, 1200);
69
+ }
70
+ </script>
71
+
72
+ <style scoped>
73
+ .duration-demo {
74
+ padding: 4px 0;
75
+ }
76
+
77
+ .play-btn {
78
+ display: inline-flex;
79
+ align-items: center;
80
+ gap: 6px;
81
+ padding: 6px 16px;
82
+ font-size: 13px;
83
+ font-weight: 500;
84
+ color: var(--vp-c-brand-1);
85
+ background: var(--vp-c-brand-soft);
86
+ border: none;
87
+ border-radius: 8px;
88
+ cursor: pointer;
89
+ transition: background 0.2s ease, transform 0.15s ease;
90
+ margin-bottom: 20px;
91
+ }
92
+
93
+ .play-btn:hover {
94
+ background: var(--vp-c-brand-1);
95
+ color: #fff;
96
+ }
97
+
98
+ .play-btn:active {
99
+ transform: scale(0.97);
100
+ }
101
+
102
+ .duration-tracks {
103
+ display: flex;
104
+ flex-direction: column;
105
+ gap: 8px;
106
+ }
107
+
108
+ .duration-row {
109
+ display: flex;
110
+ align-items: center;
111
+ gap: 16px;
112
+ }
113
+
114
+ .duration-label {
115
+ display: flex;
116
+ align-items: baseline;
117
+ gap: 8px;
118
+ min-width: 120px;
119
+ flex-shrink: 0;
120
+ }
121
+
122
+ .duration-name {
123
+ font-size: 13px;
124
+ font-weight: 600;
125
+ color: var(--vp-c-text-1);
126
+ min-width: 56px;
127
+ }
128
+
129
+ .duration-value {
130
+ font-size: 11px;
131
+ color: var(--vp-c-text-3);
132
+ font-family: var(--vp-font-family-mono);
133
+ background: none !important;
134
+ }
135
+
136
+ .duration-track {
137
+ flex: 1;
138
+ height: 28px;
139
+ background: var(--vp-c-bg-soft);
140
+ border-radius: 14px;
141
+ position: relative;
142
+ overflow: hidden;
143
+ }
144
+
145
+ .duration-dot {
146
+ position: absolute;
147
+ left: 4px;
148
+ top: 50%;
149
+ transform: translateY(-50%);
150
+ width: 20px;
151
+ height: 20px;
152
+ background: var(--vp-c-brand-1);
153
+ border-radius: 50%;
154
+ transition-property: left;
155
+ transition-timing-function: ease-out;
156
+ }
157
+
158
+ .duration-dot.is-animating {
159
+ left: calc(100% - 24px);
160
+ }
161
+ </style>
162
+ ```
163
+
164
+ ## Easing
165
+
166
+ How animations accelerate and decelerate. Press **Play** to compare every curve at the same duration.
167
+
168
+ **Demo — `motion/demos/EasingDemo.vue`**
169
+
170
+ ```vue
171
+ <template>
172
+ <div class="easing-demo">
173
+ <button class="play-btn" @click="play">
174
+ <svg v-if="!playing" xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="currentColor"><polygon points="5 3 19 12 5 21 5 3"/></svg>
175
+ <svg v-else xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round"><line x1="6" y1="4" x2="6" y2="20"/><line x1="18" y1="4" x2="18" y2="20"/></svg>
176
+ {{ playing ? 'Playing...' : 'Play all' }}
177
+ </button>
178
+
179
+ <div class="easing-tracks">
180
+ <div
181
+ v-for="token in easingTokens"
182
+ :key="token.name"
183
+ class="easing-row"
184
+ >
185
+ <div class="easing-label">
186
+ <span class="easing-name">{{ token.name }}</span>
187
+ <span class="easing-hint">{{ token.hint }}</span>
188
+ </div>
189
+ <div class="easing-track">
190
+ <div
191
+ class="easing-dot"
192
+ :class="{ 'is-animating': playing }"
193
+ :style="{ transitionTimingFunction: token.css }"
194
+ />
195
+ </div>
196
+ </div>
197
+ </div>
198
+ </div>
199
+ </template>
200
+
201
+ <script setup lang="ts">
202
+ import { ref } from 'vue';
203
+
204
+ const easingTokens = [
205
+ { name: 'Linear', css: 'linear', hint: 'Constant speed' },
206
+ { name: 'Ease Out', css: 'cubic-bezier(0.33, 1, 0.68, 1)', hint: 'Fast start, slow end' },
207
+ { name: 'Ease In', css: 'cubic-bezier(0.32, 0, 0.67, 0)', hint: 'Slow start, fast end' },
208
+ { name: 'Ease In-Out', css: 'cubic-bezier(0.65, 0, 0.35, 1)', hint: 'Slow start and end' },
209
+ { name: 'Bounce', css: 'cubic-bezier(0.34, 1.56, 0.64, 1)', hint: 'Elastic overshoot' },
210
+ ];
211
+
212
+ const playing = ref(false);
213
+ let timeout: ReturnType<typeof setTimeout> | null = null;
214
+
215
+ function play() {
216
+ if (playing.value) {
217
+ playing.value = false;
218
+ if (timeout) clearTimeout(timeout);
219
+ return;
220
+ }
221
+ playing.value = true;
222
+ timeout = setTimeout(() => {
223
+ playing.value = false;
224
+ }, 1200);
225
+ }
226
+ </script>
227
+
228
+ <style scoped>
229
+ .easing-demo {
230
+ padding: 4px 0;
231
+ }
232
+
233
+ .play-btn {
234
+ display: inline-flex;
235
+ align-items: center;
236
+ gap: 6px;
237
+ padding: 6px 16px;
238
+ font-size: 13px;
239
+ font-weight: 500;
240
+ color: var(--vp-c-brand-1);
241
+ background: var(--vp-c-brand-soft);
242
+ border: none;
243
+ border-radius: 8px;
244
+ cursor: pointer;
245
+ transition: background 0.2s ease, transform 0.15s ease;
246
+ margin-bottom: 20px;
247
+ }
248
+
249
+ .play-btn:hover {
250
+ background: var(--vp-c-brand-1);
251
+ color: #fff;
252
+ }
253
+
254
+ .play-btn:active {
255
+ transform: scale(0.97);
256
+ }
257
+
258
+ .easing-tracks {
259
+ display: flex;
260
+ flex-direction: column;
261
+ gap: 12px;
262
+ }
263
+
264
+ .easing-row {
265
+ display: flex;
266
+ align-items: center;
267
+ gap: 16px;
268
+ }
269
+
270
+ .easing-label {
271
+ display: flex;
272
+ flex-direction: column;
273
+ min-width: 120px;
274
+ flex-shrink: 0;
275
+ }
276
+
277
+ .easing-name {
278
+ font-size: 13px;
279
+ font-weight: 600;
280
+ color: var(--vp-c-text-1);
281
+ }
282
+
283
+ .easing-hint {
284
+ font-size: 11px;
285
+ color: var(--vp-c-text-3);
286
+ }
287
+
288
+ .easing-track {
289
+ flex: 1;
290
+ height: 32px;
291
+ background: var(--vp-c-bg-soft);
292
+ border-radius: 16px;
293
+ position: relative;
294
+ overflow: hidden;
295
+ }
296
+
297
+ .easing-dot {
298
+ position: absolute;
299
+ left: 6px;
300
+ top: 50%;
301
+ transform: translateY(-50%);
302
+ width: 20px;
303
+ height: 20px;
304
+ background: var(--vp-c-brand-1);
305
+ border-radius: 50%;
306
+ transition-property: left;
307
+ transition-duration: 600ms;
308
+ }
309
+
310
+ .easing-dot.is-animating {
311
+ left: calc(100% - 26px);
312
+ }
313
+ </style>
314
+ ```
315
+
316
+ ## Pre-composed Transitions
317
+
318
+ Ready-made `transition` values that pair a duration with an easing curve. Hover each button to see the effect it controls.
319
+
320
+ **Demo — `motion/demos/TransitionDemo.vue`**
321
+
322
+ ```vue
323
+ <template>
324
+ <div class="transition-demo">
325
+ <div class="transition-grid">
326
+ <div
327
+ v-for="token in transitionTokens"
328
+ :key="token.name"
329
+ class="transition-card"
330
+ >
331
+ <button
332
+ class="transition-btn"
333
+ :class="token.className"
334
+ :style="{ transition: `var(${token.variable})` }"
335
+ >
336
+ Hover me
337
+ </button>
338
+ <div class="transition-meta">
339
+ <span class="transition-name">{{ token.name }}</span>
340
+ <span class="transition-desc">{{ token.description }}</span>
341
+ </div>
342
+ </div>
343
+ </div>
344
+ </div>
345
+ </template>
346
+
347
+ <script setup lang="ts">
348
+ const transitionTokens = [
349
+ {
350
+ name: 'Default',
351
+ variable: '--coar-transition-default',
352
+ description: 'General purpose',
353
+ className: 'effect-default',
354
+ },
355
+ {
356
+ name: 'Fast',
357
+ variable: '--coar-transition-fast',
358
+ description: 'Micro-interactions',
359
+ className: 'effect-fast',
360
+ },
361
+ {
362
+ name: 'Colors',
363
+ variable: '--coar-transition-colors',
364
+ description: 'Color changes',
365
+ className: 'effect-colors',
366
+ },
367
+ {
368
+ name: 'Transform',
369
+ variable: '--coar-transition-transform',
370
+ description: 'Scale & translate',
371
+ className: 'effect-transform',
372
+ },
373
+ {
374
+ name: 'Opacity',
375
+ variable: '--coar-transition-opacity',
376
+ description: 'Show / hide',
377
+ className: 'effect-opacity',
378
+ },
379
+ {
380
+ name: 'Shadow',
381
+ variable: '--coar-transition-shadow',
382
+ description: 'Elevation shifts',
383
+ className: 'effect-shadow',
384
+ },
385
+ ];
386
+ </script>
387
+
388
+ <style scoped>
389
+ .transition-demo {
390
+ padding: 4px 0;
391
+ }
392
+
393
+ .transition-grid {
394
+ display: grid;
395
+ grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
396
+ gap: 24px;
397
+ }
398
+
399
+ .transition-card {
400
+ display: flex;
401
+ flex-direction: column;
402
+ align-items: center;
403
+ gap: 12px;
404
+ }
405
+
406
+ .transition-btn {
407
+ width: 100%;
408
+ padding: 12px 20px;
409
+ font-size: 13px;
410
+ font-weight: 500;
411
+ color: var(--vp-c-brand-1);
412
+ background: var(--vp-c-brand-soft);
413
+ border: none;
414
+ border-radius: 10px;
415
+ cursor: pointer;
416
+ }
417
+
418
+ /* Each button demonstrates its specific transition property */
419
+ .transition-btn.effect-default:hover,
420
+ .transition-btn.effect-fast:hover {
421
+ background: var(--vp-c-brand-1);
422
+ color: #fff;
423
+ transform: scale(1.03);
424
+ box-shadow: 0 4px 16px rgba(17, 131, 205, 0.2);
425
+ }
426
+
427
+ .transition-btn.effect-colors:hover {
428
+ background: #16a34a;
429
+ color: #fff;
430
+ }
431
+
432
+ .transition-btn.effect-transform:hover {
433
+ transform: scale(1.06) translateY(-2px);
434
+ }
435
+
436
+ .transition-btn.effect-opacity:hover {
437
+ opacity: 0.5;
438
+ }
439
+
440
+ .transition-btn.effect-shadow:hover {
441
+ box-shadow: 0 8px 24px rgba(17, 131, 205, 0.25);
442
+ }
443
+
444
+ .transition-meta {
445
+ display: flex;
446
+ flex-direction: column;
447
+ align-items: center;
448
+ gap: 2px;
449
+ }
450
+
451
+ .transition-name {
452
+ font-size: 13px;
453
+ font-weight: 600;
454
+ color: var(--vp-c-text-1);
455
+ }
456
+
457
+ .transition-desc {
458
+ font-size: 11px;
459
+ color: var(--vp-c-text-3);
460
+ }
461
+ </style>
462
+ ```
463
+
464
+ ## Usage
465
+
466
+ ### Basic transition
467
+
468
+ ```css
469
+ .my-element {
470
+ transition: var(--coar-transition-default);
471
+ }
472
+ ```
473
+
474
+ ### Custom transition with tokens
475
+
476
+ ```css
477
+ .my-element {
478
+ transition:
479
+ background-color var(--coar-duration-normal) var(--coar-ease-out),
480
+ transform var(--coar-duration-fast) var(--coar-ease-bounce);
481
+ }
482
+ ```
483
+
484
+ ### Animation with duration
485
+
486
+ ```css
487
+ @keyframes slide-in {
488
+ from { transform: translateY(-8px); opacity: 0; }
489
+ to { transform: translateY(0); opacity: 1; }
490
+ }
491
+
492
+ .my-element {
493
+ animation: slide-in var(--coar-duration-normal) var(--coar-ease-out);
494
+ }
495
+ ```
496
+
497
+ ## Accessibility
498
+
499
+ All motion tokens respect the `prefers-reduced-motion` media query. When a user opts for reduced motion, every duration collapses to `0 ms` — transitions become instant and nothing moves unexpectedly.
500
+
501
+ ```css
502
+ @media (prefers-reduced-motion: reduce) {
503
+ :root {
504
+ --coar-duration-fast: 0ms;
505
+ --coar-duration-normal: 0ms;
506
+ --coar-duration-slow: 0ms;
507
+ --coar-duration-slower: 0ms;
508
+ --coar-duration-slowest: 0ms;
509
+ }
510
+ }
511
+ ```
512
+
513
+ > **Info**
514
+ >
515
+ > Always use COAR duration tokens instead of hardcoded values. This ensures animations are automatically disabled for users who prefer reduced motion.
516
+
517
+ ## Token Reference
518
+
519
+ ### Duration
520
+
521
+ | Token | Value | Usage |
522
+ |-------|-------|-------|
523
+ | `--coar-duration-instant` | 0 ms | No animation (immediate) |
524
+ | `--coar-duration-fast` | 100 ms | Micro-interactions, hover states |
525
+ | `--coar-duration-normal` | 200 ms | Most transitions |
526
+ | `--coar-duration-slow` | 300 ms | Complex state changes |
527
+ | `--coar-duration-slower` | 400 ms | Large movements |
528
+ | `--coar-duration-slowest` | 600 ms | Page-level transitions |
529
+
530
+ ### Easing
531
+
532
+ | Token | Usage |
533
+ |-------|-------|
534
+ | `--coar-ease-linear` | Constant speed — for opacity, color |
535
+ | `--coar-ease-out` | Fast start, slow end — most UI motion |
536
+ | `--coar-ease-in` | Slow start, fast end — dismissals |
537
+ | `--coar-ease-in-out` | Slow start and end — complex motions |
538
+ | `--coar-ease-bounce` | Elastic overshoot — playful feedback |
539
+
540
+ ### Pre-composed Transitions
541
+
542
+ | Token | Usage |
543
+ |-------|-------|
544
+ | `--coar-transition-default` | General-purpose transition |
545
+ | `--coar-transition-fast` | Quick micro-interactions |
546
+ | `--coar-transition-colors` | Background and text color changes |
547
+ | `--coar-transition-transform` | Scale, rotate, translate |
548
+ | `--coar-transition-opacity` | Show / hide transitions |
549
+ | `--coar-transition-shadow` | Elevation changes on hover |