@1337exp/taoui 5.27.1 → 5.29.1
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.
- package/CHANGELOG.md +707 -697
- package/README.md +1 -0
- package/README.ru.md +1 -0
- package/dist/index.d.ts +252 -178
- package/dist/index.js +256 -142
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +105 -105
- package/skills/taoui/SKILL.md +1 -1
- package/skills/taoui/references/components.md +1297 -1282
- package/src/styles/contexts/stretch.css +62 -0
- package/src/styles/index.css +1 -0
|
@@ -1,1282 +1,1297 @@
|
|
|
1
|
-
# TaoUI components: props, events, slots
|
|
2
|
-
|
|
3
|
-
Generated from the showcase prop tables by `npm run skill`; do not edit by hand.
|
|
4
|
-
A default "inherited" means the value comes from a context class on an ancestor (size, density).
|
|
5
|
-
|
|
6
|
-
## TaoBlock
|
|
7
|
-
|
|
8
|
-
Showcase section: `#block`
|
|
9
|
-
|
|
10
|
-
| Prop | Type | Default | Notes |
|
|
11
|
-
|---|---|---|---|
|
|
12
|
-
| `padding` | `number \| string \| (…)[]` | 16 | Inner padding. A number is px, a string is any CSS length. An array works like CSS padding (1–4 values) |
|
|
13
|
-
| `radius` | `number \| string` | 8 | Corner radius. A number is px, a string is CSS |
|
|
14
|
-
| `shadow` | `boolean` | true | Panel shadow |
|
|
15
|
-
| `hover` | `boolean` | false | Stronger shadow on hover, pointer cursor |
|
|
16
|
-
| `surface` | `'flat' \| 'grain' \| 'glass'` | 'flat' | What the block is made of: fill / grain / glass. See “Surfaces” |
|
|
17
|
-
| `stripe` | `'top' \| 'left' \| 'bottom'` | — | A coloured stripe on one side; the corners clip it (over a picture in #media too) |
|
|
18
|
-
| `stripeTone` | `tone \| 'gradient'` | 'accent' | The stripe colour: accent, success / danger / warning / info / neutral, or the palette gradient. Say a status in the text as well |
|
|
19
|
-
|
|
20
|
-
**Slots, events, notes.** default — the block content.
|
|
21
|
-
|
|
22
|
-
## TaoButton
|
|
23
|
-
|
|
24
|
-
Showcase section: `#button`
|
|
25
|
-
|
|
26
|
-
| Prop | Type | Default | Notes |
|
|
27
|
-
|---|---|---|---|
|
|
28
|
-
| `type` | `'button' \| 'submit' \| 'reset'` | 'button' | The native button type |
|
|
29
|
-
| `variant` | `'primary' \| 'secondary' \| 'ghost' \| 'text'` | 'primary' | Shape. The colour is tone |
|
|
30
|
-
| `tone` | `'accent' \| 'neutral' \| 'success' \| 'danger' \| 'warning' \| 'info'` | 'accent' | The colour, on any variant. accent is the theme accent. neutral keeps the text strong and only the hover wash takes the theme colour: the quiet action next to a primary one |
|
|
31
|
-
| `size` | `'small' \| 'medium' \| 'large'` | inherited | Size. Without it — the size of the ancestors (the tao-size-* class or size on FormField / InputGroup), otherwise medium |
|
|
32
|
-
| `disabled` | `boolean` | false | Disabled |
|
|
33
|
-
| `loading` | `boolean` | false | A spinner, the click is swallowed |
|
|
34
|
-
| `block` | `boolean` | false | 100% width |
|
|
35
|
-
| `minWidth` | `number \| string` | — | Minimum width (number = px); the --tao-button-min-width variable |
|
|
36
|
-
| `icon` | `string` | '' | An icon before the text: a name for TaoIcon (tao-plus, your own or a font one). Without text and slot the button is a square of the control height and needs aria-label |
|
|
37
|
-
| `iconEnd` | `string` | '' | An icon after the text |
|
|
38
|
-
| `v-model:pressed` | `boolean` | — | A toggle button (Bold, a filter): aria-pressed and the tone tint while pressed. Without it the button is an ordinary one |
|
|
39
|
-
| `shortcut` | `string` | — | The key that does the same (N, Ctrl+K): shown at the end of the button, given as aria-keyshortcuts. It only shows the key; listening to it is the app's job |
|
|
40
|
-
|
|
41
|
-
**Slots, events, notes.** default — the button caption.
|
|
42
|
-
|
|
43
|
-
## .tao-prose / .tao-heading-*
|
|
44
|
-
|
|
45
|
-
Showcase section: `#typography`
|
|
46
|
-
|
|
47
|
-
| Prop | Type | Default | Notes |
|
|
48
|
-
|---|---|---|---|
|
|
49
|
-
| `--tao-text-base` | `length` | 16px | The text size and h6; the scale is counted from it |
|
|
50
|
-
| `--tao-text-ratio` | `number` | 1.25 | The step of the scale: each level up is multiplied by it (1.2 calmer, 1.333 bolder). Set it on any element and the scale under it follows |
|
|
51
|
-
| `--tao-heading-1…6` | `length` | 49 / 39 / 31 / 25 / 20 / 16 | The steps, ready for your own rules; h1 and h2 in .tao-prose shrink on a narrow screen (not below h3 / h4) |
|
|
52
|
-
| `--tao-line-height-body / -heading` | `number` | 1.6 / 1.25 | Line height of text and headings |
|
|
53
|
-
| `--tao-font-family-mono` | `font` | ui-monospace… | The code font in .tao-prose |
|
|
54
|
-
|
|
55
|
-
**Slots, events, notes.** .tao-prose on a wrapper: headings, paragraphs, lists, quotes, code, hr, links (the theme link colour), images; spacing by proximity. Every rule inside is :where(), your CSS wins. .tao-heading-1…6 — the look of a level on any tag (h2 class="tao-heading-5").
|
|
56
|
-
|
|
57
|
-
## Classes and tokens
|
|
58
|
-
|
|
59
|
-
Showcase section: `#surface`
|
|
60
|
-
|
|
61
|
-
| Prop | Type | Default | Notes |
|
|
62
|
-
|---|---|---|---|
|
|
63
|
-
| `.tao-surface-grain` | `class` | — | Static film grain. Any element |
|
|
64
|
-
| `.tao-surface-glass` | `class` | — | A translucent fill + background blur. Without blur support, or with prefers-reduced-transparency, it is solid |
|
|
65
|
-
| `--tao-surface-grain-image / -size` | `image / length` | SVG / 160px | Your own grain texture |
|
|
66
|
-
| `--tao-glass-fill / -border / -blur` | `color / color / length` | 55% / white 8% / 16px | Glass |
|
|
67
|
-
|
|
68
|
-
**Slots, events, notes.** A surface belongs to a single element: nested panels do not inherit it. Toast and confirm are glass by default: toast.defaults({ surface: 'flat' }) / confirm.defaults({ surface: 'flat' }) turn it off.
|
|
69
|
-
|
|
70
|
-
## TaoCard
|
|
71
|
-
|
|
72
|
-
Showcase section: `#card`
|
|
73
|
-
|
|
74
|
-
| Prop | Type | Default | Notes |
|
|
75
|
-
|---|---|---|---|
|
|
76
|
-
| `padding` | `number \| string \| (…)[]` | var(--tao-space-5) | Padding of the card body. A number is px, a string is CSS. With flush — 0. Published as --tao-pad |
|
|
77
|
-
| `radius` | `number \| string` | var(--tao-radius-panel) | Corner radius. A number is px, a string is CSS. Published as --tao-radius; children get --tao-radius-inner |
|
|
78
|
-
| `shadow` | `boolean` | true | The regular shadow. Off with flush |
|
|
79
|
-
| `shadowBottomOnly` | `boolean` | false | A line at the bottom of the card, not a scrim over the photo |
|
|
80
|
-
| `flush` | `boolean` | false | A tile: no padding and no shadow, cover/body fill the whole cell |
|
|
81
|
-
| `hover` | `boolean` | false | An accent outline on hover |
|
|
82
|
-
| `surface` | `'flat' \| 'grain' \| 'glass'` | 'flat' | What the card is made of: fill / grain / glass. See “Surfaces” |
|
|
83
|
-
| `stripe` | `'top' \| 'left' \| 'bottom'` | — | A coloured stripe on one side; the corners clip it (over a picture in #media too) |
|
|
84
|
-
| `stripeTone` | `tone \| 'gradient'` | 'accent' | The stripe colour: accent, success / danger / warning / info / neutral, or the palette gradient. Say a status in the text as well |
|
|
85
|
-
| `active` | `boolean` | false | The selected state |
|
|
86
|
-
| `overflow` | `boolean` | false | Do not clip the content (media / carousel) |
|
|
87
|
-
| `closable` | `boolean` | false | A close button in the top right corner; the parent removes the card on the close event |
|
|
88
|
-
| `closeLabel` | `string` | 'Close' | aria-label of the close button |
|
|
89
|
-
|
|
90
|
-
**Slots, events, notes.** default — the body. #media (a photo or a carousel on top), #overlay (a scrim over the media or the whole tile), #header (the top row: laid out as you like), #title, #sub, #footer, #corner (the top right corner: a tag, a menu button; the title leaves room for it, the width is the variable --tao-card-corner-size). The close event — the cross was pressed.
|
|
91
|
-
|
|
92
|
-
## TaoMarquee
|
|
93
|
-
|
|
94
|
-
Showcase section: `#marquee`
|
|
95
|
-
|
|
96
|
-
| Prop | Type | Default | Notes |
|
|
97
|
-
|---|---|---|---|
|
|
98
|
-
| `text` | `string` | '' | The line; or anything inline in the slot (a link, an icon, bold text) |
|
|
99
|
-
| `speed` | `number` | 40 | Speed, pixels per second |
|
|
100
|
-
| `gap` | `number` | 48 | The gap between the end of the line and its next round, px |
|
|
101
|
-
| `fade` | `number` | 22 | The width of the fading edges, px. The left fade lives in a padding outside the text: at rest the line stands where it would, but the parent needs that much room on the left (its padding, or a smaller fade; 0 for none) or the running text shows past its edge |
|
|
102
|
-
| `pauseOnHover` | `boolean` | true | Stop on hover, and a tap stops and starts it. false is for a background line: a cursor or a finger passing by does not stop it, and the running text cannot be selected. Focus still stops it, Tab reaches the line |
|
|
103
|
-
| `roundPause` | `boolean` | true | A pause at the start of every round, to read the beginning. false — the line runs without a stop, like a looped picture. Not set: a decorative line has no pause, an ordinary one has |
|
|
104
|
-
| `decorative` | `boolean` | false | The line is only decoration (a background, a design feature) with no meaning: a ghost. Hidden from a screen reader, not a tab stop, a cursor and a tap are nothing to it, the text cannot be selected, it runs without pauses. Only for text nobody needs to read. With «reduce motion» it stands still, clipped |
|
|
105
|
-
| `paused` | `boolean` | false | Stopped by the app |
|
|
106
|
-
|
|
107
|
-
**Slots, events, notes.** default — the content of the line; its copies for the second round are hidden from a screen reader and inert. It runs only when it does not fit; it stops on hover, on focus (a running line is a tab stop) and on a tap; with «reduce motion» it wraps. measure() — measure again by hand.
|
|
108
|
-
|
|
109
|
-
## TaoCopy
|
|
110
|
-
|
|
111
|
-
Showcase section: `#copy`
|
|
112
|
-
|
|
113
|
-
| Prop | Type | Default | Notes |
|
|
114
|
-
|---|---|---|---|
|
|
115
|
-
| `text` | `string` | — | The string for the clipboard. Required |
|
|
116
|
-
| `successText` | `string` | 'Copied!' | The tooltip text after the click |
|
|
117
|
-
| `copyLabel` | `string` | 'Copy' | aria-label of the button |
|
|
118
|
-
| `tip` | `boolean` | true | Show a tooltip above the button after copying |
|
|
119
|
-
|
|
120
|
-
## TaoTour
|
|
121
|
-
|
|
122
|
-
Showcase section: `#tour`
|
|
123
|
-
|
|
124
|
-
| Prop | Type | Default | Notes |
|
|
125
|
-
|---|---|---|---|
|
|
126
|
-
| `step` | `TaoTourStep \| null` | null | The step on screen; null closes the tour. A step: { id, target?, title?, text?, placement? }. target is a CSS selector, an element or a function that finds it; without it (or when nothing is found) the step is a card in the middle |
|
|
127
|
-
| `index` | `number` | 0 | The place of the step in the tour, from 0 (for the dots and "Step 2 of 5"). With TaoUX it is position, which does not count the steps that are jumped over |
|
|
128
|
-
| `count` | `number` | 0 | How many steps there are; at 1 or less there are no dots and no counter. With TaoUX it is total |
|
|
129
|
-
| `first` | `boolean` | index === 0 | No Back button |
|
|
130
|
-
| `last` | `boolean` | index === count - 1 | The button says Done instead of Next, and there is no Skip |
|
|
131
|
-
| `placement` | `TaoPlacement` | 'bottom' | Where the card stands against the target when the step does not say. It flips when it does not fit |
|
|
132
|
-
| `padding` | `number` | 6 | Space between the target and the edge of the lit window, px |
|
|
133
|
-
| `interactive` | `boolean` | false | The target can be pressed (a "press here" step); the rest of the page stays shut |
|
|
134
|
-
| `nextLabel / prevLabel / skipLabel / doneLabel` | `string` | from the locale | Button texts |
|
|
135
|
-
| `progressLabel` | `string` | 'Step {n} of {count}' | The progress text |
|
|
136
|
-
|
|
137
|
-
**Slots, events, notes.** default { step, index, count }: your own card content (instead of the title and the text). Events: next, prev, skip (the buttons, the arrows, Esc). TaoTour only draws: you keep the state, or use useTour from TaoUX (@1337exp/taoux/tour), which jumps over steps with no target and remembers that the tour was seen. The step scrolls its target into view by itself.
|
|
138
|
-
|
|
139
|
-
## TaoThemeToggle
|
|
140
|
-
|
|
141
|
-
Showcase section: `#theme-toggle`
|
|
142
|
-
|
|
143
|
-
| Prop | Type | Default | Notes |
|
|
144
|
-
|---|---|---|---|
|
|
145
|
-
| `v-model` | `'dark' \| 'light'` | page mode | The mode. Without it the button reads the mode of <html> (data-tao-mode) and follows it |
|
|
146
|
-
| `apply` | `boolean` | true | Write the mode to <html>. Turn it off to do it yourself from v-model (save the choice, change a class) |
|
|
147
|
-
| `size` | `'small' \| 'medium' \| 'large'` | from ancestors | Button size |
|
|
148
|
-
| `variant` | `'primary' \| 'secondary' \| 'ghost' \| 'text'` | 'ghost' | Button look |
|
|
149
|
-
| `toLightLabel` | `string` | 'Switch to the light theme' | aria-label while the theme is dark (what a click does) |
|
|
150
|
-
| `toDarkLabel` | `string` | 'Switch to the dark theme' | aria-label while the theme is light |
|
|
151
|
-
|
|
152
|
-
**Slots, events, notes.** icon: your own glyph, { mode, next } (the current mode and the one a click leads to); the button stays a square and keeps its label. update:modelValue and change: the new mode ("dark" \| "light"). The icon is the theme a click leads to (a sun while dark, a moon while light).
|
|
153
|
-
|
|
154
|
-
## TaoInput
|
|
155
|
-
|
|
156
|
-
Showcase section: `#input`
|
|
157
|
-
|
|
158
|
-
| Prop | Type | Default | Notes |
|
|
159
|
-
|---|---|---|---|
|
|
160
|
-
| `v-model` | `string \| number` | '' | The field value |
|
|
161
|
-
| `type` | `'text' \| 'password' \| 'email' \| 'number' \| 'tel'` | 'text' | The native input type |
|
|
162
|
-
| `placeholder` | `string` | '' | The hint inside |
|
|
163
|
-
| `size` | `'small' \| 'medium' \| 'large'` | inherited | Size, the same scale as TaoButton. Without it — the size of the ancestors (tao-size-* or size on FormField / InputGroup), otherwise medium |
|
|
164
|
-
| `disabled` | `boolean` | false | Disabled |
|
|
165
|
-
| `error` | `boolean` | false | A red border. The error text is error on TaoFormField |
|
|
166
|
-
| `variant` | `'outline' \| 'filled' \| 'plain'` | 'outline' | A frame / a fill only / nothing: plain reads as text (an item of a list being edited): no inset, the caret shows the focus, an error is a red line under the text. The height does not change |
|
|
167
|
-
| `id` | `string` | auto | The input id; otherwise taken from FormField or useId |
|
|
168
|
-
|
|
169
|
-
**Slots, events, notes.** #prefix and #suffix — inside the frame, left/right (an icon, text).
|
|
170
|
-
|
|
171
|
-
## TaoInputGroup
|
|
172
|
-
|
|
173
|
-
Showcase section: `#input`
|
|
174
|
-
|
|
175
|
-
| Prop | Type | Default | Notes |
|
|
176
|
-
|---|---|---|---|
|
|
177
|
-
| `size` | `'small' \| 'medium' \| 'large'` | inherited | The size of the whole group: addons, the field and buttons inside |
|
|
178
|
-
|
|
179
|
-
**Slots, events, notes.** default — the field itself (TaoInput etc.). #before / #after — a protocol, a unit, a button. Glues addon + field + addon into one frame.
|
|
180
|
-
|
|
181
|
-
## TaoInputNumber
|
|
182
|
-
|
|
183
|
-
Showcase section: `#input-number`
|
|
184
|
-
|
|
185
|
-
| Prop | Type | Default | Notes |
|
|
186
|
-
|---|---|---|---|
|
|
187
|
-
| `v-model` | `number \| null` | null | A number. An empty field is null, not 0 and not a string |
|
|
188
|
-
| `min / max` | `number` | — | The bounds. If not set — no limit |
|
|
189
|
-
| `step` | `number` | 1 | The step of ± and the arrows |
|
|
190
|
-
| `precision` | `number` | — | Digits after the decimal point |
|
|
191
|
-
| `@commit` | `number \| null` | — | Edit finished: blur, Enter, ±, arrow key (once per action; v-model fires per keystroke). |
|
|
192
|
-
| `controls` | `boolean` | true | ± buttons on the right |
|
|
193
|
-
| `size` | `'small' \| 'medium' \| 'large'` | inherited | Size, the same scale as TaoButton. Without it — the size of the ancestors (tao-size-* or size on FormField / InputGroup), otherwise medium |
|
|
194
|
-
| `disabled` | `boolean` | false | Disabled |
|
|
195
|
-
| `error` | `boolean` | false | A red border. The error text is error on TaoFormField |
|
|
196
|
-
| `variant` | `'outline' \| 'filled' \| 'plain'` | 'outline' | As on TaoInput: a frame / a fill only / nothing (the field reads as text, an error is a red line under the text) |
|
|
197
|
-
| `placeholder` | `string` | '' | The hint when null |
|
|
198
|
-
|
|
199
|
-
## TaoQuantity
|
|
200
|
-
|
|
201
|
-
Showcase section: `#quantity`
|
|
202
|
-
|
|
203
|
-
| Prop | Type | Default | Notes |
|
|
204
|
-
|---|---|---|---|
|
|
205
|
-
| `v-model` | `number` | 1 | A whole quantity. Never empty |
|
|
206
|
-
| `min` | `number` | 1 | The lower bound |
|
|
207
|
-
| `max` | `number` | — | Stock. If not set — no ceiling |
|
|
208
|
-
| `allowRemove` | `boolean` | true | The minus at min stays alive and fires dec — the parent may remove the row |
|
|
209
|
-
| `forceMaxLimit` | `boolean` | true | Clamp the input to max on blur and when more than the stock arrives |
|
|
210
|
-
| `size` | `'small' \| 'medium' \| 'large'` | inherited | Size, the same scale as TaoButton. Without it — the size of the ancestors (tao-size-* or size on FormField / InputGroup), otherwise medium |
|
|
211
|
-
| `disabled` | `boolean` | false | Disabled |
|
|
212
|
-
| `error` | `boolean` | false | A red border. The error text is error on TaoFormField |
|
|
213
|
-
|
|
214
|
-
**Slots, events, notes.** #decrement-icon / #increment-icon — the button icons.
|
|
215
|
-
|
|
216
|
-
## TaoTextarea
|
|
217
|
-
|
|
218
|
-
Showcase section: `#textarea`
|
|
219
|
-
|
|
220
|
-
| Prop | Type | Default | Notes |
|
|
221
|
-
|---|---|---|---|
|
|
222
|
-
| `v-model` | `string` | '' | Text |
|
|
223
|
-
| `placeholder` | `string` | '' | Hint |
|
|
224
|
-
| `rows` | `number` | 3 | The initial height |
|
|
225
|
-
| `maxHeight` | `number \| string` | 500 | How tall the field grows with its text before it scrolls: a number is px, a string any CSS length (50vh), none — no limit. Dragging the corner stops there too |
|
|
226
|
-
| `maxlength` | `number` | — | Cuts the input |
|
|
227
|
-
| `count` | `boolean` | false | Show “typed / maximum” (together with maxlength) |
|
|
228
|
-
| `resize` | `boolean` | true | Can be dragged by the corner |
|
|
229
|
-
| `variant` | `'bar' \| 'outline' \| 'filled' \| 'plain'` | 'bar' | A stripe on the left / a frame like TaoInput / a fill only / nothing |
|
|
230
|
-
| `readonly` | `boolean` | false | Can be read and selected, but not edited |
|
|
231
|
-
| `noSpace` | `boolean` | false | A space cannot be typed — neither from the keyboard nor by pasting |
|
|
232
|
-
| `align` | `'start' \| 'center' \| 'end'` | 'start' | Text alignment |
|
|
233
|
-
| `autofocus` | `boolean` | false | Focus on mount |
|
|
234
|
-
| `blurOnEnter` | `boolean` | false | Enter drops the focus instead of inserting a line break (Shift+Enter inserts it); keydown goes out first |
|
|
235
|
-
| `size` | `'small' \| 'medium' \| 'large'` | inherited | Size, the same scale as TaoButton. Without it — the size of the ancestors (tao-size-* or size on FormField / InputGroup), otherwise medium |
|
|
236
|
-
| `disabled` | `boolean` | false | Disabled |
|
|
237
|
-
| `error` | `boolean` | false | A red border |
|
|
238
|
-
|
|
239
|
-
## TaoChecklist
|
|
240
|
-
|
|
241
|
-
Showcase section: `#checklist`
|
|
242
|
-
|
|
243
|
-
| Prop | Type | Default | Notes |
|
|
244
|
-
|---|---|---|---|
|
|
245
|
-
| `items` | `TaoChecklistItem[]` | — | { value, label, description?, disabled? } |
|
|
246
|
-
| `v-model` | `(string \| number)[]` | [] | The checked values, in the order of the items |
|
|
247
|
-
| `legend` | `string` | — | The group caption (legend). In a TaoFormField the field gives it |
|
|
248
|
-
| `selectAll` | `boolean` | false | «Select all» on top: mixed when some are checked; toggles every enabled item |
|
|
249
|
-
| `counter` | `boolean` | false | «3 of 5» next to the caption, announced politely |
|
|
250
|
-
| `strike` | `boolean` | false | Strike the checked items through (a to-do list). A look only: the checkbox tells the state |
|
|
251
|
-
| `disabled` | `boolean` | false | The whole group is disabled |
|
|
252
|
-
| `error` | `boolean` | false | Red frames; the message goes to error of TaoFormField |
|
|
253
|
-
| `size` | `'small' \| 'medium' \| 'large'` | inherited | Size of the checkboxes |
|
|
254
|
-
| `selectAllLabel` | `string` | 'Select all' | The «Select all» label |
|
|
255
|
-
| `counterText` | `string` | '{checked} of {total}' | The counter text |
|
|
256
|
-
|
|
257
|
-
**Slots, events, notes.** #item — { item, checked }: your own item text. Events update:modelValue, change. «Select all» leaves a disabled item alone. A fieldset: in a TaoFormField the group takes the id, the label and the error of the field, the checkboxes inside keep ids of their own.
|
|
258
|
-
|
|
259
|
-
## TaoCheckbox
|
|
260
|
-
|
|
261
|
-
Showcase section: `#checkbox`
|
|
262
|
-
|
|
263
|
-
| Prop | Type | Default | Notes |
|
|
264
|
-
|---|---|---|---|
|
|
265
|
-
| `v-model` | `boolean` | — | Checked / not |
|
|
266
|
-
| `checked` | `boolean` | — | The state without v-model |
|
|
267
|
-
| `label` | `string` | '' | The caption on the right |
|
|
268
|
-
| `indeterminate` | `boolean` | false | A dash instead of the tick. A click sets checked, the parent works out the mixed state |
|
|
269
|
-
| `disabled` | `boolean` | false | Disabled |
|
|
270
|
-
| `size` | `'small' \| 'medium' \| 'large'` | inherited | A 14 / 18 / 22 square and the caption font size. Without it — the size of the ancestors |
|
|
271
|
-
| `error` | `boolean` | false | A red accent. The error text goes through TaoFormField |
|
|
272
|
-
|
|
273
|
-
## TaoSelect
|
|
274
|
-
|
|
275
|
-
Showcase section: `#select`
|
|
276
|
-
|
|
277
|
-
| Prop | Type | Default | Notes |
|
|
278
|
-
|---|---|---|---|
|
|
279
|
-
| `v-model` | `string \| number \| null` | null | value of the selected option. Clearing → null |
|
|
280
|
-
| `options` | `TaoSelectOption[]` | [] | { value, label, disabled? } |
|
|
281
|
-
| `placeholder` | `string` | 'Choose' | When the model is null |
|
|
282
|
-
| `disabled` | `boolean` | false | Disabled |
|
|
283
|
-
| `error` | `boolean` | false | A red border |
|
|
284
|
-
| `size` | `'small' \| 'medium' \| 'large'` | inherited | Size, as TaoButton; also scales the opened list. Without it — the size of the ancestors |
|
|
285
|
-
| `clearable` | `boolean` | true | Clear row and Delete / Backspace. Turn off when null is not valid. |
|
|
286
|
-
| `clearText` | `string` | 'Clear' | Label of the clear row. |
|
|
287
|
-
|
|
288
|
-
**Slots, events, notes.** #clear: content of the clear row (icon, markup), replaces clearText. #chevron: custom arrow.
|
|
289
|
-
|
|
290
|
-
## TaoSwitch
|
|
291
|
-
|
|
292
|
-
Showcase section: `#select`
|
|
293
|
-
|
|
294
|
-
| Prop | Type | Default | Notes |
|
|
295
|
-
|---|---|---|---|
|
|
296
|
-
| `v-model` | `boolean` | false | On / off. role="switch" |
|
|
297
|
-
| `label` | `string` | '' | The caption on the right |
|
|
298
|
-
| `disabled` | `boolean` | false | Disabled |
|
|
299
|
-
| `size` | `'small' \| 'medium' \| 'large'` | inherited | The track is 28 / 36 / 44 px wide, and the caption font size. Without it — the size of the ancestors |
|
|
300
|
-
| `error` | `boolean` | false | A red border. The error text is error on TaoFormField |
|
|
301
|
-
| `loading` | `boolean` | false | The change is being applied: a spinner on the thumb, a click does nothing, not greyed out; aria-busy |
|
|
302
|
-
|
|
303
|
-
## TaoRadio / TaoRadioGroup
|
|
304
|
-
|
|
305
|
-
Showcase section: `#select`
|
|
306
|
-
|
|
307
|
-
| Prop | Type | Default | Notes |
|
|
308
|
-
|---|---|---|---|
|
|
309
|
-
| `value` | `string \| number \| boolean` | — | Radio: the value of this point. Required |
|
|
310
|
-
| `v-model` | `the same` | — | Group holds the selection. A Radio without a group holds its own |
|
|
311
|
-
| `legend` | `string` | — | Group: the group caption |
|
|
312
|
-
| `direction` | `'row' \| 'column'` | 'row' | Group: in a row or in a column |
|
|
313
|
-
| `disabled` | `boolean` | false | A single point or the whole group |
|
|
314
|
-
| `error` | `boolean` | false | A red border. The error text is error on TaoFormField |
|
|
315
|
-
| `size` | `'small' \| 'medium' \| 'large'` | inherited | A 14 / 18 / 22 circle and the caption font size. On a group — for all the radios inside |
|
|
316
|
-
| `label / name` | `string` | '' | Radio: the caption and name, if there is no group |
|
|
317
|
-
|
|
318
|
-
## TaoFormField
|
|
319
|
-
|
|
320
|
-
Showcase section: `#select`
|
|
321
|
-
|
|
322
|
-
| Prop | Type | Default | Notes |
|
|
323
|
-
|---|---|---|---|
|
|
324
|
-
| `label` | `string` | — | A shared caption above the control |
|
|
325
|
-
| `hint` | `string` | — | A hint under the field |
|
|
326
|
-
| `error` | `string` | — | The error text; if present, the field is invalid |
|
|
327
|
-
| `size` | `'small' \| 'medium' \| 'large'` | inherited | The size of the control inside |
|
|
328
|
-
|
|
329
|
-
**Slots, events, notes.** default — the control itself (Input, Select, Switch…).
|
|
330
|
-
|
|
331
|
-
## TaoSegmented
|
|
332
|
-
|
|
333
|
-
Showcase section: `#segmented`
|
|
334
|
-
|
|
335
|
-
| Prop | Type | Default | Notes |
|
|
336
|
-
|---|---|---|---|
|
|
337
|
-
| `v-model` | `string \| number \| boolean` | — | value of the selected option |
|
|
338
|
-
| `size` | `'small' \| 'medium' \| 'large'` | inherited | The segment height, the same scale as TaoButton. Without it — the size of the ancestors |
|
|
339
|
-
| `block` | `boolean` | false | Stretch to the parent width |
|
|
340
|
-
| `minWidth` | `number \| string` | — | Minimum width of every option (number = px); the --tao-segmented-option-min-width variable |
|
|
341
|
-
| `legend` | `string` | — | The accessible name of the group |
|
|
342
|
-
| `disabled` | `boolean` | false | The whole group |
|
|
343
|
-
| `error` | `boolean` | false | A red border. The error text is error on TaoFormField |
|
|
344
|
-
| `name` | `string` | auto | name for the radio inputs inside |
|
|
345
|
-
|
|
346
|
-
**Slots, events, notes.** default — a set of TaoSegmentedOption.
|
|
347
|
-
|
|
348
|
-
## TaoSegmentedOption
|
|
349
|
-
|
|
350
|
-
Showcase section: `#segmented`
|
|
351
|
-
|
|
352
|
-
| Prop | Type | Default | Notes |
|
|
353
|
-
|---|---|---|---|
|
|
354
|
-
| `value` | `string \| number \| boolean` | — | The option value. Required |
|
|
355
|
-
| `label` | `string` | '' | The text. Or the default slot |
|
|
356
|
-
| `icon` | `string` | '' | A TaoIcon name on the left |
|
|
357
|
-
| `count` | `number \| string` | — | A number on the right (a badge) |
|
|
358
|
-
| `disabled` | `boolean` | false | This option |
|
|
359
|
-
|
|
360
|
-
## TaoCombobox
|
|
361
|
-
|
|
362
|
-
Showcase section: `#combobox`
|
|
363
|
-
|
|
364
|
-
| Prop | Type | Default | Notes |
|
|
365
|
-
|---|---|---|---|
|
|
366
|
-
| `v-model` | `string \| number \| null` | null | value of an option, or an arbitrary string with allow-create |
|
|
367
|
-
| `options` | `TaoSelectOption[]` | [] | { value, label, disabled? }. The list is not mutated by the component |
|
|
368
|
-
| `placeholder` | `string` | 'Start typing' | The empty field |
|
|
369
|
-
| `allowCreate` | `boolean` | false | A value that is not in the list can be kept |
|
|
370
|
-
| `emptyText` | `string` | 'Nothing found' | An empty filter |
|
|
371
|
-
| `size` | `'small' \| 'medium' \| 'large'` | inherited | Size, as TaoButton and TaoSelect; also scales the opened list. Without it — the size of the ancestors |
|
|
372
|
-
| `clearable` | `boolean` | true | Clear row in the list. Turn off when null is not valid. |
|
|
373
|
-
| `clearText` | `string` | 'Clear' | Label of the clear row; slot #clear replaces it. |
|
|
374
|
-
| `disabled / error` | `boolean` | false | Disabled / a red border |
|
|
375
|
-
| `variant` | `'outline' \| 'filled' \| 'plain'` | 'outline' | As on TaoInput: a frame / a fill only / nothing (the field reads as text, an error is a red line under the text) |
|
|
376
|
-
|
|
377
|
-
**Slots, events, notes.** create — an event when a new value is typed: the parent extends options itself.
|
|
378
|
-
|
|
379
|
-
## TypeaheadPlayground
|
|
380
|
-
|
|
381
|
-
Showcase section: `#typeahead`
|
|
382
|
-
|
|
383
|
-
| Prop | Type | Default | Notes |
|
|
384
|
-
|---|---|---|---|
|
|
385
|
-
| `v-model` | `object \| null` | null | The selected hit { id, name, city, role } or null |
|
|
386
|
-
|
|
387
|
-
**Slots, events, notes.** #item="{ hit, active }" — a list row. #empty — nothing found. Not part of the npm package, lives in showcase/demo.
|
|
388
|
-
|
|
389
|
-
## TaoDate
|
|
390
|
-
|
|
391
|
-
Showcase section: `#date`
|
|
392
|
-
|
|
393
|
-
| Prop | Type | Default | Notes |
|
|
394
|
-
|---|---|---|---|
|
|
395
|
-
| `v-model` | `string \| null` | null | A single day YYYY-MM-DD, with no time and no time zone |
|
|
396
|
-
| `min / max` | `string` | — | The bounds in the same format |
|
|
397
|
-
| `placeholder` | `string` | 'Date' | The empty field |
|
|
398
|
-
| `locale` | `string` | the app locale | The calendar captions and the order of day and month; without it the language of setTaoLocale |
|
|
399
|
-
| `editable` | `boolean` | false | A text field you type the date into, the calendar on the button next to it or ↓. In the locale's order of day and month: 5 is the 5th of this month, 5.3 the 5th of March (3/5 in en-US), 05.03.26, 0503, ISO. Enter or leaving the field applies it; a text that is not a date or is outside min / max puts the value back; Esc drops the typing; an empty field is null |
|
|
400
|
-
| `parse / format` | `(text, { locale, reference }) => string \| null / (iso, locale) => string` | — | Your own reading of the typed text («tomorrow») and your own text in the field; reference is the current value or today |
|
|
401
|
-
| `size` | `'small' \| 'medium' \| 'large'` | inherited | Size, the same scale as TaoButton. Without it — the size of the ancestors (tao-size-* or size on FormField / InputGroup), otherwise medium |
|
|
402
|
-
| `disabled / error` | `boolean` | false | Disabled / a red border |
|
|
403
|
-
| `todayText / clearText` | `string` | 'Today' / 'Clear' | The buttons at the bottom of the popup |
|
|
404
|
-
| `calendarLabel` | `string` | 'Choose a date' | aria-label of the calendar button of an editable field |
|
|
405
|
-
|
|
406
|
-
**Slots, events, notes.** #icon, #prev-icon, #next-icon — the icons of the field and of the month arrows.
|
|
407
|
-
|
|
408
|
-
## TaoDateRange
|
|
409
|
-
|
|
410
|
-
Showcase section: `#date`
|
|
411
|
-
|
|
412
|
-
| Prop | Type | Default | Notes |
|
|
413
|
-
|---|---|---|---|
|
|
414
|
-
| `v-model` | `{ start, end } \| null` | null | A period YYYY-MM-DD. An incomplete choice is not written to the model |
|
|
415
|
-
| `min / max` | `string` | — | The bounds |
|
|
416
|
-
| `placeholder` | `string` | 'Period' | While null |
|
|
417
|
-
| `locale` | `string` | the app locale | The calendar captions; without it the language of setTaoLocale |
|
|
418
|
-
| `size` | `'small' \| 'medium' \| 'large'` | inherited | Size, the same scale as TaoButton. Without it — the size of the ancestors (tao-size-* or size on FormField / InputGroup), otherwise medium |
|
|
419
|
-
| `disabled / error` | `boolean` | false | Disabled / a red border |
|
|
420
|
-
|
|
421
|
-
**Slots, events, notes.** The first click is start, the second is end (they swap if end is earlier).
|
|
422
|
-
|
|
423
|
-
## TaoPinCode
|
|
424
|
-
|
|
425
|
-
Showcase section: `#pincode`
|
|
426
|
-
|
|
427
|
-
| Prop | Type | Default | Notes |
|
|
428
|
-
|---|---|---|---|
|
|
429
|
-
| `length` | `number` | — | The number of cells. Not needed with format: it is counted from the mask |
|
|
430
|
-
| `format` | `string` | — | A mask with separators: # is a cell, the rest is a separator (#-##-## gives 0-00-00). Separators are not part of the value |
|
|
431
|
-
| `v-model` | `string` | '' | The cells glued into a string |
|
|
432
|
-
| `numbersOnly` | `boolean` | false | Digits only |
|
|
433
|
-
| `masked` | `boolean` | false | Dots instead of characters |
|
|
434
|
-
| `disabled` | `boolean` | false | Disabled |
|
|
435
|
-
| `error` | `boolean` | false | A red border. The error text is error on TaoFormField |
|
|
436
|
-
| `bordered` | `boolean` | true | The frame of the cells. false is the light style, no frame at all: a fill; the focus, an error and a result are told by a tint of the fill and the colour of the digit |
|
|
437
|
-
| `size` | `'small' \| 'medium' \| 'large'` | inherited | Cells 40×46 / 50×56 / 58×64. Without it — the size of the ancestors |
|
|
438
|
-
| `clearOn` | `'focus' \| 'input'` | 'focus' | focus — a click clears the cell and everything to the right; input — changes only on typing |
|
|
439
|
-
| `status` | `'idle' \| 'success' \| 'error'` | 'idle' | The result of the check, set by the app (on complete): error shakes the cells and paints them red, success runs a glow and paints them green; a screen reader hears it. Set idle again when the user edits; play() repeats the animation |
|
|
440
|
-
| `successText / errorText` | `string` | 'The code is correct' / 'Wrong code' | What a screen reader hears |
|
|
441
|
-
| `placeholder` | `string` | '' | The character in an empty cell |
|
|
442
|
-
|
|
443
|
-
**Slots, events, notes.** The complete event — the last cell was typed (it blurs).
|
|
444
|
-
|
|
445
|
-
## TaoProgress
|
|
446
|
-
|
|
447
|
-
Showcase section: `#slider`
|
|
448
|
-
|
|
449
|
-
| Prop | Type | Default | Notes |
|
|
450
|
-
|---|---|---|---|
|
|
451
|
-
| `progress` | `number` | 0 | The fill 0–100, not the bar width |
|
|
452
|
-
| `minWidth / maxWidth` | `number` | 200 / — | The bar width in px |
|
|
453
|
-
| `height` | `number` | 8 | The thickness in px |
|
|
454
|
-
| `showPercentage` | `boolean \| 'top' \| 'right'` | true | true/top — above the bar, right — on the right, false — hide |
|
|
455
|
-
| `animated` | `boolean` | true | Smooth filling |
|
|
456
|
-
|
|
457
|
-
**Slots, events, notes.** #left / #right — captions. If #right is present, the percentage goes on the right in brackets.
|
|
458
|
-
|
|
459
|
-
## TaoSlider
|
|
460
|
-
|
|
461
|
-
Showcase section: `#slider`
|
|
462
|
-
|
|
463
|
-
| Prop | Type | Default | Notes |
|
|
464
|
-
|---|---|---|---|
|
|
465
|
-
| `v-model` | `number` | — | The current value. Required. Two handles: TaoRangeSlider with a [from, to] pair |
|
|
466
|
-
| `min / max / step` | `number` | 0 / 100 / 1 | The range and the step |
|
|
467
|
-
| `marks` | `boolean \| (number \| { value, label? })[]` | — | Scale marks: true — automatic divisions, an array of numbers or objects with a caption. A click on a caption moves the handle |
|
|
468
|
-
| `marksSide` | `'start' \| 'end'` | 'end' | The marks side: end — under a horizontal slider and to the right of a vertical one, start — above and to the left |
|
|
469
|
-
| `discrete` | `boolean` | false | The value only on the marks (a stepped scale); the arrows follow the marks |
|
|
470
|
-
| `format` | `(value: number) => string` | — | Number text: the captions of automatic marks and the value on the bar |
|
|
471
|
-
| `flat` | `boolean` | false | No round handles: a flat bar with a fill. Keyboard and focus work |
|
|
472
|
-
| `bubble` | `boolean \| 'always'` | false | A bubble with the value beside the thumb, in the colour of its zone (the accent without zones), with a label that reads on it. Off by default. true — it shows while the thumb is dragged, hovered or has the keyboard focus; "always" — it stays. The text is format or the #bubble="{ value, zone }" slot. A screen reader does not need it (there is aria-valuetext). Leave room for it above the bar (to the right of a vertical one) |
|
|
473
|
-
| `zones` | `{ to, tone?, color?, dot?, reveal? }[]` | — | The scale in colour: each zone runs to its to (the first from min, the last to max, no gaps and no overlaps). tone is a colour role of the theme (accent, success, warning, danger, info, neutral), color is any CSS colour and wins over tone. The bar shows the zones dimmed, the filled part in full colour, the thumb takes the colour of its zone. dot: true puts a bead where a zone ends (none at max). reveal: true — the zone has no colour until the value gets there: the field looks plain and is painted as it fills (its dot shows once the fill has got to it). Colour is not a message: say the state in words |
|
|
474
|
-
| `vertical` | `boolean` | false | Vertical: the maximum on top, marks on the right. Length — --tao-slider-length (10rem) |
|
|
475
|
-
| `variant` | `'bar' \| 'thin'` | 'bar' | bar — a thick track, a form control; thin — a thin one (seek / volume). It used to be size="small" |
|
|
476
|
-
| `size` | `'small' \| 'medium' \| 'large'` | inherited | The scale of the track and the thumb (the thumb is 16 / 20 / 24). Without it — the size of the ancestors |
|
|
477
|
-
| `showValue` | `boolean` | false | The value over the bar |
|
|
478
|
-
| `disabled` | `boolean` | false | Disabled |
|
|
479
|
-
| `error` | `boolean` | false | A red outline of the track. The error text is error on TaoFormField |
|
|
480
|
-
| `wheel` | `number` | 0 | The change step for the mouse wheel (a single handle). 0 — disabled |
|
|
481
|
-
|
|
|
482
|
-
|
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
|
491
|
-
|
|
492
|
-
|
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
|
501
|
-
|
|
502
|
-
| `
|
|
503
|
-
| `
|
|
504
|
-
| `
|
|
505
|
-
| `
|
|
506
|
-
| `
|
|
507
|
-
| `
|
|
508
|
-
| `
|
|
509
|
-
| `
|
|
510
|
-
| `
|
|
511
|
-
| `
|
|
512
|
-
| `
|
|
513
|
-
|
|
|
514
|
-
|
|
|
515
|
-
|
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
|
524
|
-
|
|
525
|
-
| `
|
|
526
|
-
| `
|
|
527
|
-
| `
|
|
528
|
-
| `
|
|
529
|
-
| `
|
|
530
|
-
| `
|
|
531
|
-
| `
|
|
532
|
-
|
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
|
541
|
-
|
|
542
|
-
| `
|
|
543
|
-
| `
|
|
544
|
-
| `
|
|
545
|
-
| `
|
|
546
|
-
| `
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
|
555
|
-
|
|
556
|
-
| `
|
|
557
|
-
| `
|
|
558
|
-
| `
|
|
559
|
-
| `
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
|
568
|
-
|
|
569
|
-
| `
|
|
570
|
-
| `
|
|
571
|
-
| `
|
|
572
|
-
| `
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
|
583
|
-
|
|
584
|
-
| `
|
|
585
|
-
| `
|
|
586
|
-
| `
|
|
587
|
-
| `
|
|
588
|
-
| `
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
|
599
|
-
|
|
600
|
-
| `
|
|
601
|
-
| `
|
|
602
|
-
| `
|
|
603
|
-
| `
|
|
604
|
-
| `
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
|
615
|
-
|
|
616
|
-
| `
|
|
617
|
-
| `
|
|
618
|
-
| `
|
|
619
|
-
| `
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
|
630
|
-
|
|
631
|
-
| `
|
|
632
|
-
| `
|
|
633
|
-
| `
|
|
634
|
-
| `
|
|
635
|
-
| `
|
|
636
|
-
| `
|
|
637
|
-
| `
|
|
638
|
-
| `
|
|
639
|
-
| `
|
|
640
|
-
| `
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
|
651
|
-
|
|
652
|
-
| `
|
|
653
|
-
| `
|
|
654
|
-
| `
|
|
655
|
-
| `
|
|
656
|
-
| `
|
|
657
|
-
| `
|
|
658
|
-
| `
|
|
659
|
-
| `
|
|
660
|
-
| `
|
|
661
|
-
| `
|
|
662
|
-
| `
|
|
663
|
-
| `
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
|
674
|
-
|
|
675
|
-
| `
|
|
676
|
-
| `
|
|
677
|
-
| `
|
|
678
|
-
| `
|
|
679
|
-
| `
|
|
680
|
-
| `
|
|
681
|
-
| `
|
|
682
|
-
| `
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
|
701
|
-
|
|
702
|
-
| `
|
|
703
|
-
| `v-model:
|
|
704
|
-
| `
|
|
705
|
-
| `v-model:
|
|
706
|
-
| `
|
|
707
|
-
| `
|
|
708
|
-
| `
|
|
709
|
-
| `
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
|
720
|
-
|
|
721
|
-
| `
|
|
722
|
-
| `
|
|
723
|
-
| `
|
|
724
|
-
| `
|
|
725
|
-
| `
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
|
736
|
-
|
|
737
|
-
| `
|
|
738
|
-
| `
|
|
739
|
-
| `
|
|
740
|
-
| `
|
|
741
|
-
| `
|
|
742
|
-
| `
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
|
753
|
-
|
|
754
|
-
| `
|
|
755
|
-
| `
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
|
766
|
-
|
|
767
|
-
| `
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
|
778
|
-
|
|
779
|
-
| `
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
|
797
|
-
|
|
798
|
-
| `
|
|
799
|
-
| `
|
|
800
|
-
| `
|
|
801
|
-
| `
|
|
802
|
-
| `
|
|
803
|
-
| `
|
|
804
|
-
| `
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
|
826
|
-
|
|
827
|
-
| `
|
|
828
|
-
| `
|
|
829
|
-
| `
|
|
830
|
-
| `
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
|
839
|
-
|
|
840
|
-
| `
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
|
851
|
-
|
|
852
|
-
| `
|
|
853
|
-
| `
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
|
864
|
-
|
|
865
|
-
| `
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
|
876
|
-
|
|
877
|
-
| `
|
|
878
|
-
| `
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
|
889
|
-
|
|
890
|
-
| `
|
|
891
|
-
| `
|
|
892
|
-
| `
|
|
893
|
-
| `
|
|
894
|
-
| `
|
|
895
|
-
|
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
|
917
|
-
|
|
918
|
-
| `
|
|
919
|
-
| `
|
|
920
|
-
| `
|
|
921
|
-
| `
|
|
922
|
-
| `
|
|
923
|
-
| `
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
|
934
|
-
|
|
935
|
-
| `
|
|
936
|
-
| `
|
|
937
|
-
| `
|
|
938
|
-
| `
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
|
949
|
-
|
|
950
|
-
| `
|
|
951
|
-
| `
|
|
952
|
-
| `
|
|
953
|
-
| `
|
|
954
|
-
| `
|
|
955
|
-
| `
|
|
956
|
-
| `
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
|
967
|
-
|
|
968
|
-
|
|
|
969
|
-
|
|
|
970
|
-
| `.
|
|
971
|
-
|
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
|
991
|
-
|
|
992
|
-
| `
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
|
1003
|
-
|
|
1004
|
-
| `
|
|
1005
|
-
| `
|
|
1006
|
-
| `
|
|
1007
|
-
| `
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
|
1018
|
-
|
|
1019
|
-
| `
|
|
1020
|
-
| `
|
|
1021
|
-
| `
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
|
1032
|
-
|
|
1033
|
-
| `
|
|
1034
|
-
| `
|
|
1035
|
-
| `
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
|
1063
|
-
|
|
1064
|
-
| `
|
|
1065
|
-
| `
|
|
1066
|
-
| `
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
|
1077
|
-
|
|
1078
|
-
| `
|
|
1079
|
-
| `
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
|
1090
|
-
|
|
1091
|
-
| `
|
|
1092
|
-
| `
|
|
1093
|
-
| `
|
|
1094
|
-
|
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
|
1115
|
-
|
|
1116
|
-
| `
|
|
1117
|
-
| `
|
|
1118
|
-
| `
|
|
1119
|
-
| `
|
|
1120
|
-
| `
|
|
1121
|
-
| `
|
|
1122
|
-
| `
|
|
1123
|
-
| `
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
|
1134
|
-
|
|
1135
|
-
|
|
|
1136
|
-
| `
|
|
1137
|
-
| `
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
|
1157
|
-
|
|
1158
|
-
| `
|
|
1159
|
-
| `
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
|
1170
|
-
|
|
1171
|
-
| `
|
|
1172
|
-
| `
|
|
1173
|
-
| `
|
|
1174
|
-
| `
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
|
1186
|
-
|
|
1187
|
-
| `
|
|
1188
|
-
| `
|
|
1189
|
-
|
|
|
1190
|
-
|
|
|
1191
|
-
|
|
|
1192
|
-
|
|
|
1193
|
-
|
|
|
1194
|
-
|
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
|
1204
|
-
|
|
1205
|
-
| `
|
|
1206
|
-
| `
|
|
1207
|
-
|
|
|
1208
|
-
| `
|
|
1209
|
-
| `
|
|
1210
|
-
| `
|
|
1211
|
-
| `
|
|
1212
|
-
| `
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
|
1221
|
-
|
|
1222
|
-
| `
|
|
1223
|
-
| `
|
|
1224
|
-
| `
|
|
1225
|
-
| `
|
|
1226
|
-
| `
|
|
1227
|
-
| `
|
|
1228
|
-
|
|
1229
|
-
**Slots, events, notes.** default — the text. #
|
|
1230
|
-
|
|
1231
|
-
##
|
|
1232
|
-
|
|
1233
|
-
Showcase section: `#
|
|
1234
|
-
|
|
1235
|
-
| Prop | Type | Default | Notes |
|
|
1236
|
-
|---|---|---|---|
|
|
1237
|
-
| `
|
|
1238
|
-
| `
|
|
1239
|
-
| `
|
|
1240
|
-
| `
|
|
1241
|
-
| `
|
|
1242
|
-
| `
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
| `
|
|
1254
|
-
| `
|
|
1255
|
-
| `
|
|
1256
|
-
| `
|
|
1257
|
-
| `
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
|
1267
|
-
|
|
1268
|
-
| `
|
|
1269
|
-
| `
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
|
1279
|
-
|
|
1280
|
-
| `
|
|
1281
|
-
|
|
1282
|
-
|
|
1
|
+
# TaoUI components: props, events, slots
|
|
2
|
+
|
|
3
|
+
Generated from the showcase prop tables by `npm run skill`; do not edit by hand.
|
|
4
|
+
A default "inherited" means the value comes from a context class on an ancestor (size, density).
|
|
5
|
+
|
|
6
|
+
## TaoBlock
|
|
7
|
+
|
|
8
|
+
Showcase section: `#block`
|
|
9
|
+
|
|
10
|
+
| Prop | Type | Default | Notes |
|
|
11
|
+
|---|---|---|---|
|
|
12
|
+
| `padding` | `number \| string \| (…)[]` | 16 | Inner padding. A number is px, a string is any CSS length. An array works like CSS padding (1–4 values) |
|
|
13
|
+
| `radius` | `number \| string` | 8 | Corner radius. A number is px, a string is CSS |
|
|
14
|
+
| `shadow` | `boolean` | true | Panel shadow |
|
|
15
|
+
| `hover` | `boolean` | false | Stronger shadow on hover, pointer cursor |
|
|
16
|
+
| `surface` | `'flat' \| 'grain' \| 'glass'` | 'flat' | What the block is made of: fill / grain / glass. See “Surfaces” |
|
|
17
|
+
| `stripe` | `'top' \| 'left' \| 'bottom'` | — | A coloured stripe on one side; the corners clip it (over a picture in #media too) |
|
|
18
|
+
| `stripeTone` | `tone \| 'gradient'` | 'accent' | The stripe colour: accent, success / danger / warning / info / neutral, or the palette gradient. Say a status in the text as well |
|
|
19
|
+
|
|
20
|
+
**Slots, events, notes.** default — the block content.
|
|
21
|
+
|
|
22
|
+
## TaoButton
|
|
23
|
+
|
|
24
|
+
Showcase section: `#button`
|
|
25
|
+
|
|
26
|
+
| Prop | Type | Default | Notes |
|
|
27
|
+
|---|---|---|---|
|
|
28
|
+
| `type` | `'button' \| 'submit' \| 'reset'` | 'button' | The native button type |
|
|
29
|
+
| `variant` | `'primary' \| 'secondary' \| 'ghost' \| 'text'` | 'primary' | Shape. The colour is tone |
|
|
30
|
+
| `tone` | `'accent' \| 'neutral' \| 'success' \| 'danger' \| 'warning' \| 'info'` | 'accent' | The colour, on any variant. accent is the theme accent. neutral keeps the text strong and only the hover wash takes the theme colour: the quiet action next to a primary one |
|
|
31
|
+
| `size` | `'small' \| 'medium' \| 'large'` | inherited | Size. Without it — the size of the ancestors (the tao-size-* class or size on FormField / InputGroup), otherwise medium |
|
|
32
|
+
| `disabled` | `boolean` | false | Disabled |
|
|
33
|
+
| `loading` | `boolean` | false | A spinner, the click is swallowed |
|
|
34
|
+
| `block` | `boolean` | false | 100% width |
|
|
35
|
+
| `minWidth` | `number \| string` | — | Minimum width (number = px); the --tao-button-min-width variable |
|
|
36
|
+
| `icon` | `string` | '' | An icon before the text: a name for TaoIcon (tao-plus, your own or a font one). Without text and slot the button is a square of the control height and needs aria-label |
|
|
37
|
+
| `iconEnd` | `string` | '' | An icon after the text |
|
|
38
|
+
| `v-model:pressed` | `boolean` | — | A toggle button (Bold, a filter): aria-pressed and the tone tint while pressed. Without it the button is an ordinary one |
|
|
39
|
+
| `shortcut` | `string` | — | The key that does the same (N, Ctrl+K): shown at the end of the button, given as aria-keyshortcuts. It only shows the key; listening to it is the app's job |
|
|
40
|
+
|
|
41
|
+
**Slots, events, notes.** default — the button caption.
|
|
42
|
+
|
|
43
|
+
## .tao-prose / .tao-heading-*
|
|
44
|
+
|
|
45
|
+
Showcase section: `#typography`
|
|
46
|
+
|
|
47
|
+
| Prop | Type | Default | Notes |
|
|
48
|
+
|---|---|---|---|
|
|
49
|
+
| `--tao-text-base` | `length` | 16px | The text size and h6; the scale is counted from it |
|
|
50
|
+
| `--tao-text-ratio` | `number` | 1.25 | The step of the scale: each level up is multiplied by it (1.2 calmer, 1.333 bolder). Set it on any element and the scale under it follows |
|
|
51
|
+
| `--tao-heading-1…6` | `length` | 49 / 39 / 31 / 25 / 20 / 16 | The steps, ready for your own rules; h1 and h2 in .tao-prose shrink on a narrow screen (not below h3 / h4) |
|
|
52
|
+
| `--tao-line-height-body / -heading` | `number` | 1.6 / 1.25 | Line height of text and headings |
|
|
53
|
+
| `--tao-font-family-mono` | `font` | ui-monospace… | The code font in .tao-prose |
|
|
54
|
+
|
|
55
|
+
**Slots, events, notes.** .tao-prose on a wrapper: headings, paragraphs, lists, quotes, code, hr, links (the theme link colour), images; spacing by proximity. Every rule inside is :where(), your CSS wins. .tao-heading-1…6 — the look of a level on any tag (h2 class="tao-heading-5").
|
|
56
|
+
|
|
57
|
+
## Classes and tokens
|
|
58
|
+
|
|
59
|
+
Showcase section: `#surface`
|
|
60
|
+
|
|
61
|
+
| Prop | Type | Default | Notes |
|
|
62
|
+
|---|---|---|---|
|
|
63
|
+
| `.tao-surface-grain` | `class` | — | Static film grain. Any element |
|
|
64
|
+
| `.tao-surface-glass` | `class` | — | A translucent fill + background blur. Without blur support, or with prefers-reduced-transparency, it is solid |
|
|
65
|
+
| `--tao-surface-grain-image / -size` | `image / length` | SVG / 160px | Your own grain texture |
|
|
66
|
+
| `--tao-glass-fill / -border / -blur` | `color / color / length` | 55% / white 8% / 16px | Glass |
|
|
67
|
+
|
|
68
|
+
**Slots, events, notes.** A surface belongs to a single element: nested panels do not inherit it. Toast and confirm are glass by default: toast.defaults({ surface: 'flat' }) / confirm.defaults({ surface: 'flat' }) turn it off.
|
|
69
|
+
|
|
70
|
+
## TaoCard
|
|
71
|
+
|
|
72
|
+
Showcase section: `#card`
|
|
73
|
+
|
|
74
|
+
| Prop | Type | Default | Notes |
|
|
75
|
+
|---|---|---|---|
|
|
76
|
+
| `padding` | `number \| string \| (…)[]` | var(--tao-space-5) | Padding of the card body. A number is px, a string is CSS. With flush — 0. Published as --tao-pad |
|
|
77
|
+
| `radius` | `number \| string` | var(--tao-radius-panel) | Corner radius. A number is px, a string is CSS. Published as --tao-radius; children get --tao-radius-inner |
|
|
78
|
+
| `shadow` | `boolean` | true | The regular shadow. Off with flush |
|
|
79
|
+
| `shadowBottomOnly` | `boolean` | false | A line at the bottom of the card, not a scrim over the photo |
|
|
80
|
+
| `flush` | `boolean` | false | A tile: no padding and no shadow, cover/body fill the whole cell |
|
|
81
|
+
| `hover` | `boolean` | false | An accent outline on hover |
|
|
82
|
+
| `surface` | `'flat' \| 'grain' \| 'glass'` | 'flat' | What the card is made of: fill / grain / glass. See “Surfaces” |
|
|
83
|
+
| `stripe` | `'top' \| 'left' \| 'bottom'` | — | A coloured stripe on one side; the corners clip it (over a picture in #media too) |
|
|
84
|
+
| `stripeTone` | `tone \| 'gradient'` | 'accent' | The stripe colour: accent, success / danger / warning / info / neutral, or the palette gradient. Say a status in the text as well |
|
|
85
|
+
| `active` | `boolean` | false | The selected state |
|
|
86
|
+
| `overflow` | `boolean` | false | Do not clip the content (media / carousel) |
|
|
87
|
+
| `closable` | `boolean` | false | A close button in the top right corner; the parent removes the card on the close event |
|
|
88
|
+
| `closeLabel` | `string` | 'Close' | aria-label of the close button |
|
|
89
|
+
|
|
90
|
+
**Slots, events, notes.** default — the body. #media (a photo or a carousel on top), #overlay (a scrim over the media or the whole tile), #header (the top row: laid out as you like), #title, #sub, #footer, #corner (the top right corner: a tag, a menu button; the title leaves room for it, the width is the variable --tao-card-corner-size). The close event — the cross was pressed.
|
|
91
|
+
|
|
92
|
+
## TaoMarquee
|
|
93
|
+
|
|
94
|
+
Showcase section: `#marquee`
|
|
95
|
+
|
|
96
|
+
| Prop | Type | Default | Notes |
|
|
97
|
+
|---|---|---|---|
|
|
98
|
+
| `text` | `string` | '' | The line; or anything inline in the slot (a link, an icon, bold text) |
|
|
99
|
+
| `speed` | `number` | 40 | Speed, pixels per second |
|
|
100
|
+
| `gap` | `number` | 48 | The gap between the end of the line and its next round, px |
|
|
101
|
+
| `fade` | `number` | 22 | The width of the fading edges, px. The left fade lives in a padding outside the text: at rest the line stands where it would, but the parent needs that much room on the left (its padding, or a smaller fade; 0 for none) or the running text shows past its edge |
|
|
102
|
+
| `pauseOnHover` | `boolean` | true | Stop on hover, and a tap stops and starts it. false is for a background line: a cursor or a finger passing by does not stop it, and the running text cannot be selected. Focus still stops it, Tab reaches the line |
|
|
103
|
+
| `roundPause` | `boolean` | true | A pause at the start of every round, to read the beginning. false — the line runs without a stop, like a looped picture. Not set: a decorative line has no pause, an ordinary one has |
|
|
104
|
+
| `decorative` | `boolean` | false | The line is only decoration (a background, a design feature) with no meaning: a ghost. Hidden from a screen reader, not a tab stop, a cursor and a tap are nothing to it, the text cannot be selected, it runs without pauses. Only for text nobody needs to read. With «reduce motion» it stands still, clipped |
|
|
105
|
+
| `paused` | `boolean` | false | Stopped by the app |
|
|
106
|
+
|
|
107
|
+
**Slots, events, notes.** default — the content of the line; its copies for the second round are hidden from a screen reader and inert. It runs only when it does not fit; it stops on hover, on focus (a running line is a tab stop) and on a tap; with «reduce motion» it wraps. measure() — measure again by hand.
|
|
108
|
+
|
|
109
|
+
## TaoCopy
|
|
110
|
+
|
|
111
|
+
Showcase section: `#copy`
|
|
112
|
+
|
|
113
|
+
| Prop | Type | Default | Notes |
|
|
114
|
+
|---|---|---|---|
|
|
115
|
+
| `text` | `string` | — | The string for the clipboard. Required |
|
|
116
|
+
| `successText` | `string` | 'Copied!' | The tooltip text after the click |
|
|
117
|
+
| `copyLabel` | `string` | 'Copy' | aria-label of the button |
|
|
118
|
+
| `tip` | `boolean` | true | Show a tooltip above the button after copying |
|
|
119
|
+
|
|
120
|
+
## TaoTour
|
|
121
|
+
|
|
122
|
+
Showcase section: `#tour`
|
|
123
|
+
|
|
124
|
+
| Prop | Type | Default | Notes |
|
|
125
|
+
|---|---|---|---|
|
|
126
|
+
| `step` | `TaoTourStep \| null` | null | The step on screen; null closes the tour. A step: { id, target?, title?, text?, placement? }. target is a CSS selector, an element or a function that finds it; without it (or when nothing is found) the step is a card in the middle |
|
|
127
|
+
| `index` | `number` | 0 | The place of the step in the tour, from 0 (for the dots and "Step 2 of 5"). With TaoUX it is position, which does not count the steps that are jumped over |
|
|
128
|
+
| `count` | `number` | 0 | How many steps there are; at 1 or less there are no dots and no counter. With TaoUX it is total |
|
|
129
|
+
| `first` | `boolean` | index === 0 | No Back button |
|
|
130
|
+
| `last` | `boolean` | index === count - 1 | The button says Done instead of Next, and there is no Skip |
|
|
131
|
+
| `placement` | `TaoPlacement` | 'bottom' | Where the card stands against the target when the step does not say. It flips when it does not fit |
|
|
132
|
+
| `padding` | `number` | 6 | Space between the target and the edge of the lit window, px |
|
|
133
|
+
| `interactive` | `boolean` | false | The target can be pressed (a "press here" step); the rest of the page stays shut |
|
|
134
|
+
| `nextLabel / prevLabel / skipLabel / doneLabel` | `string` | from the locale | Button texts |
|
|
135
|
+
| `progressLabel` | `string` | 'Step {n} of {count}' | The progress text |
|
|
136
|
+
|
|
137
|
+
**Slots, events, notes.** default { step, index, count }: your own card content (instead of the title and the text). Events: next, prev, skip (the buttons, the arrows, Esc). TaoTour only draws: you keep the state, or use useTour from TaoUX (@1337exp/taoux/tour), which jumps over steps with no target and remembers that the tour was seen. The step scrolls its target into view by itself.
|
|
138
|
+
|
|
139
|
+
## TaoThemeToggle
|
|
140
|
+
|
|
141
|
+
Showcase section: `#theme-toggle`
|
|
142
|
+
|
|
143
|
+
| Prop | Type | Default | Notes |
|
|
144
|
+
|---|---|---|---|
|
|
145
|
+
| `v-model` | `'dark' \| 'light'` | page mode | The mode. Without it the button reads the mode of <html> (data-tao-mode) and follows it |
|
|
146
|
+
| `apply` | `boolean` | true | Write the mode to <html>. Turn it off to do it yourself from v-model (save the choice, change a class) |
|
|
147
|
+
| `size` | `'small' \| 'medium' \| 'large'` | from ancestors | Button size |
|
|
148
|
+
| `variant` | `'primary' \| 'secondary' \| 'ghost' \| 'text'` | 'ghost' | Button look |
|
|
149
|
+
| `toLightLabel` | `string` | 'Switch to the light theme' | aria-label while the theme is dark (what a click does) |
|
|
150
|
+
| `toDarkLabel` | `string` | 'Switch to the dark theme' | aria-label while the theme is light |
|
|
151
|
+
|
|
152
|
+
**Slots, events, notes.** icon: your own glyph, { mode, next } (the current mode and the one a click leads to); the button stays a square and keeps its label. update:modelValue and change: the new mode ("dark" \| "light"). The icon is the theme a click leads to (a sun while dark, a moon while light).
|
|
153
|
+
|
|
154
|
+
## TaoInput
|
|
155
|
+
|
|
156
|
+
Showcase section: `#input`
|
|
157
|
+
|
|
158
|
+
| Prop | Type | Default | Notes |
|
|
159
|
+
|---|---|---|---|
|
|
160
|
+
| `v-model` | `string \| number` | '' | The field value |
|
|
161
|
+
| `type` | `'text' \| 'password' \| 'email' \| 'number' \| 'tel'` | 'text' | The native input type |
|
|
162
|
+
| `placeholder` | `string` | '' | The hint inside |
|
|
163
|
+
| `size` | `'small' \| 'medium' \| 'large'` | inherited | Size, the same scale as TaoButton. Without it — the size of the ancestors (tao-size-* or size on FormField / InputGroup), otherwise medium |
|
|
164
|
+
| `disabled` | `boolean` | false | Disabled |
|
|
165
|
+
| `error` | `boolean` | false | A red border. The error text is error on TaoFormField |
|
|
166
|
+
| `variant` | `'outline' \| 'filled' \| 'plain'` | 'outline' | A frame / a fill only / nothing: plain reads as text (an item of a list being edited): no inset, the caret shows the focus, an error is a red line under the text. The height does not change |
|
|
167
|
+
| `id` | `string` | auto | The input id; otherwise taken from FormField or useId |
|
|
168
|
+
|
|
169
|
+
**Slots, events, notes.** #prefix and #suffix — inside the frame, left/right (an icon, text).
|
|
170
|
+
|
|
171
|
+
## TaoInputGroup
|
|
172
|
+
|
|
173
|
+
Showcase section: `#input`
|
|
174
|
+
|
|
175
|
+
| Prop | Type | Default | Notes |
|
|
176
|
+
|---|---|---|---|
|
|
177
|
+
| `size` | `'small' \| 'medium' \| 'large'` | inherited | The size of the whole group: addons, the field and buttons inside |
|
|
178
|
+
|
|
179
|
+
**Slots, events, notes.** default — the field itself (TaoInput etc.). #before / #after — a protocol, a unit, a button. Glues addon + field + addon into one frame.
|
|
180
|
+
|
|
181
|
+
## TaoInputNumber
|
|
182
|
+
|
|
183
|
+
Showcase section: `#input-number`
|
|
184
|
+
|
|
185
|
+
| Prop | Type | Default | Notes |
|
|
186
|
+
|---|---|---|---|
|
|
187
|
+
| `v-model` | `number \| null` | null | A number. An empty field is null, not 0 and not a string |
|
|
188
|
+
| `min / max` | `number` | — | The bounds. If not set — no limit |
|
|
189
|
+
| `step` | `number` | 1 | The step of ± and the arrows |
|
|
190
|
+
| `precision` | `number` | — | Digits after the decimal point |
|
|
191
|
+
| `@commit` | `number \| null` | — | Edit finished: blur, Enter, ±, arrow key (once per action; v-model fires per keystroke). |
|
|
192
|
+
| `controls` | `boolean` | true | ± buttons on the right |
|
|
193
|
+
| `size` | `'small' \| 'medium' \| 'large'` | inherited | Size, the same scale as TaoButton. Without it — the size of the ancestors (tao-size-* or size on FormField / InputGroup), otherwise medium |
|
|
194
|
+
| `disabled` | `boolean` | false | Disabled |
|
|
195
|
+
| `error` | `boolean` | false | A red border. The error text is error on TaoFormField |
|
|
196
|
+
| `variant` | `'outline' \| 'filled' \| 'plain'` | 'outline' | As on TaoInput: a frame / a fill only / nothing (the field reads as text, an error is a red line under the text) |
|
|
197
|
+
| `placeholder` | `string` | '' | The hint when null |
|
|
198
|
+
|
|
199
|
+
## TaoQuantity
|
|
200
|
+
|
|
201
|
+
Showcase section: `#quantity`
|
|
202
|
+
|
|
203
|
+
| Prop | Type | Default | Notes |
|
|
204
|
+
|---|---|---|---|
|
|
205
|
+
| `v-model` | `number` | 1 | A whole quantity. Never empty |
|
|
206
|
+
| `min` | `number` | 1 | The lower bound |
|
|
207
|
+
| `max` | `number` | — | Stock. If not set — no ceiling |
|
|
208
|
+
| `allowRemove` | `boolean` | true | The minus at min stays alive and fires dec — the parent may remove the row |
|
|
209
|
+
| `forceMaxLimit` | `boolean` | true | Clamp the input to max on blur and when more than the stock arrives |
|
|
210
|
+
| `size` | `'small' \| 'medium' \| 'large'` | inherited | Size, the same scale as TaoButton. Without it — the size of the ancestors (tao-size-* or size on FormField / InputGroup), otherwise medium |
|
|
211
|
+
| `disabled` | `boolean` | false | Disabled |
|
|
212
|
+
| `error` | `boolean` | false | A red border. The error text is error on TaoFormField |
|
|
213
|
+
|
|
214
|
+
**Slots, events, notes.** #decrement-icon / #increment-icon — the button icons.
|
|
215
|
+
|
|
216
|
+
## TaoTextarea
|
|
217
|
+
|
|
218
|
+
Showcase section: `#textarea`
|
|
219
|
+
|
|
220
|
+
| Prop | Type | Default | Notes |
|
|
221
|
+
|---|---|---|---|
|
|
222
|
+
| `v-model` | `string` | '' | Text |
|
|
223
|
+
| `placeholder` | `string` | '' | Hint |
|
|
224
|
+
| `rows` | `number` | 3 | The initial height |
|
|
225
|
+
| `maxHeight` | `number \| string` | 500 | How tall the field grows with its text before it scrolls: a number is px, a string any CSS length (50vh), none — no limit. Dragging the corner stops there too |
|
|
226
|
+
| `maxlength` | `number` | — | Cuts the input |
|
|
227
|
+
| `count` | `boolean` | false | Show “typed / maximum” (together with maxlength) |
|
|
228
|
+
| `resize` | `boolean` | true | Can be dragged by the corner |
|
|
229
|
+
| `variant` | `'bar' \| 'outline' \| 'filled' \| 'plain'` | 'bar' | A stripe on the left / a frame like TaoInput / a fill only / nothing |
|
|
230
|
+
| `readonly` | `boolean` | false | Can be read and selected, but not edited |
|
|
231
|
+
| `noSpace` | `boolean` | false | A space cannot be typed — neither from the keyboard nor by pasting |
|
|
232
|
+
| `align` | `'start' \| 'center' \| 'end'` | 'start' | Text alignment |
|
|
233
|
+
| `autofocus` | `boolean` | false | Focus on mount |
|
|
234
|
+
| `blurOnEnter` | `boolean` | false | Enter drops the focus instead of inserting a line break (Shift+Enter inserts it); keydown goes out first |
|
|
235
|
+
| `size` | `'small' \| 'medium' \| 'large'` | inherited | Size, the same scale as TaoButton. Without it — the size of the ancestors (tao-size-* or size on FormField / InputGroup), otherwise medium |
|
|
236
|
+
| `disabled` | `boolean` | false | Disabled |
|
|
237
|
+
| `error` | `boolean` | false | A red border |
|
|
238
|
+
|
|
239
|
+
## TaoChecklist
|
|
240
|
+
|
|
241
|
+
Showcase section: `#checklist`
|
|
242
|
+
|
|
243
|
+
| Prop | Type | Default | Notes |
|
|
244
|
+
|---|---|---|---|
|
|
245
|
+
| `items` | `TaoChecklistItem[]` | — | { value, label, description?, disabled? } |
|
|
246
|
+
| `v-model` | `(string \| number)[]` | [] | The checked values, in the order of the items |
|
|
247
|
+
| `legend` | `string` | — | The group caption (legend). In a TaoFormField the field gives it |
|
|
248
|
+
| `selectAll` | `boolean` | false | «Select all» on top: mixed when some are checked; toggles every enabled item |
|
|
249
|
+
| `counter` | `boolean` | false | «3 of 5» next to the caption, announced politely |
|
|
250
|
+
| `strike` | `boolean` | false | Strike the checked items through (a to-do list). A look only: the checkbox tells the state |
|
|
251
|
+
| `disabled` | `boolean` | false | The whole group is disabled |
|
|
252
|
+
| `error` | `boolean` | false | Red frames; the message goes to error of TaoFormField |
|
|
253
|
+
| `size` | `'small' \| 'medium' \| 'large'` | inherited | Size of the checkboxes |
|
|
254
|
+
| `selectAllLabel` | `string` | 'Select all' | The «Select all» label |
|
|
255
|
+
| `counterText` | `string` | '{checked} of {total}' | The counter text |
|
|
256
|
+
|
|
257
|
+
**Slots, events, notes.** #item — { item, checked }: your own item text. Events update:modelValue, change. «Select all» leaves a disabled item alone. A fieldset: in a TaoFormField the group takes the id, the label and the error of the field, the checkboxes inside keep ids of their own.
|
|
258
|
+
|
|
259
|
+
## TaoCheckbox
|
|
260
|
+
|
|
261
|
+
Showcase section: `#checkbox`
|
|
262
|
+
|
|
263
|
+
| Prop | Type | Default | Notes |
|
|
264
|
+
|---|---|---|---|
|
|
265
|
+
| `v-model` | `boolean` | — | Checked / not |
|
|
266
|
+
| `checked` | `boolean` | — | The state without v-model |
|
|
267
|
+
| `label` | `string` | '' | The caption on the right |
|
|
268
|
+
| `indeterminate` | `boolean` | false | A dash instead of the tick. A click sets checked, the parent works out the mixed state |
|
|
269
|
+
| `disabled` | `boolean` | false | Disabled |
|
|
270
|
+
| `size` | `'small' \| 'medium' \| 'large'` | inherited | A 14 / 18 / 22 square and the caption font size. Without it — the size of the ancestors |
|
|
271
|
+
| `error` | `boolean` | false | A red accent. The error text goes through TaoFormField |
|
|
272
|
+
|
|
273
|
+
## TaoSelect
|
|
274
|
+
|
|
275
|
+
Showcase section: `#select`
|
|
276
|
+
|
|
277
|
+
| Prop | Type | Default | Notes |
|
|
278
|
+
|---|---|---|---|
|
|
279
|
+
| `v-model` | `string \| number \| null` | null | value of the selected option. Clearing → null |
|
|
280
|
+
| `options` | `TaoSelectOption[]` | [] | { value, label, disabled? } |
|
|
281
|
+
| `placeholder` | `string` | 'Choose' | When the model is null |
|
|
282
|
+
| `disabled` | `boolean` | false | Disabled |
|
|
283
|
+
| `error` | `boolean` | false | A red border |
|
|
284
|
+
| `size` | `'small' \| 'medium' \| 'large'` | inherited | Size, as TaoButton; also scales the opened list. Without it — the size of the ancestors |
|
|
285
|
+
| `clearable` | `boolean` | true | Clear row and Delete / Backspace. Turn off when null is not valid. |
|
|
286
|
+
| `clearText` | `string` | 'Clear' | Label of the clear row. |
|
|
287
|
+
|
|
288
|
+
**Slots, events, notes.** #clear: content of the clear row (icon, markup), replaces clearText. #chevron: custom arrow.
|
|
289
|
+
|
|
290
|
+
## TaoSwitch
|
|
291
|
+
|
|
292
|
+
Showcase section: `#select`
|
|
293
|
+
|
|
294
|
+
| Prop | Type | Default | Notes |
|
|
295
|
+
|---|---|---|---|
|
|
296
|
+
| `v-model` | `boolean` | false | On / off. role="switch" |
|
|
297
|
+
| `label` | `string` | '' | The caption on the right |
|
|
298
|
+
| `disabled` | `boolean` | false | Disabled |
|
|
299
|
+
| `size` | `'small' \| 'medium' \| 'large'` | inherited | The track is 28 / 36 / 44 px wide, and the caption font size. Without it — the size of the ancestors |
|
|
300
|
+
| `error` | `boolean` | false | A red border. The error text is error on TaoFormField |
|
|
301
|
+
| `loading` | `boolean` | false | The change is being applied: a spinner on the thumb, a click does nothing, not greyed out; aria-busy |
|
|
302
|
+
|
|
303
|
+
## TaoRadio / TaoRadioGroup
|
|
304
|
+
|
|
305
|
+
Showcase section: `#select`
|
|
306
|
+
|
|
307
|
+
| Prop | Type | Default | Notes |
|
|
308
|
+
|---|---|---|---|
|
|
309
|
+
| `value` | `string \| number \| boolean` | — | Radio: the value of this point. Required |
|
|
310
|
+
| `v-model` | `the same` | — | Group holds the selection. A Radio without a group holds its own |
|
|
311
|
+
| `legend` | `string` | — | Group: the group caption |
|
|
312
|
+
| `direction` | `'row' \| 'column'` | 'row' | Group: in a row or in a column |
|
|
313
|
+
| `disabled` | `boolean` | false | A single point or the whole group |
|
|
314
|
+
| `error` | `boolean` | false | A red border. The error text is error on TaoFormField |
|
|
315
|
+
| `size` | `'small' \| 'medium' \| 'large'` | inherited | A 14 / 18 / 22 circle and the caption font size. On a group — for all the radios inside |
|
|
316
|
+
| `label / name` | `string` | '' | Radio: the caption and name, if there is no group |
|
|
317
|
+
|
|
318
|
+
## TaoFormField
|
|
319
|
+
|
|
320
|
+
Showcase section: `#select`
|
|
321
|
+
|
|
322
|
+
| Prop | Type | Default | Notes |
|
|
323
|
+
|---|---|---|---|
|
|
324
|
+
| `label` | `string` | — | A shared caption above the control |
|
|
325
|
+
| `hint` | `string` | — | A hint under the field |
|
|
326
|
+
| `error` | `string` | — | The error text; if present, the field is invalid |
|
|
327
|
+
| `size` | `'small' \| 'medium' \| 'large'` | inherited | The size of the control inside |
|
|
328
|
+
|
|
329
|
+
**Slots, events, notes.** default — the control itself (Input, Select, Switch…).
|
|
330
|
+
|
|
331
|
+
## TaoSegmented
|
|
332
|
+
|
|
333
|
+
Showcase section: `#segmented`
|
|
334
|
+
|
|
335
|
+
| Prop | Type | Default | Notes |
|
|
336
|
+
|---|---|---|---|
|
|
337
|
+
| `v-model` | `string \| number \| boolean` | — | value of the selected option |
|
|
338
|
+
| `size` | `'small' \| 'medium' \| 'large'` | inherited | The segment height, the same scale as TaoButton. Without it — the size of the ancestors |
|
|
339
|
+
| `block` | `boolean` | false | Stretch to the parent width |
|
|
340
|
+
| `minWidth` | `number \| string` | — | Minimum width of every option (number = px); the --tao-segmented-option-min-width variable |
|
|
341
|
+
| `legend` | `string` | — | The accessible name of the group |
|
|
342
|
+
| `disabled` | `boolean` | false | The whole group |
|
|
343
|
+
| `error` | `boolean` | false | A red border. The error text is error on TaoFormField |
|
|
344
|
+
| `name` | `string` | auto | name for the radio inputs inside |
|
|
345
|
+
|
|
346
|
+
**Slots, events, notes.** default — a set of TaoSegmentedOption.
|
|
347
|
+
|
|
348
|
+
## TaoSegmentedOption
|
|
349
|
+
|
|
350
|
+
Showcase section: `#segmented`
|
|
351
|
+
|
|
352
|
+
| Prop | Type | Default | Notes |
|
|
353
|
+
|---|---|---|---|
|
|
354
|
+
| `value` | `string \| number \| boolean` | — | The option value. Required |
|
|
355
|
+
| `label` | `string` | '' | The text. Or the default slot |
|
|
356
|
+
| `icon` | `string` | '' | A TaoIcon name on the left |
|
|
357
|
+
| `count` | `number \| string` | — | A number on the right (a badge) |
|
|
358
|
+
| `disabled` | `boolean` | false | This option |
|
|
359
|
+
|
|
360
|
+
## TaoCombobox
|
|
361
|
+
|
|
362
|
+
Showcase section: `#combobox`
|
|
363
|
+
|
|
364
|
+
| Prop | Type | Default | Notes |
|
|
365
|
+
|---|---|---|---|
|
|
366
|
+
| `v-model` | `string \| number \| null` | null | value of an option, or an arbitrary string with allow-create |
|
|
367
|
+
| `options` | `TaoSelectOption[]` | [] | { value, label, disabled? }. The list is not mutated by the component |
|
|
368
|
+
| `placeholder` | `string` | 'Start typing' | The empty field |
|
|
369
|
+
| `allowCreate` | `boolean` | false | A value that is not in the list can be kept |
|
|
370
|
+
| `emptyText` | `string` | 'Nothing found' | An empty filter |
|
|
371
|
+
| `size` | `'small' \| 'medium' \| 'large'` | inherited | Size, as TaoButton and TaoSelect; also scales the opened list. Without it — the size of the ancestors |
|
|
372
|
+
| `clearable` | `boolean` | true | Clear row in the list. Turn off when null is not valid. |
|
|
373
|
+
| `clearText` | `string` | 'Clear' | Label of the clear row; slot #clear replaces it. |
|
|
374
|
+
| `disabled / error` | `boolean` | false | Disabled / a red border |
|
|
375
|
+
| `variant` | `'outline' \| 'filled' \| 'plain'` | 'outline' | As on TaoInput: a frame / a fill only / nothing (the field reads as text, an error is a red line under the text) |
|
|
376
|
+
|
|
377
|
+
**Slots, events, notes.** create — an event when a new value is typed: the parent extends options itself.
|
|
378
|
+
|
|
379
|
+
## TypeaheadPlayground
|
|
380
|
+
|
|
381
|
+
Showcase section: `#typeahead`
|
|
382
|
+
|
|
383
|
+
| Prop | Type | Default | Notes |
|
|
384
|
+
|---|---|---|---|
|
|
385
|
+
| `v-model` | `object \| null` | null | The selected hit { id, name, city, role } or null |
|
|
386
|
+
|
|
387
|
+
**Slots, events, notes.** #item="{ hit, active }" — a list row. #empty — nothing found. Not part of the npm package, lives in showcase/demo.
|
|
388
|
+
|
|
389
|
+
## TaoDate
|
|
390
|
+
|
|
391
|
+
Showcase section: `#date`
|
|
392
|
+
|
|
393
|
+
| Prop | Type | Default | Notes |
|
|
394
|
+
|---|---|---|---|
|
|
395
|
+
| `v-model` | `string \| null` | null | A single day YYYY-MM-DD, with no time and no time zone |
|
|
396
|
+
| `min / max` | `string` | — | The bounds in the same format |
|
|
397
|
+
| `placeholder` | `string` | 'Date' | The empty field |
|
|
398
|
+
| `locale` | `string` | the app locale | The calendar captions and the order of day and month; without it the language of setTaoLocale |
|
|
399
|
+
| `editable` | `boolean` | false | A text field you type the date into, the calendar on the button next to it or ↓. In the locale's order of day and month: 5 is the 5th of this month, 5.3 the 5th of March (3/5 in en-US), 05.03.26, 0503, ISO. Enter or leaving the field applies it; a text that is not a date or is outside min / max puts the value back; Esc drops the typing; an empty field is null |
|
|
400
|
+
| `parse / format` | `(text, { locale, reference }) => string \| null / (iso, locale) => string` | — | Your own reading of the typed text («tomorrow») and your own text in the field; reference is the current value or today |
|
|
401
|
+
| `size` | `'small' \| 'medium' \| 'large'` | inherited | Size, the same scale as TaoButton. Without it — the size of the ancestors (tao-size-* or size on FormField / InputGroup), otherwise medium |
|
|
402
|
+
| `disabled / error` | `boolean` | false | Disabled / a red border |
|
|
403
|
+
| `todayText / clearText` | `string` | 'Today' / 'Clear' | The buttons at the bottom of the popup |
|
|
404
|
+
| `calendarLabel` | `string` | 'Choose a date' | aria-label of the calendar button of an editable field |
|
|
405
|
+
|
|
406
|
+
**Slots, events, notes.** #icon, #prev-icon, #next-icon — the icons of the field and of the month arrows.
|
|
407
|
+
|
|
408
|
+
## TaoDateRange
|
|
409
|
+
|
|
410
|
+
Showcase section: `#date`
|
|
411
|
+
|
|
412
|
+
| Prop | Type | Default | Notes |
|
|
413
|
+
|---|---|---|---|
|
|
414
|
+
| `v-model` | `{ start, end } \| null` | null | A period YYYY-MM-DD. An incomplete choice is not written to the model |
|
|
415
|
+
| `min / max` | `string` | — | The bounds |
|
|
416
|
+
| `placeholder` | `string` | 'Period' | While null |
|
|
417
|
+
| `locale` | `string` | the app locale | The calendar captions; without it the language of setTaoLocale |
|
|
418
|
+
| `size` | `'small' \| 'medium' \| 'large'` | inherited | Size, the same scale as TaoButton. Without it — the size of the ancestors (tao-size-* or size on FormField / InputGroup), otherwise medium |
|
|
419
|
+
| `disabled / error` | `boolean` | false | Disabled / a red border |
|
|
420
|
+
|
|
421
|
+
**Slots, events, notes.** The first click is start, the second is end (they swap if end is earlier).
|
|
422
|
+
|
|
423
|
+
## TaoPinCode
|
|
424
|
+
|
|
425
|
+
Showcase section: `#pincode`
|
|
426
|
+
|
|
427
|
+
| Prop | Type | Default | Notes |
|
|
428
|
+
|---|---|---|---|
|
|
429
|
+
| `length` | `number` | — | The number of cells. Not needed with format: it is counted from the mask |
|
|
430
|
+
| `format` | `string` | — | A mask with separators: # is a cell, the rest is a separator (#-##-## gives 0-00-00). Separators are not part of the value |
|
|
431
|
+
| `v-model` | `string` | '' | The cells glued into a string |
|
|
432
|
+
| `numbersOnly` | `boolean` | false | Digits only |
|
|
433
|
+
| `masked` | `boolean` | false | Dots instead of characters |
|
|
434
|
+
| `disabled` | `boolean` | false | Disabled |
|
|
435
|
+
| `error` | `boolean` | false | A red border. The error text is error on TaoFormField |
|
|
436
|
+
| `bordered` | `boolean` | true | The frame of the cells. false is the light style, no frame at all: a fill; the focus, an error and a result are told by a tint of the fill and the colour of the digit |
|
|
437
|
+
| `size` | `'small' \| 'medium' \| 'large'` | inherited | Cells 40×46 / 50×56 / 58×64. Without it — the size of the ancestors |
|
|
438
|
+
| `clearOn` | `'focus' \| 'input'` | 'focus' | focus — a click clears the cell and everything to the right; input — changes only on typing |
|
|
439
|
+
| `status` | `'idle' \| 'success' \| 'error'` | 'idle' | The result of the check, set by the app (on complete): error shakes the cells and paints them red, success runs a glow and paints them green; a screen reader hears it. Set idle again when the user edits; play() repeats the animation |
|
|
440
|
+
| `successText / errorText` | `string` | 'The code is correct' / 'Wrong code' | What a screen reader hears |
|
|
441
|
+
| `placeholder` | `string` | '' | The character in an empty cell |
|
|
442
|
+
|
|
443
|
+
**Slots, events, notes.** The complete event — the last cell was typed (it blurs).
|
|
444
|
+
|
|
445
|
+
## TaoProgress
|
|
446
|
+
|
|
447
|
+
Showcase section: `#slider`
|
|
448
|
+
|
|
449
|
+
| Prop | Type | Default | Notes |
|
|
450
|
+
|---|---|---|---|
|
|
451
|
+
| `progress` | `number` | 0 | The fill 0–100, not the bar width |
|
|
452
|
+
| `minWidth / maxWidth` | `number` | 200 / — | The bar width in px |
|
|
453
|
+
| `height` | `number` | 8 | The thickness in px |
|
|
454
|
+
| `showPercentage` | `boolean \| 'top' \| 'right'` | true | true/top — above the bar, right — on the right, false — hide |
|
|
455
|
+
| `animated` | `boolean` | true | Smooth filling |
|
|
456
|
+
|
|
457
|
+
**Slots, events, notes.** #left / #right — captions. If #right is present, the percentage goes on the right in brackets.
|
|
458
|
+
|
|
459
|
+
## TaoSlider
|
|
460
|
+
|
|
461
|
+
Showcase section: `#slider`
|
|
462
|
+
|
|
463
|
+
| Prop | Type | Default | Notes |
|
|
464
|
+
|---|---|---|---|
|
|
465
|
+
| `v-model` | `number` | — | The current value. Required. Two handles: TaoRangeSlider with a [from, to] pair |
|
|
466
|
+
| `min / max / step` | `number` | 0 / 100 / 1 | The range and the step |
|
|
467
|
+
| `marks` | `boolean \| (number \| { value, label? })[]` | — | Scale marks: true — automatic divisions, an array of numbers or objects with a caption. A click on a caption moves the handle |
|
|
468
|
+
| `marksSide` | `'start' \| 'end'` | 'end' | The marks side: end — under a horizontal slider and to the right of a vertical one, start — above and to the left |
|
|
469
|
+
| `discrete` | `boolean` | false | The value only on the marks (a stepped scale); the arrows follow the marks |
|
|
470
|
+
| `format` | `(value: number) => string` | — | Number text: the captions of automatic marks and the value on the bar |
|
|
471
|
+
| `flat` | `boolean` | false | No round handles: a flat bar with a fill. Keyboard and focus work |
|
|
472
|
+
| `bubble` | `boolean \| 'always'` | false | A bubble with the value beside the thumb, in the colour of its zone (the accent without zones), with a label that reads on it. Off by default. true — it shows while the thumb is dragged, hovered or has the keyboard focus; "always" — it stays. The text is format or the #bubble="{ value, zone }" slot. A screen reader does not need it (there is aria-valuetext). Leave room for it above the bar (to the right of a vertical one) |
|
|
473
|
+
| `zones` | `{ to, tone?, color?, dot?, reveal? }[]` | — | The scale in colour: each zone runs to its to (the first from min, the last to max, no gaps and no overlaps). tone is a colour role of the theme (accent, success, warning, danger, info, neutral), color is any CSS colour and wins over tone. The bar shows the zones dimmed, the filled part in full colour, the thumb takes the colour of its zone. dot: true puts a bead where a zone ends (none at max). reveal: true — the zone has no colour until the value gets there: the field looks plain and is painted as it fills (its dot shows once the fill has got to it). Colour is not a message: say the state in words |
|
|
474
|
+
| `vertical` | `boolean` | false | Vertical: the maximum on top, marks on the right. Length — --tao-slider-length (10rem) |
|
|
475
|
+
| `variant` | `'bar' \| 'thin'` | 'bar' | bar — a thick track, a form control; thin — a thin one (seek / volume). It used to be size="small" |
|
|
476
|
+
| `size` | `'small' \| 'medium' \| 'large'` | inherited | The scale of the track and the thumb (the thumb is 16 / 20 / 24). Without it — the size of the ancestors |
|
|
477
|
+
| `showValue` | `boolean` | false | The value over the bar |
|
|
478
|
+
| `disabled` | `boolean` | false | Disabled |
|
|
479
|
+
| `error` | `boolean` | false | A red outline of the track. The error text is error on TaoFormField |
|
|
480
|
+
| `wheel` | `number` | 0 | The change step for the mouse wheel (a single handle). 0 — disabled |
|
|
481
|
+
| `editable` | `boolean` | false | The value can be typed: a right click or a double click on the bar, or Enter / F2 on a handle, opens a field over the bar (for a range, for the nearest or the focused handle). Enter or leaving the field sets the value, snapped to the step (or to a mark with discrete) and kept in range; Esc drops the edit |
|
|
482
|
+
| `editLabel` | `string` | from the locale | The accessible name of the field of editable (slider.editLabel, "Value") |
|
|
483
|
+
| `@change` | `value` | — | Finished changing: released, a key, the wheel, a click on a mark. v-model fires on every move |
|
|
484
|
+
| `#mark` | `{ mark, active }` | — | A custom mark caption |
|
|
485
|
+
|
|
486
|
+
## TaoRangeSlider
|
|
487
|
+
|
|
488
|
+
Showcase section: `#slider`
|
|
489
|
+
|
|
490
|
+
| Prop | Type | Default | Notes |
|
|
491
|
+
|---|---|---|---|
|
|
492
|
+
| `v-model` | `[number, number]` | — | A [from, to] pair. Required |
|
|
493
|
+
| `minGap` | `number` | 0 | The smallest distance between the handles; the handles do not jump over each other |
|
|
494
|
+
| `…` | `` | | The rest as in TaoSlider: min / max / step, marks, discrete, format, vertical, variant, size, showValue, disabled, error |
|
|
495
|
+
|
|
496
|
+
## TaoScrubber
|
|
497
|
+
|
|
498
|
+
Showcase section: `#slider`
|
|
499
|
+
|
|
500
|
+
| Prop | Type | Default | Notes |
|
|
501
|
+
|---|---|---|---|
|
|
502
|
+
| `v-model` | `number` | — | The current time. Required |
|
|
503
|
+
| `v-model:playing` | `boolean` | false | Whether playback is running (the look of the button). The component does not keep time itself |
|
|
504
|
+
| `length` | `number` | — | The length; the slider goes from 0 to it. Required |
|
|
505
|
+
| `step` | `number` | 0.01 | The slider step |
|
|
506
|
+
| `marks` | `(number \| { value, label? })[]` | — | Event marks on the scale |
|
|
507
|
+
| `marksSide` | `'start' \| 'end'` | 'end' | The marks above the slider or below it |
|
|
508
|
+
| `format` | `(time: number) => string` | toFixed(2) | The time text in the marks and the caption |
|
|
509
|
+
| `pauseOnScrub` | `boolean` | true | Pause while the user holds the slider |
|
|
510
|
+
| `showRestart / showTime` | `boolean` | true | The “to the start” button; the “time / length” caption |
|
|
511
|
+
| `variant` | `'bar' \| 'thin'` | 'thin' | The track thickness |
|
|
512
|
+
| `size` | `'small' \| 'medium' \| 'large'` | inherited | Size; without it — the size of the ancestors |
|
|
513
|
+
| `disabled` | `boolean` | false | Disabled |
|
|
514
|
+
| `playLabel / pauseLabel / restartLabel` | `string` | from the locale | Button captions for screen readers |
|
|
515
|
+
| `@restart` | `—` | — | The “to the start” button (the time is already set to 0) |
|
|
516
|
+
| `@seek` | `time` | — | Finished seeking: the slider was released or a key was pressed |
|
|
517
|
+
| `#mark / #time` | `{ mark, active } / { time, length, text }` | — | A custom mark caption; a custom time caption |
|
|
518
|
+
|
|
519
|
+
## TaoColorPicker
|
|
520
|
+
|
|
521
|
+
Showcase section: `#color`
|
|
522
|
+
|
|
523
|
+
| Prop | Type | Default | Notes |
|
|
524
|
+
|---|---|---|---|
|
|
525
|
+
| `v-model` | `string` | — | The colour as a hex string: #rrggbb, with alpha also #rrggbbaa. rgb()/rgba() is accepted on input too. Required |
|
|
526
|
+
| `alpha` | `boolean` | false | The opacity bar and #rrggbbaa |
|
|
527
|
+
| `swatches` | `string[]` | — | Ready colours under the palette; the selected one is marked |
|
|
528
|
+
| `modes` | `('hex' \| 'rgb' \| 'hsl')[]` | ['hex', 'rgb', 'hsl'] | Colour input modes; a single mode hides the switch |
|
|
529
|
+
| `v-model:mode` | `'hex' \| 'rgb' \| 'hsl'` | the first of modes | The current input mode; v-model:mode remembers the choice between openings |
|
|
530
|
+
| `eyedropper` | `boolean` | true | An eyedropper (only where the browser supports EyeDropper) |
|
|
531
|
+
| `disabled` | `boolean` | false | Disabled |
|
|
532
|
+
| `size` | `'small' \| 'medium' \| 'large'` | inherited | The field size; without it — the size of the ancestors |
|
|
533
|
+
| `areaLabel / hueLabel / alphaLabel / hexLabel / swatchesLabel / eyedropperLabel` | `string` | from the locale | Captions for screen readers (the colorPicker locale) |
|
|
534
|
+
| `@change` | `hex` | — | Finished editing: the square or a bar was released, a key, the hex field, a swatch. v-model fires on every move |
|
|
535
|
+
|
|
536
|
+
## TaoColorInput
|
|
537
|
+
|
|
538
|
+
Showcase section: `#color`
|
|
539
|
+
|
|
540
|
+
| Prop | Type | Default | Notes |
|
|
541
|
+
|---|---|---|---|
|
|
542
|
+
| `v-model` | `string` | — | The colour as a hex string. Required |
|
|
543
|
+
| `alpha / swatches / modes / v-model:mode / eyedropper / size` | `` | | As in TaoColorPicker |
|
|
544
|
+
| `clearable` | `boolean` | false | The colour can be taken away again: a Clear button under the palette and Delete / Backspace on the field; gives "" (the field then says Not set) |
|
|
545
|
+
| `placeholder` | `string` | 'Not set' | What the field says while the value is empty (""): an optional colour that is not set; the swatch is crossed out |
|
|
546
|
+
| `placement` | `TaoPlacement` | 'bottom-start' | Side and alignment: top / bottom / left / right and -start / -end. Flips at the screen edge |
|
|
547
|
+
| `error` | `boolean` | false | A red border. The error text is error on TaoFormField |
|
|
548
|
+
| `disabled` | `boolean` | false | Disabled |
|
|
549
|
+
|
|
550
|
+
## colorModel(source, options)
|
|
551
|
+
|
|
552
|
+
Showcase section: `#color`
|
|
553
|
+
|
|
554
|
+
| Prop | Type | Default | Notes |
|
|
555
|
+
|---|---|---|---|
|
|
556
|
+
| `source` | `Ref<T>` | — | Your colour storage. Returns a writable hex string for v-model |
|
|
557
|
+
| `format` | `'object' \| 'array' \| 'css'` | 'object' | { r, g, b, a }, [r, g, b, a] or an rgb(r g b / a) string |
|
|
558
|
+
| `range` | `255 \| 1` | 255 | The range of r, g, b; opacity is always 0…1 |
|
|
559
|
+
| `space` | `'srgb' \| 'linear'` | 'srgb' | The space of r, g, b; linear only with range: 1 (rendering, the TaoFX gradient) |
|
|
560
|
+
| `alpha` | `boolean` | false | Store opacity; without it a hex #rrggbb |
|
|
561
|
+
| `precision` | `number` | 5 | Digits of fractional values (range 1); for a linear colour fewer give steps in the dark |
|
|
562
|
+
|
|
563
|
+
## TaoFileDrop
|
|
564
|
+
|
|
565
|
+
Showcase section: `#filedrop`
|
|
566
|
+
|
|
567
|
+
| Prop | Type | Default | Notes |
|
|
568
|
+
|---|---|---|---|
|
|
569
|
+
| `v-model` | `File[]` | [] | The list of files. The component does not accumulate it — only what the parent gave |
|
|
570
|
+
| `multiple` | `boolean` | false | Several files |
|
|
571
|
+
| `accept` | `string` | '*' | As in <input type="file"> |
|
|
572
|
+
| `size` | `'small' \| 'medium' \| 'large'` | inherited | The height of the zone and of the file rows. Without it — the size of the ancestors |
|
|
573
|
+
| `list` | `boolean` | true | Names under the zone. Removing a file goes straight to v-model |
|
|
574
|
+
| `showClear` | `boolean` | false | The “clear all” button. It does not clear by itself — it fires clear-request |
|
|
575
|
+
|
|
576
|
+
**Slots, events, notes.** default — the zone text. The change event — files were added or removed. reject — the files that did not pass accept (File[]): they are not in v-model, tell the user why. clear-request: the parent decides whether to reset at once or after confirm().
|
|
577
|
+
|
|
578
|
+
## TaoSparkline
|
|
579
|
+
|
|
580
|
+
Showcase section: `#charts`
|
|
581
|
+
|
|
582
|
+
| Prop | Type | Default | Notes |
|
|
583
|
+
|---|---|---|---|
|
|
584
|
+
| `values` | `(number \| null)[]` | — | The series; null is a gap that splits the line |
|
|
585
|
+
| `label` | `string` | — | What it shows, for a screen reader («Visits, 12 weeks, growing»). Without it the line is decoration (aria-hidden) |
|
|
586
|
+
| `tone` | `'accent' \| 'neutral' \| 'success' \| 'danger' \| 'warning' \| 'info'` | 'accent' | The colour |
|
|
587
|
+
| `area` | `boolean` | false | A soft fill under the line |
|
|
588
|
+
| `dot` | `boolean` | false | A dot on the last value |
|
|
589
|
+
| `min / max` | `number` | the data | A fixed range (values outside are clamped): to compare several sparklines |
|
|
590
|
+
| `height` | `number \| string` | 32 | Height (number = px). The width is the width of the container |
|
|
591
|
+
|
|
592
|
+
**Slots, events, notes.** A trend without axes or a tooltip: for a card, a table cell, a line of text.
|
|
593
|
+
|
|
594
|
+
## TaoMeter
|
|
595
|
+
|
|
596
|
+
Showcase section: `#charts`
|
|
597
|
+
|
|
598
|
+
| Prop | Type | Default | Notes |
|
|
599
|
+
|---|---|---|---|
|
|
600
|
+
| `value` | `number` | — | The measured value |
|
|
601
|
+
| `min / max` | `number` | 0 / 100 | The range |
|
|
602
|
+
| `low / high` | `number` | — | The bounds of the low and the high region. Without them the meter is the accent colour |
|
|
603
|
+
| `optimum` | `number` | the middle | The best value. Its region is success, the next one warning, the far one danger, as the HTML <meter>: optimum 0 for disk space used, max for a battery |
|
|
604
|
+
| `label` | `string` | — | Shown above the bar, the accessible name |
|
|
605
|
+
| `valueText` | `string \| boolean` | false | The value right of the label: true is the number, a string your own text (read as aria-valuetext) |
|
|
606
|
+
| `tone` | `TaoToneName` | — | A fixed colour instead of low / high |
|
|
607
|
+
|
|
608
|
+
**Slots, events, notes.** role="meter". A measured value in a range (disk, battery, a score), not the progress of a task: that is TaoProgress.
|
|
609
|
+
|
|
610
|
+
## TaoDonut
|
|
611
|
+
|
|
612
|
+
Showcase section: `#charts`
|
|
613
|
+
|
|
614
|
+
| Prop | Type | Default | Notes |
|
|
615
|
+
|---|---|---|---|
|
|
616
|
+
| `segments` | `TaoDonutSegment[]` | — | { label, value, tone?, color? }. The parts take --tao-color-chart-1…6 in order; a tone or a CSS colour wins. 3–5 parts read well |
|
|
617
|
+
| `value / max` | `number` | 0 / 100 | Without segments: a single ring, value of max |
|
|
618
|
+
| `tone` | `TaoToneName` | 'accent' | The colour of the single ring |
|
|
619
|
+
| `label` | `string` | — | The accessible name; the parts and their shares are read after it |
|
|
620
|
+
| `size / thickness` | `number` | 120 / 12 | The outer size and the ring width, px |
|
|
621
|
+
| `legend` | `boolean` | false | A list of the parts with their shares next to the ring |
|
|
622
|
+
|
|
623
|
+
**Slots, events, notes.** default — the middle of the ring (a number, a word). taoChartTheme(el?) returns the theme colours as rgb() for a chart library: colors (6 series), text, textMuted, grid, axis, background, tooltip, tooltipText, danger / success / warning, fontFamily; watchTaoChartTheme(apply, el?) calls it now and on every theme, mode or palette change, and returns stop().
|
|
624
|
+
|
|
625
|
+
## TaoHeatmap
|
|
626
|
+
|
|
627
|
+
Showcase section: `#charts`
|
|
628
|
+
|
|
629
|
+
| Prop | Type | Default | Notes |
|
|
630
|
+
|---|---|---|---|
|
|
631
|
+
| `values` | `(number \| null)[][]` | — | One array per row, one value per column; null is no data |
|
|
632
|
+
| `rows / cols` | `string[]` | — | The names of the rows («Mon») and the columns («12 am») |
|
|
633
|
+
| `steps` | `number[]` | by the data | The thresholds, ascending: a cell takes the colour of the highest one it reaches, below the first it is empty. By default round numbers at 10–80% of the largest value |
|
|
634
|
+
| `tone` | `TaoToneName` | 'accent' | The colour of the levels: from faint to the full tone |
|
|
635
|
+
| `label` | `string` | — | The accessible name of the grid |
|
|
636
|
+
| `legend` | `boolean` | true | The thresholds with their colours («500+») under the map |
|
|
637
|
+
| `hatch` | `number` | 1 | How many of the lowest levels are striped, so they read apart from empty cells without colour too |
|
|
638
|
+
| `labelEvery` | `number` | 1 | Show every n-th column name; all of them are still read |
|
|
639
|
+
| `colLabels` | `'top' \| 'bottom'` | 'bottom' | Where the column names stand |
|
|
640
|
+
| `cellHeight` | `number` | — | The cell height, px; square cells by default |
|
|
641
|
+
| `gap` | `number` | 3 | The gap between cells, px |
|
|
642
|
+
| `format` | `(value) => string` | by the locale | How a number is written in the tip, the cells and the legend |
|
|
643
|
+
|
|
644
|
+
**Slots, events, notes.** tip { row, col, value, text } — the tip over a cell. role="grid": one cell is in the tab order, the arrows, Home / End (Ctrl for the corners) and PageUp / PageDown move it; a screen reader reads the row, the column and the number. The map fits the width of its container.
|
|
645
|
+
|
|
646
|
+
## TaoTable
|
|
647
|
+
|
|
648
|
+
Showcase section: `#table`
|
|
649
|
+
|
|
650
|
+
| Prop | Type | Default | Notes |
|
|
651
|
+
|---|---|---|---|
|
|
652
|
+
| `columns` | `TaoTableColumn[]` | — | Required. { key, label, sortable?, align?, width? } |
|
|
653
|
+
| `rows` | `object[]` | [] | The data |
|
|
654
|
+
| `v-model:sort` | `{ key, dir } \| null` | null | Sorting. dir: asc \| desc |
|
|
655
|
+
| `loading` | `boolean` | false | The loading overlay |
|
|
656
|
+
| `emptyText` | `string` | 'No data' | If rows is empty and not loading |
|
|
657
|
+
| `striped` | `boolean \| 'odd' \| 'even'` | false | Zebra. true/odd — from the first row, even — from the second |
|
|
658
|
+
| `hover` | `boolean` | true | Highlight the row on hover |
|
|
659
|
+
| `size` | `'small' \| 'medium' \| 'large'` | inherited | Paddings and text of cells (small = the former compact), and the size of controls in cells too |
|
|
660
|
+
| `head` | `boolean` | true | Highlight the header |
|
|
661
|
+
| `lines` | `boolean` | true | Lines between rows |
|
|
662
|
+
| `bordered` | `boolean` | by context | The outer frame. Not set, it follows the frames context; false: no frame, the table sits on a raised fill. The lines between rows stay (lines) |
|
|
663
|
+
| `sticky` | `boolean` | false | A sticky header (needs maxHeight) |
|
|
664
|
+
| `rowKey` | `string \| fn` | 'id' | The row key |
|
|
665
|
+
| `maxHeight` | `number \| string` | — | Scroll. A number is px |
|
|
666
|
+
|
|
667
|
+
**Slots, events, notes.** Cell: #cell-{key}="{ row, value }". Events: change — the sorting changed, row-click, if clickable.
|
|
668
|
+
|
|
669
|
+
## TaoPagination
|
|
670
|
+
|
|
671
|
+
Showcase section: `#pagination`
|
|
672
|
+
|
|
673
|
+
| Prop | Type | Default | Notes |
|
|
674
|
+
|---|---|---|---|
|
|
675
|
+
| `v-model:page` | `number` | 1 | The current page |
|
|
676
|
+
| `total` | `number` | 0 | Total records (not pages) |
|
|
677
|
+
| `pageSize` | `number` | 10 | Records per page |
|
|
678
|
+
| `jump` | `number` | 5 | A click on “…” jumps this many pages. 0 — “…” is decorative |
|
|
679
|
+
| `pageInput` | `boolean \| number` | false | A field to type a page in: true — always, a number — from this many pages on. Enter or leaving the field goes there (clamped to the range), Esc drops it |
|
|
680
|
+
| `pageSizes` | `number[]` | — | The page sizes to choose from: «Per page» next to the total, v-model:page-size. On a change the page moves so the first row on screen stays on screen |
|
|
681
|
+
| `siblingCount` | `number` | 1 | How many numbers around the current one |
|
|
682
|
+
| `showTotal` | `boolean` | true | The “1–10 of N” caption |
|
|
683
|
+
| `size` | `'small' \| 'medium' \| 'large'` | inherited | Buttons 26 / 36 / 44, like TaoButton. Without it — the size of the ancestors |
|
|
684
|
+
| `disabled` | `boolean` | false | Disabled |
|
|
685
|
+
|
|
686
|
+
## TaoEmpty
|
|
687
|
+
|
|
688
|
+
Showcase section: `#empty`
|
|
689
|
+
|
|
690
|
+
| Prop | Type | Default | Notes |
|
|
691
|
+
|---|---|---|---|
|
|
692
|
+
| `title` | `string` | 'Nothing here' | The empty state title |
|
|
693
|
+
|
|
694
|
+
**Slots, events, notes.** default — an explanation. #icon — a picture/icon. #action — a button.
|
|
695
|
+
|
|
696
|
+
## TaoTree
|
|
697
|
+
|
|
698
|
+
Showcase section: `#tree`
|
|
699
|
+
|
|
700
|
+
| Prop | Type | Default | Notes |
|
|
701
|
+
|---|---|---|---|
|
|
702
|
+
| `nodes` | `TaoTreeNode[]` | — | { id, label, icon?, children?, hasChildren?, disabled? }. hasChildren without children — the children come from load when it opens |
|
|
703
|
+
| `v-model:expanded` | `string[]` | own | Ids of the expanded nodes. Without a model the tree keeps them itself |
|
|
704
|
+
| `selection` | `'none' \| 'single' \| 'multiple'` | 'single' | Selection mode. none — a click on a folder toggles it |
|
|
705
|
+
| `v-model:selected` | `string \| string[] \| null` | own | An id (single) or a list of ids (multiple) |
|
|
706
|
+
| `checkable` | `boolean` | false | Checkboxes. A parent is checked, unchecked or mixed by its leaves; a click on a parent toggles the whole branch |
|
|
707
|
+
| `v-model:checked` | `string[]` | own | Ids of the checked nodes without children (leaves and folders not loaded yet). A checked lazy folder hands its check to its children once loaded |
|
|
708
|
+
| `load` | `(node) => Promise<TaoTreeNode[]>` | — | Loads the children of a node with hasChildren; a spinner and aria-busy meanwhile |
|
|
709
|
+
| `size` | `'small' \| 'medium' \| 'large'` | inherited | Row height, as for the controls; the density works too |
|
|
710
|
+
| `ariaLabel` | `string` | 'Tree' | Accessible name of the tree |
|
|
711
|
+
| `loadingLabel` | `string` | 'Loading…' | The hint of the spinner |
|
|
712
|
+
|
|
713
|
+
**Slots, events, notes.** #icon, #label, #actions — { node, level, expanded, selected }; the actions show on hover and focus (always on a touch screen). Events: update:expanded / selected / checked, select(node) — a click, Enter, Space without checkboxes; load-error(node, error) — the node stays closed. Keys: ↑ ↓, → opens or goes in, ← closes or goes to the parent, Home / End, * opens the siblings, letters search, Enter selects, Space checks.
|
|
714
|
+
|
|
715
|
+
## TaoList
|
|
716
|
+
|
|
717
|
+
Showcase section: `#list`
|
|
718
|
+
|
|
719
|
+
| Prop | Type | Default | Notes |
|
|
720
|
+
|---|---|---|---|
|
|
721
|
+
| `size` | `'small' \| 'medium' \| 'large'` | inherited | Row height 26 / 36 / 44. An Item without its own size takes it from here |
|
|
722
|
+
| `bordered` | `boolean` | true | A border around the list |
|
|
723
|
+
| `divided` | `boolean` | true | Lines between rows |
|
|
724
|
+
| `maxHeight` | `number \| string` | — | Scroll. A number is pixels |
|
|
725
|
+
| `empty` | `boolean` | false | Show #empty instead of rows |
|
|
726
|
+
| `ariaLabel` | `string` | '' | The list name |
|
|
727
|
+
| `roving` | `boolean` | false | One Tab stop for the whole list: the arrows move between the rows, Home / End to the ends, disabled rows are skipped; Tab comes back to the row it left (the selected one the first time). The stop of a row is its button (clickable) or the row itself |
|
|
728
|
+
|
|
729
|
+
**Slots, events, notes.** default — TaoListItem. #empty — if empty.
|
|
730
|
+
|
|
731
|
+
## TaoListItem
|
|
732
|
+
|
|
733
|
+
Showcase section: `#list`
|
|
734
|
+
|
|
735
|
+
| Prop | Type | Default | Notes |
|
|
736
|
+
|---|---|---|---|
|
|
737
|
+
| `title` | `string` | '' | The title. The default slot replaces it |
|
|
738
|
+
| `description` | `string` | '' | A caption under the title |
|
|
739
|
+
| `selected` | `boolean` | false | The selected row |
|
|
740
|
+
| `disabled` | `boolean` | false | Disabled |
|
|
741
|
+
| `active` | `boolean` | false | Highlight without selected |
|
|
742
|
+
| `clickable` | `boolean` | false | A button row, fires click |
|
|
743
|
+
| `size` | `'small' \| 'medium' \| 'large'` | from the list | Override the list size |
|
|
744
|
+
| `actionAlways` | `boolean` | false | #action is always visible, not only on hover |
|
|
745
|
+
|
|
746
|
+
**Slots, events, notes.** default — the title. #prefix, #description, #suffix, #action (on hover; always on touch).
|
|
747
|
+
|
|
748
|
+
## TaoTimeline
|
|
749
|
+
|
|
750
|
+
Showcase section: `#timeline`
|
|
751
|
+
|
|
752
|
+
| Prop | Type | Default | Notes |
|
|
753
|
+
|---|---|---|---|
|
|
754
|
+
| `items` | `TaoTimelineItem[]` | — | { id, title, time?, datetime?, description?, icon?, tone? }. time is shown, datetime goes to <time datetime> |
|
|
755
|
+
| `active` | `string` | — | The id of the current event: the line is filled up to it, the next ones wait, it gets aria-current="step". Without active the feed is a log of the past |
|
|
756
|
+
| `align` | `'start' \| 'alternate'` | 'start' | alternate — the events on both sides of the line; below 480px of its own width it folds into start |
|
|
757
|
+
| `size` | `'small' \| 'medium' \| 'large'` | inherited | The marker and the text on the control scale; the density works too |
|
|
758
|
+
|
|
759
|
+
**Slots, events, notes.** #marker, #title, #content — { item, index, state, active }; state: done / current / upcoming. A marker tone: success / danger / warning / info / neutral, the accent without one. An <ol>: a screen reader hears the order, the line and the markers are hidden from it.
|
|
760
|
+
|
|
761
|
+
## TaoStages
|
|
762
|
+
|
|
763
|
+
Showcase section: `#stages`
|
|
764
|
+
|
|
765
|
+
| Prop | Type | Default | Notes |
|
|
766
|
+
|---|---|---|---|
|
|
767
|
+
| `items` | `TaoStageItem[]` | [] | { key, label?, status?: wait \| work \| ok \| bad } |
|
|
768
|
+
| `direction` | `'row' \| 'column'` | 'column' | column — top to bottom, row — in a row. As in TaoFlex |
|
|
769
|
+
| `ariaLabel` | `string` | 'Stages' | The list name |
|
|
770
|
+
|
|
771
|
+
**Slots, events, notes.** default / #icon="{ item, index, status }" — replace the step text or icon.
|
|
772
|
+
|
|
773
|
+
## TaoSkeleton
|
|
774
|
+
|
|
775
|
+
Showcase section: `#skeleton`
|
|
776
|
+
|
|
777
|
+
| Prop | Type | Default | Notes |
|
|
778
|
+
|---|---|---|---|
|
|
779
|
+
| `variant` | `'text' \| 'title' \| 'circle' \| 'rect'` | 'text' | The placeholder shape |
|
|
780
|
+
| `lines` | `number` | 1 | How many lines (text) |
|
|
781
|
+
| `width / height` | `string` | '' | A CSS size, if it has to be set explicitly |
|
|
782
|
+
|
|
783
|
+
## TaoCounter
|
|
784
|
+
|
|
785
|
+
Showcase section: `#counter`
|
|
786
|
+
|
|
787
|
+
| Prop | Type | Default | Notes |
|
|
788
|
+
|---|---|---|---|
|
|
789
|
+
| `value` | `number` | 0 | A number on display. Not an input |
|
|
790
|
+
| `maxDigits` | `number` | 9 | The minimum width in digits (leading zeros are hidden visually) |
|
|
791
|
+
|
|
792
|
+
## TaoCarousel
|
|
793
|
+
|
|
794
|
+
Showcase section: `#carousel`
|
|
795
|
+
|
|
796
|
+
| Prop | Type | Default | Notes |
|
|
797
|
+
|---|---|---|---|
|
|
798
|
+
| `v-model` | `number` | 0 | The index of the current snap |
|
|
799
|
+
| `perView` | `number` | 1 | How many slides are in the frame. 5 — a product strip |
|
|
800
|
+
| `peek` | `number` | 0 | How many px of the next card are visible on the right |
|
|
801
|
+
| `autoplay` | `number` | 0 | Time per slide in ms. 0 — off. The current indicator fills over this time and the slide changes when it is full (the clock is a CSS animation). Pauses on hover / keyboard focus / touch and drag / a hidden tab; off with prefers-reduced-motion |
|
|
802
|
+
| `loop` | `boolean` | false | Loop round in a circle |
|
|
803
|
+
| `indicator` | `'dots' \| 'bars' \| 'progress'` | — | Marks under the strip: dots (the current one stretches into a pill) / equal bars / one bar (the fill of the slide, the position without autoplay) |
|
|
804
|
+
| `pausable` | `boolean` | true | With autoplay: a button that stops and resumes it (autoplay that moves for more than 5 seconds must be stoppable) |
|
|
805
|
+
| `pauseLabel / playLabel` | `string` | 'Pause autoplay' / 'Start autoplay' | aria-label of the button |
|
|
806
|
+
| `controls` | `boolean` | true | Arrows. false hides both |
|
|
807
|
+
|
|
808
|
+
**Slots, events, notes.** default — slides. #prev / #next="{ go, disabled }" — custom buttons. #prev-icon / #next-icon — the icon only. #dots="{ index, count, go }" — your own indicator as a whole (an invisible fill then keeps the time), #dot — your own mark.
|
|
809
|
+
|
|
810
|
+
## TaoContainer
|
|
811
|
+
|
|
812
|
+
Showcase section: `#container`
|
|
813
|
+
|
|
814
|
+
| Prop | Type | Default | Notes |
|
|
815
|
+
|---|---|---|---|
|
|
816
|
+
| `width` | `'wide' \| 'slim' \| 'ultra-slim'` | 'wide' | max-width: 1120 / 500 / 400 |
|
|
817
|
+
| `free` | `boolean` | false | No horizontal auto-centring |
|
|
818
|
+
|
|
819
|
+
**Slots, events, notes.** default — the content.
|
|
820
|
+
|
|
821
|
+
## TaoFlex
|
|
822
|
+
|
|
823
|
+
Showcase section: `#flex`
|
|
824
|
+
|
|
825
|
+
| Prop | Type | Default | Notes |
|
|
826
|
+
|---|---|---|---|
|
|
827
|
+
| `justify` | `flex justify-content` | 'flex-start' | flex-start, center, space-between, space-around, space-evenly, flex-end, normal |
|
|
828
|
+
| `align` | `flex align-items` | 'stretch' | stretch, flex-start, center, flex-end, baseline |
|
|
829
|
+
| `direction` | `flex-direction` | 'row' | row, column and reverse |
|
|
830
|
+
| `wrap` | `flex-wrap` | 'nowrap' | nowrap, wrap, wrap-reverse |
|
|
831
|
+
| `gap` | `number \| string` | '0px' | The gap. A number is px, a string is CSS |
|
|
832
|
+
| `tag` | `string` | 'div' | Which HTML tag to render |
|
|
833
|
+
|
|
834
|
+
## TaoSpace
|
|
835
|
+
|
|
836
|
+
Showcase section: `#flex`
|
|
837
|
+
|
|
838
|
+
| Prop | Type | Default | Notes |
|
|
839
|
+
|---|---|---|---|
|
|
840
|
+
| `direction` | `'row' \| 'column'` | 'row' | As in TaoFlex |
|
|
841
|
+
| `block` | `boolean` | false | display: flex without wrap |
|
|
842
|
+
| `expand` | `boolean` | false | 100% width |
|
|
843
|
+
|
|
844
|
+
**Slots, events, notes.** default — children with an even gap.
|
|
845
|
+
|
|
846
|
+
## TaoGrid
|
|
847
|
+
|
|
848
|
+
Showcase section: `#grid`
|
|
849
|
+
|
|
850
|
+
| Prop | Type | Default | Notes |
|
|
851
|
+
|---|---|---|---|
|
|
852
|
+
| `min` | `string` | '220px' | The minimum tile width (auto-fill). A catalogue. Ignored with cols |
|
|
853
|
+
| `cols` | `number \| { compact, medium, expanded }` | 0 | Fixed columns (bento). A number: one column on compact, the number from medium on. An object: per width class of the grid itself (compact < 600px, medium < 840px, expanded), a missing class takes the smaller one. 0 — the min mode |
|
|
854
|
+
| `gap` | `number \| string` | token space-4 | The gap between cells. A number is px, a string is CSS |
|
|
855
|
+
| `rowHeight` | `number \| string` | — | The height of every row, as a mosaic wants: the grid keeps its proportions, a picture in a tile is cropped. Without it the rows follow the content |
|
|
856
|
+
|
|
857
|
+
**Slots, events, notes.** default — cards or TaoGridItem. Not masonry: the row follows the tallest. The width classes follow the width of the grid, not of the window (inside a TaoSplit pane too).
|
|
858
|
+
|
|
859
|
+
## TaoGridItem
|
|
860
|
+
|
|
861
|
+
Showcase section: `#grid`
|
|
862
|
+
|
|
863
|
+
| Prop | Type | Default | Notes |
|
|
864
|
+
|---|---|---|---|
|
|
865
|
+
| `col` | `number \| 'full' \| { compact, medium, expanded }` | 1 | How many columns to take; 'full' is the whole row. Never more than there are. For cols, not for min |
|
|
866
|
+
| `row` | `number \| { compact, medium, expanded }` | 1 | How many rows to take. A number: 1 on compact, the number from medium on |
|
|
867
|
+
| `order` | `number \| { compact, medium, expanded }` | 0 | The place in the flow: { compact: 9 } sends a side block to the end on a phone |
|
|
868
|
+
|
|
869
|
+
**Slots, events, notes.** default — a tile. In a catalogue it can go without the wrapper.
|
|
870
|
+
|
|
871
|
+
## TaoDivider
|
|
872
|
+
|
|
873
|
+
Showcase section: `#divider`
|
|
874
|
+
|
|
875
|
+
| Prop | Type | Default | Notes |
|
|
876
|
+
|---|---|---|---|
|
|
877
|
+
| `variant` | `'solid' \| 'dashed' \| 'colored' \| 'gap'` | 'solid' | solid — a regular border, dashed — dashes, colored — accent, gap — a gap |
|
|
878
|
+
| `text` | `string` | '' | An optional caption in the middle. Works with any variant |
|
|
879
|
+
| `fade` | `boolean` | false | Soft line edges. Does not affect gap |
|
|
880
|
+
| `size` | `'small' \| 'medium' \| 'large'` | 'medium' | For gap only — the height of the gap. Not inherited. |
|
|
881
|
+
|
|
882
|
+
**Slots, events, notes.** default — the same as text. If there is a slot, it wins over the prop.
|
|
883
|
+
|
|
884
|
+
## TaoSplit
|
|
885
|
+
|
|
886
|
+
Showcase section: `#split`
|
|
887
|
+
|
|
888
|
+
| Prop | Type | Default | Notes |
|
|
889
|
+
|---|---|---|---|
|
|
890
|
+
| `v-model` | `number` | 50 | The size of the start pane in unit |
|
|
891
|
+
| `direction` | `'row' \| 'column'` | 'row' | As in Flex |
|
|
892
|
+
| `unit` | `'%' \| 'px'` | '%' | Percent or pixels |
|
|
893
|
+
| `min / max` | `number` | 0 / — | The bounds of the start pane |
|
|
894
|
+
| `minEnd` | `number` | 0 | The minimum of the second pane |
|
|
895
|
+
| `resizable` | `boolean` | true | false — the bar is there, but cannot be dragged |
|
|
896
|
+
| `step` | `number` | 1% or 8px | The arrow step when the bar is focused |
|
|
897
|
+
| `@change` | `value` | — | Finished dragging or an arrow was pressed. v-model fires on every move |
|
|
898
|
+
|
|
899
|
+
**Slots, events, notes.** #start and #end — the two panes. Three columns = two nested splits.
|
|
900
|
+
|
|
901
|
+
## TaoFieldset
|
|
902
|
+
|
|
903
|
+
Showcase section: `#fieldset`
|
|
904
|
+
|
|
905
|
+
| Prop | Type | Default | Notes |
|
|
906
|
+
|---|---|---|---|
|
|
907
|
+
| `legend` | `string` | '' | A caption on the top frame |
|
|
908
|
+
| `align` | `'start' \| 'center' \| 'end'` | 'start' | Where to shift the legend |
|
|
909
|
+
|
|
910
|
+
**Slots, events, notes.** default — the fields. #legend — if the caption is not a string.
|
|
911
|
+
|
|
912
|
+
## TaoAnimatedBorder
|
|
913
|
+
|
|
914
|
+
Showcase section: `#animated-border`
|
|
915
|
+
|
|
916
|
+
| Prop | Type | Default | Notes |
|
|
917
|
+
|---|---|---|---|
|
|
918
|
+
| `variant` | `'rainbow' \| 'tone'` | 'rainbow' | What the border is made of: the rainbow or the colours of a tone |
|
|
919
|
+
| `tone` | `TaoToneName` | 'accent' | The tone for variant="tone"; the theme accent without it |
|
|
920
|
+
| `colors` | `string[]` | — | Your own colours (any CSS colour), they win over variant |
|
|
921
|
+
| `radius` | `number \| string` | var(--tao-radius-panel) | Corner radius of the content; the border outside is that plus its width |
|
|
922
|
+
| `borderWidth` | `number` | 3 | The outline thickness in px |
|
|
923
|
+
| `speed` | `number` | 6 | The duration of one turn in seconds |
|
|
924
|
+
| `light` | `boolean` | false | A soft glow around the frame |
|
|
925
|
+
| `glow` | `number` | 16 | The glow radius in px. Makes sense with light |
|
|
926
|
+
|
|
927
|
+
**Slots, events, notes.** default — the content inside the frame. With prefers-reduced-motion the gradient stands still.
|
|
928
|
+
|
|
929
|
+
## TaoModal
|
|
930
|
+
|
|
931
|
+
Showcase section: `#modal`
|
|
932
|
+
|
|
933
|
+
| Prop | Type | Default | Notes |
|
|
934
|
+
|---|---|---|---|
|
|
935
|
+
| `v-model` | `boolean` | — | Open. Required |
|
|
936
|
+
| `title` | `string` | '' | The title in the header |
|
|
937
|
+
| `closable` | `boolean` | true | The cross, Esc, a click on the backdrop |
|
|
938
|
+
| `closeLabel` | `string` | 'Close' | aria-label of the cross |
|
|
939
|
+
| `fullscreen` | `boolean \| 'narrow'` | false | true — the whole screen: square corners, the header and the footer stay while the content scrolls, the safe areas kept. narrow — only on a screen narrower than 600px: a dialog on a computer, a page on a phone |
|
|
940
|
+
| `surface` | `'flat' \| 'grain' \| 'glass'` | 'flat' | What the panel is made of, as on TaoCard. class, style and the other attributes go to the panel; the content scrolls, the header and #footer stay. --tao-modal-bg is the panel colour for a bar of your own that sticks inside |
|
|
941
|
+
|
|
942
|
+
**Slots, events, notes.** default — the body. #footer — buttons. #close-icon — the cross icon.
|
|
943
|
+
|
|
944
|
+
## TaoDrawer
|
|
945
|
+
|
|
946
|
+
Showcase section: `#drawer`
|
|
947
|
+
|
|
948
|
+
| Prop | Type | Default | Notes |
|
|
949
|
+
|---|---|---|---|
|
|
950
|
+
| `v-model` | `boolean` | — | Open. Required |
|
|
951
|
+
| `title` | `string` | '' | The title |
|
|
952
|
+
| `side` | `'left' \| 'right' \| 'bottom'` | 'right' | Where it slides in from. bottom is a sheet: as wide as the screen up to 640px, as tall as its content up to 90% of the screen, rounded top, a grip, above the safe area |
|
|
953
|
+
| `closable` | `boolean` | true | The user can close it: Esc, the backdrop, the cross, the pull-down of a sheet. false — only the parent closes it |
|
|
954
|
+
| `showClose` | `boolean` | true | The cross in the header. false hides only the cross: Esc, the backdrop and the pull-down still close it |
|
|
955
|
+
| `swipeToClose` | `boolean` | true | side="bottom" only: the sheet is pulled down by its grip and header; it closes when pulled half of its height (swipeThreshold) or flung, and comes back otherwise. It does not start from a button or a field in the header, so the content still scrolls. Needs closable |
|
|
956
|
+
| `swipeThreshold` | `number` | 0.5 | side="bottom" only: how far, as a share of its height (0.05–1), the sheet must be pulled to close. A touch that only grazes it does not close it; a fast fling needs 15% of the height at least |
|
|
957
|
+
| `closeLabel` | `string` | 'Close' | aria-label of the cross |
|
|
958
|
+
| `surface` | `'flat' \| 'grain' \| 'glass'` | 'flat' | What the panel is made of, as on TaoCard. class, style and the other attributes go to the panel; --tao-drawer-bg is its colour |
|
|
959
|
+
|
|
960
|
+
**Slots, events, notes.** default — the body. #footer — buttons or an input line pinned to the bottom. #close-icon — the cross icon. #header="{ close }" — the whole header instead of the title and the cross (a title with a counter, a filter, a cross of your own); name it for a screen reader with aria-label on the panel.
|
|
961
|
+
|
|
962
|
+
## confirm()
|
|
963
|
+
|
|
964
|
+
Showcase section: `#confirm`
|
|
965
|
+
|
|
966
|
+
| Prop | Type | Default | Notes |
|
|
967
|
+
|---|---|---|---|
|
|
968
|
+
| `confirm()` | `() => Promise<boolean>` | | A chain in a single tick. true — ok, false — cancel / Esc / backdrop |
|
|
969
|
+
| `confirm(message)` | `(string) => Promise<boolean>` | | A short call with a text |
|
|
970
|
+
| `.title / .message` | `(string) => builder` | | The title and text |
|
|
971
|
+
| `.ok / .cancel` | `(label) => builder` | | Button captions |
|
|
972
|
+
| `.danger()` | `() => builder` | | A red confirm button |
|
|
973
|
+
| `confirm.defaults` | `({ ok, cancel })` | | Default captions for the whole app |
|
|
974
|
+
|
|
975
|
+
## TaoTooltip
|
|
976
|
+
|
|
977
|
+
Showcase section: `#tooltip`
|
|
978
|
+
|
|
979
|
+
| Prop | Type | Default | Notes |
|
|
980
|
+
|---|---|---|---|
|
|
981
|
+
| `content` | `string` | — | The hint text. Required |
|
|
982
|
+
| `placement` | `TaoPlacement` | 'top' | Side and alignment: top / bottom / left / right and -start / -end. Flips at the screen edge |
|
|
983
|
+
|
|
984
|
+
**Slots, events, notes.** default — the trigger (a button, an icon…).
|
|
985
|
+
|
|
986
|
+
## TaoPopover
|
|
987
|
+
|
|
988
|
+
Showcase section: `#popover`
|
|
989
|
+
|
|
990
|
+
| Prop | Type | Default | Notes |
|
|
991
|
+
|---|---|---|---|
|
|
992
|
+
| `v-model` | `boolean` | uncontrolled | Open state. Without v-model it holds its own |
|
|
993
|
+
| `placement` | `TaoPlacement` | 'bottom-start' | Side and alignment of the panel: top / bottom / left / right and -start / -end. Flips at the edge |
|
|
994
|
+
| `disabled` | `boolean` | false | Does not open |
|
|
995
|
+
|
|
996
|
+
**Slots, events, notes.** #trigger — the button. default — the panel content. Not a tooltip and not an action menu.
|
|
997
|
+
|
|
998
|
+
## TaoDropdownMenu
|
|
999
|
+
|
|
1000
|
+
Showcase section: `#dropdown`
|
|
1001
|
+
|
|
1002
|
+
| Prop | Type | Default | Notes |
|
|
1003
|
+
|---|---|---|---|
|
|
1004
|
+
| `items` | `TaoMenuItem[]` | [] | Entries: plain { id, label, icon?, shortcut?, disabled?, items? }, checkboxes { type: "checkbox", checked }, radios { type: "radio", group, checked }, { type: "label" }, { type: "separator" }. items inside an entry is a submenu |
|
|
1005
|
+
| `placement` | `TaoPlacement` | 'bottom-end' | Where the list opens. Flips at the screen edge |
|
|
1006
|
+
| `menuLabel` | `string` | 'Menu' | aria-label of the button and of the menu |
|
|
1007
|
+
| `closeOnScroll` | `boolean` | false | Close when the page scrolls. Off: the menu follows its button |
|
|
1008
|
+
| `size` | `'small' \| 'medium' \| 'large'` | — | The button becomes a square of that control height: a compact kebab for a list row. Without it — the padding round the icon |
|
|
1009
|
+
| `tabbable` | `boolean` | true | The button is a Tab stop. Off: it leaves the Tab order (the row has its own menu key) and still opens by a click |
|
|
1010
|
+
|
|
1011
|
+
**Slots, events, notes.** #icon — the trigger icon, #button — the whole button content, #item="{ item, id, label, icon }" — your own item face. The select event — the item id. shortcut is a ready string to show: the menu neither parses nor listens to it.
|
|
1012
|
+
|
|
1013
|
+
## TaoMenu
|
|
1014
|
+
|
|
1015
|
+
Showcase section: `#dropdown`
|
|
1016
|
+
|
|
1017
|
+
| Prop | Type | Default | Notes |
|
|
1018
|
+
|---|---|---|---|
|
|
1019
|
+
| `items` | `TaoMenuItem[]` | | The same entries |
|
|
1020
|
+
| `open` | `boolean` | | Whether it is open. The owner closes it on the close event |
|
|
1021
|
+
| `anchor` | `HTMLElement \| null` | | What the panel hangs from |
|
|
1022
|
+
| `placement` | `TaoPlacement` | 'bottom-end' | Side and alignment |
|
|
1023
|
+
| `label` | `string` | — | Accessible name of the menu |
|
|
1024
|
+
|
|
1025
|
+
**Slots, events, notes.** Event select — the item id, close(reason) — the menu asks to be closed (escape / select / outside / tab). The panel for your own shells: a button, a context menu, a menu bar.
|
|
1026
|
+
|
|
1027
|
+
## TaoToolbar
|
|
1028
|
+
|
|
1029
|
+
Showcase section: `#toolbar`
|
|
1030
|
+
|
|
1031
|
+
| Prop | Type | Default | Notes |
|
|
1032
|
+
|---|---|---|---|
|
|
1033
|
+
| `label` | `string` | — | Accessible name of the bar: Formatting, Tools |
|
|
1034
|
+
| `size` | `'small' \| 'medium' \| 'large'` | inherited | The size of the controls inside |
|
|
1035
|
+
| `orientation` | `'horizontal' \| 'vertical'` | 'horizontal' | Which arrows walk it (← → or ↑ ↓); the separators lie across |
|
|
1036
|
+
| `variant` | `'panel' \| 'plain'` | 'panel' | panel — a raised bar of its own with concentric corners; plain — only the layout, for a toolbar inside a header |
|
|
1037
|
+
| `bordered` | `boolean` | by context | The frame of a panel. Not set, it follows the frames context; false: no frame, the raised fill stays |
|
|
1038
|
+
|
|
1039
|
+
**Slots, events, notes.** default — any controls: TaoButton (toggles with v-model:pressed), TaoSegmented, a select, TaoToolbarGroup, TaoToolbarSeparator. Keys: the bar is one Tab stop and remembers the last item; ← → (↑ ↓ when vertical) walk it and wrap, Home / End go to the ends, disabled items are skipped. Inside a radio group (TaoSegmented) the arrows pick the option and go on from its edge; a text field keeps its arrows. The items wrap onto a new line on a narrow screen.
|
|
1040
|
+
|
|
1041
|
+
## TaoToolbarGroup
|
|
1042
|
+
|
|
1043
|
+
Showcase section: `#toolbar`
|
|
1044
|
+
|
|
1045
|
+
| Prop | Type | Default | Notes |
|
|
1046
|
+
|---|---|---|---|
|
|
1047
|
+
| `label` | `string` | — | Accessible name of the group: Text style, Alignment |
|
|
1048
|
+
| `inset` | `boolean` | false | A sunken pill behind the group: its buttons read as one set |
|
|
1049
|
+
|
|
1050
|
+
**Slots, events, notes.** default — the tools of one kind. role="group".
|
|
1051
|
+
|
|
1052
|
+
## TaoToolbarSeparator
|
|
1053
|
+
|
|
1054
|
+
Showcase section: `#toolbar`
|
|
1055
|
+
|
|
1056
|
+
**Slots, events, notes.** A thin line between the groups, across the bar: vertical in a horizontal toolbar. role="separator".
|
|
1057
|
+
|
|
1058
|
+
## TaoMenubar
|
|
1059
|
+
|
|
1060
|
+
Showcase section: `#menubar`
|
|
1061
|
+
|
|
1062
|
+
| Prop | Type | Default | Notes |
|
|
1063
|
+
|---|---|---|---|
|
|
1064
|
+
| `items` | `TaoMenuItem[]` | — | The top entries: { id, label, items } is a menu, { id, label } a plain action. Inside a menu, everything TaoMenu can do (submenus, checkboxes, radios, shortcuts). Separators and labels at the top level are ignored |
|
|
1065
|
+
| `size` | `'small' \| 'medium' \| 'large'` | inherited | The height of the bar, as for the controls |
|
|
1066
|
+
| `ariaLabel` | `string` | 'Menu bar' | Accessible name of the bar |
|
|
1067
|
+
| `closeOnScroll` | `boolean` | false | Close an open menu when the page scrolls. Off: it follows its entry |
|
|
1068
|
+
| `bordered` | `boolean` | by context | The outer frame. Not set, it follows the frames context; false: no frame, the raised fill stays |
|
|
1069
|
+
|
|
1070
|
+
**Slots, events, notes.** The select event — the id of the picked item (in a menu or a plain top entry). #item — your own item face in the menus. Keys: Tab enters the bar, ← → walk it, Home / End, ↓ / Enter / Space open, with a menu open ← → move to the neighbour menu, Esc closes and gives the focus back. No folding of entries into “…” on a narrow bar yet.
|
|
1071
|
+
|
|
1072
|
+
## TaoContextMenu
|
|
1073
|
+
|
|
1074
|
+
Showcase section: `#menubar`
|
|
1075
|
+
|
|
1076
|
+
| Prop | Type | Default | Notes |
|
|
1077
|
+
|---|---|---|---|
|
|
1078
|
+
| `items` | `TaoMenuItem[]` | — | The entries, as in TaoMenu |
|
|
1079
|
+
| `disabled` | `boolean` | false | Leave the browser menu alone |
|
|
1080
|
+
| `menuLabel` | `string` | 'Context menu' | Accessible name of the menu |
|
|
1081
|
+
| `closeOnScroll` | `boolean` | true | Close when the page or a scroll container scrolls (the point moves away from under the menu). false keeps it at the screen point. Scrolling inside the menu never closes it |
|
|
1082
|
+
|
|
1083
|
+
**Slots, events, notes.** default — the area where the right click (or the Menu key / Shift+F10) opens the menu; the wrapper does not take part in the layout (display: contents). #item — your own item face. Events select — the item id, open({ x, y }) — where it opened. On iOS a long press sends no contextmenu: give it a button there.
|
|
1084
|
+
|
|
1085
|
+
## TaoSpoiler
|
|
1086
|
+
|
|
1087
|
+
Showcase section: `#spoiler`
|
|
1088
|
+
|
|
1089
|
+
| Prop | Type | Default | Notes |
|
|
1090
|
+
|---|---|---|---|
|
|
1091
|
+
| `v-model` | `boolean` | uncontrolled | Open / closed. Without a model — defaultOpen |
|
|
1092
|
+
| `title` | `string` | '' | The button title |
|
|
1093
|
+
| `name` | `string \| number` | — | The panel key inside TaoSpoilerGroup |
|
|
1094
|
+
| `defaultOpen` | `boolean` | false | The initial state, if there is no v-model |
|
|
1095
|
+
| `bordered` | `boolean` | by context | The outer frame. Not set, it follows the frames context; false: the header fill holds the panel |
|
|
1096
|
+
| `@change` | `value` | — | The user opened or closed it |
|
|
1097
|
+
|
|
1098
|
+
**Slots, events, notes.** default — the body. Neighbours do not close each other.
|
|
1099
|
+
|
|
1100
|
+
## TaoSpoilerGroup
|
|
1101
|
+
|
|
1102
|
+
Showcase section: `#spoiler`
|
|
1103
|
+
|
|
1104
|
+
| Prop | Type | Default | Notes |
|
|
1105
|
+
|---|---|---|---|
|
|
1106
|
+
| `v-model` | `string \| number \| null` | uncontrolled | The key of the open panel. null — all closed. Without a model the group remembers the key itself |
|
|
1107
|
+
|
|
1108
|
+
**Slots, events, notes.** default — a set of TaoSpoiler with name.
|
|
1109
|
+
|
|
1110
|
+
## TaoNav
|
|
1111
|
+
|
|
1112
|
+
Showcase section: `#tao-nav`
|
|
1113
|
+
|
|
1114
|
+
| Prop | Type | Default | Notes |
|
|
1115
|
+
|---|---|---|---|
|
|
1116
|
+
| `items` | `TaoNavItem[]` | — | { id, label, icon?, href?, badge?, disabled? }. With href the item is an <a> link, without it a button. badge: a number or a string is a count, true a dot |
|
|
1117
|
+
| `v-model` | `string` | — | The id of the current section: aria-current="page" and the active look |
|
|
1118
|
+
| `layout` | `'auto' \| 'bar' \| 'rail' \| 'drawer'` | 'auto' | bar — a bottom bar, rail — a rail with icons, drawer — a side panel with labels. auto — by the width of TaoNav itself: bar below 600px, rail below 840px, drawer from 840px (container queries, no JS) |
|
|
1119
|
+
| `maxBarItems` | `number` | 5 | How many fit the bar. With more items maxBarItems − 1 stay, the rest go into «More» with a menu |
|
|
1120
|
+
| `ariaLabel` | `string` | 'Navigation' | Accessible name of the navigation |
|
|
1121
|
+
| `moreLabel` | `string` | 'More' | The label of «More» |
|
|
1122
|
+
| `indicator` | `'pill' \| 'line'` | 'pill' | How the current section is marked: a tint behind the item, or the accent colour and a short line (under the item in the bar, along its start edge on the side; auto moves it) |
|
|
1123
|
+
| `floating` | `boolean` | false | In the bar look, a detached pill above the page: inset from the edges and above the safe area, round, with a shadow; the active item is a pill too. The rail and the side panel do not change. The main action of the screen goes beside it as your own round button, not into the bar |
|
|
1124
|
+
| `badgeTone` | `'accent' \| 'neutral'` | 'accent' | The counters: accent on every item, or neutral — grey, the accent on the current item only. A dot (badge: true) stays the accent |
|
|
1125
|
+
| `surface` | `'flat' \| 'glass' \| 'grain'` | 'flat' | What the panel is made of, as on TaoCard: glass lets the page show blurred through the bar as it scrolls under it (solid where blur is not supported or less transparency is asked) |
|
|
1126
|
+
|
|
1127
|
+
**Slots, events, notes.** default — the page: TaoNav lays it out next to the navigation (the bar sticks to the bottom, on the side the list sticks to the top; env(safe-area-inset-bottom) is kept). Without the slot it is a standalone panel with a border. #label — your own item label ({ item, active }). Structure: .tao-nav is the whole layout (the navigation and the page), .tao-nav__panel the navigation, .tao-nav__content the page; a style for the menu goes on the panel (or use surface), not on the root. #footer — a small line under the items in the rail and the side panel (the version, «About», a link); the bar does not show it. #action — the main action of the screen: a TaoButton with icon and its text in <span class="tao-nav__action-label">; the bar puts it round above itself at the end side (above the pill with floating), the rail round at the top, the side panel extended with the text at the top; in the round looks the text is hidden but stays the name of the button (a shortcut on it too). The side panel gives the button its own corners; --tao-nav-action-radius: var(--tao-radius-full) makes it a pill. --tao-nav-rail-width (80px) and --tao-nav-drawer-width (240px) set the widths. Events: update:modelValue, select(id, event) — event.preventDefault() keeps a link from navigating, to route it yourself.
|
|
1128
|
+
|
|
1129
|
+
## TaoTabs
|
|
1130
|
+
|
|
1131
|
+
Showcase section: `#tabs`
|
|
1132
|
+
|
|
1133
|
+
| Prop | Type | Default | Notes |
|
|
1134
|
+
|---|---|---|---|
|
|
1135
|
+
| `v-model` | `string` | — | value of the active tab. Required |
|
|
1136
|
+
| `items` | `TaoTabItem[]` | — | { value, label, disabled? } — like Select options |
|
|
1137
|
+
| `@change` | `value` | — | The user picked another tab |
|
|
1138
|
+
| `justify` | `TaoJustify` | — | Where the tabs sit in the row, as in TaoFlex: flex-start, center, flex-end, space-between, space-around, space-evenly. Without it, at the left |
|
|
1139
|
+
| `size` | `'small' \| 'medium' \| 'large'` | inherited | The tab height as TaoButton (26 / 36 / 44). Without it — the size of the ancestors |
|
|
1140
|
+
|
|
1141
|
+
**Slots, events, notes.** default="{ key }" — the content of the active panel.
|
|
1142
|
+
|
|
1143
|
+
## TaoBreadcrumb
|
|
1144
|
+
|
|
1145
|
+
Showcase section: `#breadcrumb`
|
|
1146
|
+
|
|
1147
|
+
| Prop | Type | Default | Notes |
|
|
1148
|
+
|---|---|---|---|
|
|
1149
|
+
| `items` | `{ label, to? }[]` | — | The crumbs. The last one is the current page, without a link. Required |
|
|
1150
|
+
| `ariaLabel` | `string` | 'Breadcrumb' | The navigation name |
|
|
1151
|
+
|
|
1152
|
+
## TaoLink
|
|
1153
|
+
|
|
1154
|
+
Showcase section: `#link`
|
|
1155
|
+
|
|
1156
|
+
| Prop | Type | Default | Notes |
|
|
1157
|
+
|---|---|---|---|
|
|
1158
|
+
| `to` | `string \| object` | — | The address. NuxtLink → RouterLink → <a> |
|
|
1159
|
+
| `newTab` | `boolean` | false | target=_blank + rel=noopener |
|
|
1160
|
+
| `private` | `boolean` | false | rel=noopener noreferrer |
|
|
1161
|
+
| `exactPath` | `boolean` | false | An exact path match for active (vue-router) |
|
|
1162
|
+
|
|
1163
|
+
**Slots, events, notes.** default — the link text.
|
|
1164
|
+
|
|
1165
|
+
## TaoStretchedLink
|
|
1166
|
+
|
|
1167
|
+
Showcase section: `#stretched-link`
|
|
1168
|
+
|
|
1169
|
+
| Prop | Type | Default | Notes |
|
|
1170
|
+
|---|---|---|---|
|
|
1171
|
+
| `to` | `string \| object` | — | The address, as in TaoLink |
|
|
1172
|
+
| `newTab` | `boolean` | false | target=_blank + rel=noopener |
|
|
1173
|
+
| `private` | `boolean` | false | rel=noopener noreferrer |
|
|
1174
|
+
| `exactPath` | `boolean` | false | An exact path match for active (vue-router) |
|
|
1175
|
+
|
|
1176
|
+
**Slots, events, notes.** default — the link text. Classes: tao-stretched on the container (position: relative), tao-stretched-raise on the controls that must stay clickable by themselves; --tao-stretched-radius is the corner of the focus ring. Never give the link filter, transform, perspective, will-change: transform or contain (on :hover too): the cursor flickers.
|
|
1177
|
+
|
|
1178
|
+
## TaoScrollTop
|
|
1179
|
+
|
|
1180
|
+
Showcase section: `#scrolltop`
|
|
1181
|
+
|
|
1182
|
+
| Prop | Type | Default | Notes |
|
|
1183
|
+
|---|---|---|---|
|
|
1184
|
+
| `variant` | `'solid' \| 'ghost' \| 'text'` | 'solid' | The look: a filled circle, a light circle or a caption with an arrow |
|
|
1185
|
+
| `side` | `'left' \| 'right'` | 'right' | Which edge of the page the button sits on |
|
|
1186
|
+
| `offset` | `number \| string` | 24 | The offset from that edge (older name: right) |
|
|
1187
|
+
| `label` | `string` | — | The caption: on mouse hover (not touch) for solid / ghost, always visible for text (the locale text by default); an empty string hides it |
|
|
1188
|
+
| `labelSide` | `'left' \| 'right'` | — | Which side the caption goes; opposite to side by default |
|
|
1189
|
+
| `boundary` | `number` | 300 | The threshold in px: it appears on a reverse scroll after it |
|
|
1190
|
+
| `size` | `number` | 40 | The button size in px |
|
|
1191
|
+
| `bottom` | `number \| string` | 24 | The offset from the bottom edge |
|
|
1192
|
+
| `zIndex` | `number` | 1000 | The layer |
|
|
1193
|
+
| `ariaLabel` | `string` | 'Back to top' | The accessible name |
|
|
1194
|
+
| `outline` | `boolean` | true | The focus outline |
|
|
1195
|
+
|
|
1196
|
+
## toast()
|
|
1197
|
+
|
|
1198
|
+
Showcase section: `#toast`
|
|
1199
|
+
|
|
1200
|
+
| Prop | Type | Default | Notes |
|
|
1201
|
+
|---|---|---|---|
|
|
1202
|
+
| `toast()` | `() => builder` | | A chain in a single tick, shown on the next one |
|
|
1203
|
+
| `toast.success(msg)` | `(string, options?) => builder` | | A short call. Also error / warning / info / show |
|
|
1204
|
+
| `.success() / .danger() / …` | `() => builder` | | The type. show() is neutral |
|
|
1205
|
+
| `.title / .message` | `(string) => builder` | | The title and text |
|
|
1206
|
+
| `.short() / .timeout(ms)` | `() => builder` | | 1 s or your own time |
|
|
1207
|
+
| `.byBottomRight() / …` | `() => builder` | | The corner: top/bottom + left/right/center |
|
|
1208
|
+
| `.action(label, fn)` | `(string, fn) => builder` | | A button in the toast |
|
|
1209
|
+
| `.loading()` | `() => builder` | | Work in progress: a spinner, no timeout, aria-busy. Finish it with a toast of the same id and replace(): it takes its place |
|
|
1210
|
+
| `toast.promise(p, texts)` | `(Promise, { loading, success, error }) => Promise` | | Loading while the promise runs, then success or error in the same place; success / error can be functions of the result / the error |
|
|
1211
|
+
| `.id(x).replace()` | `() => builder` | | Replaces the toast with that id where it stands, and restarts its time |
|
|
1212
|
+
| `toast.defaults` | `(partial) => toast` | | Position, timeout, closeLabel for the whole app |
|
|
1213
|
+
|
|
1214
|
+
## TaoAlert
|
|
1215
|
+
|
|
1216
|
+
Showcase section: `#alert`
|
|
1217
|
+
|
|
1218
|
+
| Prop | Type | Default | Notes |
|
|
1219
|
+
|---|---|---|---|
|
|
1220
|
+
| `tone` | `'success' \| 'danger' \| 'warning' \| 'info' \| 'neutral'` | 'info' | The status colour, as TaoButton |
|
|
1221
|
+
| `title` | `string` | '' | The title. Can be omitted |
|
|
1222
|
+
| `closable` | `boolean` | false | The cross. It does not unmount itself — it fires close |
|
|
1223
|
+
| `closeLabel` | `string` | 'Close' | aria-label of the cross |
|
|
1224
|
+
| `collapsible` | `boolean` | false | The body folds under the title (the title is the toggle, aria-expanded); the tone stays. Folded text stays in the DOM, find-in-page opens it |
|
|
1225
|
+
| `v-model:collapsed` | `boolean` | own | Folded or not; v-model:collapsed="true" starts folded. Better open for an error |
|
|
1226
|
+
| `detailsLabel` | `string` | 'Details' | The toggle text when there is no title |
|
|
1227
|
+
| `bordered` | `boolean` | by context | The frame. Not set, it follows the frames context (.tao-frames-soft); false: no frame, a stronger tint of the tone; true: the frame stays |
|
|
1228
|
+
|
|
1229
|
+
**Slots, events, notes.** default — the text. #close-icon. v-if + @close — to hide it.
|
|
1230
|
+
|
|
1231
|
+
## TaoTag
|
|
1232
|
+
|
|
1233
|
+
Showcase section: `#tag`
|
|
1234
|
+
|
|
1235
|
+
| Prop | Type | Default | Notes |
|
|
1236
|
+
|---|---|---|---|
|
|
1237
|
+
| `tone` | `'neutral' \| 'success' \| 'danger' \| 'warning' \| 'info' \| ''` | '' | The status colour, as TaoButton |
|
|
1238
|
+
| `flat` | `boolean` | false | No border, the fill stays |
|
|
1239
|
+
| `size` | `'small' \| 'medium' \| 'large'` | inherited | Height 18 / 20 / 24. Without it — the size of the ancestors |
|
|
1240
|
+
| `closable` | `boolean` | false | The cross. Fires close, does not touch the array itself |
|
|
1241
|
+
| `clickable` | `boolean` | false | A pointer cursor (a clickable chip), as TaoListItem / TaoTable |
|
|
1242
|
+
| `color / background / borderColor` | `string` | — | Override the tokens by hand |
|
|
1243
|
+
|
|
1244
|
+
**Slots, events, notes.** default — the text. #prefix — an avatar or an icon on the left.
|
|
1245
|
+
|
|
1246
|
+
## TaoLoader
|
|
1247
|
+
|
|
1248
|
+
Showcase section: `#loader`
|
|
1249
|
+
|
|
1250
|
+
| Prop | Type | Default | Notes |
|
|
1251
|
+
|---|---|---|---|
|
|
1252
|
+
| `variant` | `'dots' \| 'ring' \| 'pulse' \| 'diamonds'` | 'dots' | The look: four dots / a ring with a turning arc / ripples from a core / four diamonds on two axes that flow into each other: a hollow one crosses to a filled one and takes it in, and a new filled one grows where it stood |
|
|
1253
|
+
| `size` | `number \| string` | 80 for dots, 40 for the others | The size. A number is px, "40px" works, or small / medium / large (24 / 40 / 64) |
|
|
1254
|
+
| `tone` | `'accent' \| 'success' \| 'danger' \| 'warning' \| 'info' \| 'neutral'` | 'accent' | A colour role of the theme |
|
|
1255
|
+
| `color` | `string` | — | A CSS colour of your own, wins over tone; currentColor takes the text colour around it |
|
|
1256
|
+
| `inline` | `boolean` | false | Inline, without block centring |
|
|
1257
|
+
| `label` | `string` | 'Loading' | What a screen reader says (the text of the locale by default) |
|
|
1258
|
+
| `decorative` | `boolean` | false | A picture only: hidden from a screen reader (the wait is said elsewhere; a button with loading says it itself) |
|
|
1259
|
+
|
|
1260
|
+
**Slots, events, notes.** Under «reduce motion» nothing travels or turns: the loader only breathes.
|
|
1261
|
+
|
|
1262
|
+
## TaoImage
|
|
1263
|
+
|
|
1264
|
+
Showcase section: `#image`
|
|
1265
|
+
|
|
1266
|
+
| Prop | Type | Default | Notes |
|
|
1267
|
+
|---|---|---|---|
|
|
1268
|
+
| `src` | `string` | '' | The image address |
|
|
1269
|
+
| `alt` | `string` | '' | The alternative text |
|
|
1270
|
+
| `lazy` | `boolean` | false | The native loading="lazy" |
|
|
1271
|
+
| `pixelated` | `boolean` | false | image-rendering: pixelated |
|
|
1272
|
+
| `placeholderText` | `string` | 'No image available' | The text if src is empty or fails |
|
|
1273
|
+
|
|
1274
|
+
## TaoAvatar
|
|
1275
|
+
|
|
1276
|
+
Showcase section: `#avatar`
|
|
1277
|
+
|
|
1278
|
+
| Prop | Type | Default | Notes |
|
|
1279
|
+
|---|---|---|---|
|
|
1280
|
+
| `src` | `string` | '' | A photo. If empty — initials from name |
|
|
1281
|
+
| `name` | `string` | '' | For the initials and alt |
|
|
1282
|
+
| `size` | `'small' \| 'medium' \| 'large'` | 'medium' | 24 / 32 / 48px. Content, does not inherit the size of ancestors. |
|
|
1283
|
+
| `dot` | `boolean \| tone` | false | The status dot. true = success |
|
|
1284
|
+
| `count` | `number \| string` | — | A badge. 0 and empty are not drawn, >99 → 99+ |
|
|
1285
|
+
|
|
1286
|
+
## TaoIcon
|
|
1287
|
+
|
|
1288
|
+
Showcase section: `#icon`
|
|
1289
|
+
|
|
1290
|
+
| Prop | Type | Default | Notes |
|
|
1291
|
+
|---|---|---|---|
|
|
1292
|
+
| `name` | `string` | — | tao-… is a built-in SVG; a name from registerTaoIcons; any other name is the class icon-{name} of your font. Required |
|
|
1293
|
+
| `size` | `number` | — | Pixels. Without it an SVG icon is 1em (follows the font size) |
|
|
1294
|
+
| `margin` | `string` | '0px' | The outer margin |
|
|
1295
|
+
| `invert` | `boolean` | false | Invert the colour |
|
|
1296
|
+
|
|
1297
|
+
**Slots, events, notes.** #prefix / #postfix — next to the icon. registerTaoIcons({ name: { body, viewBox? } }) adds your own SVGs; the prefix tao- is reserved.
|