tutuca 0.9.39 → 0.9.41
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/dist/tutuca-cli.js +92 -39
- package/dist/tutuca-dev.js +18 -0
- package/dist/tutuca-dev.min.js +1 -1
- package/package.json +6 -7
- package/skill/immutable-js/SKILL.md +79 -0
- package/skill/immutable-js/references/collection.md +346 -0
- package/skill/immutable-js/references/conversions.md +99 -0
- package/skill/immutable-js/references/deep-updates.md +172 -0
- package/skill/immutable-js/references/equality.md +95 -0
- package/skill/immutable-js/references/list.md +266 -0
- package/skill/immutable-js/references/map.md +300 -0
- package/skill/immutable-js/references/predicates.md +93 -0
- package/skill/immutable-js/references/range-repeat.md +55 -0
- package/skill/immutable-js/references/record.md +196 -0
- package/skill/immutable-js/references/seq.md +248 -0
- package/skill/immutable-js/references/set.md +270 -0
- package/skill/immutable-js/references/shallow-functional.md +99 -0
- package/skill/immutable-js/references/stack.md +210 -0
- package/skill/margaui/SKILL.md +101 -0
- package/skill/margaui/components/accordion.md +127 -0
- package/skill/margaui/components/alert.md +174 -0
- package/skill/margaui/components/avatar.md +220 -0
- package/skill/margaui/components/badge.md +193 -0
- package/skill/margaui/components/breadcrumbs.md +103 -0
- package/skill/margaui/components/button.md +322 -0
- package/skill/margaui/components/calendar.md +67 -0
- package/skill/margaui/components/card.md +373 -0
- package/skill/margaui/components/carousel.md +387 -0
- package/skill/margaui/components/chat.md +171 -0
- package/skill/margaui/components/checkbox.md +101 -0
- package/skill/margaui/components/collapse.md +172 -0
- package/skill/margaui/components/countdown.md +165 -0
- package/skill/margaui/components/diff.md +53 -0
- package/skill/margaui/components/divider.md +107 -0
- package/skill/margaui/components/dock.md +173 -0
- package/skill/margaui/components/drawer.md +184 -0
- package/skill/margaui/components/dropdown.md +388 -0
- package/skill/margaui/components/fab.md +346 -0
- package/skill/margaui/components/fieldset.md +88 -0
- package/skill/margaui/components/file-input.md +84 -0
- package/skill/margaui/components/filter.md +52 -0
- package/skill/margaui/components/footer.md +583 -0
- package/skill/margaui/components/hero.md +135 -0
- package/skill/margaui/components/hover-3d.md +129 -0
- package/skill/margaui/components/hover-gallery.md +49 -0
- package/skill/margaui/components/indicator.md +265 -0
- package/skill/margaui/components/input.md +389 -0
- package/skill/margaui/components/join.md +100 -0
- package/skill/margaui/components/kbd.md +127 -0
- package/skill/margaui/components/label.md +102 -0
- package/skill/margaui/components/link.md +96 -0
- package/skill/margaui/components/list.md +182 -0
- package/skill/margaui/components/loading.md +105 -0
- package/skill/margaui/components/mask.md +168 -0
- package/skill/margaui/components/menu.md +856 -0
- package/skill/margaui/components/mockup-browser.md +39 -0
- package/skill/margaui/components/mockup-code.md +81 -0
- package/skill/margaui/components/mockup-phone.md +39 -0
- package/skill/margaui/components/mockup-window.md +33 -0
- package/skill/margaui/components/modal.md +178 -0
- package/skill/margaui/components/navbar.md +282 -0
- package/skill/margaui/components/pagination.md +122 -0
- package/skill/margaui/components/progress.md +135 -0
- package/skill/margaui/components/radial-progress.md +67 -0
- package/skill/margaui/components/radio.md +133 -0
- package/skill/margaui/components/range.md +134 -0
- package/skill/margaui/components/rating.md +170 -0
- package/skill/margaui/components/select.md +225 -0
- package/skill/margaui/components/skeleton.md +64 -0
- package/skill/margaui/components/stack.md +142 -0
- package/skill/margaui/components/stat.md +254 -0
- package/skill/margaui/components/status.md +73 -0
- package/skill/margaui/components/steps.md +138 -0
- package/skill/margaui/components/swap.md +152 -0
- package/skill/margaui/components/tab.md +248 -0
- package/skill/margaui/components/table.md +1018 -0
- package/skill/margaui/components/text-rotate.md +91 -0
- package/skill/margaui/components/textarea.md +85 -0
- package/skill/margaui/components/theme-controller.md +266 -0
- package/skill/margaui/components/timeline.md +1356 -0
- package/skill/margaui/components/toast.md +165 -0
- package/skill/margaui/components/toggle.md +135 -0
- package/skill/margaui/components/tooltip.md +181 -0
- package/skill/margaui/components/validator.md +163 -0
- package/skill/{advanced.md → tutuca/advanced.md} +5 -0
- package/skill/{cli.md → tutuca/cli.md} +17 -0
- package/skill/{core.md → tutuca/core.md} +5 -0
- /package/skill/{SKILL.md → tutuca/SKILL.md} +0 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# text-rotate
|
|
2
|
+
|
|
3
|
+
_cycle through words in place (CSS animation)_
|
|
4
|
+
|
|
5
|
+
## What it does
|
|
6
|
+
|
|
7
|
+
CSS-only animated text that cycles through a list of words/phrases.
|
|
8
|
+
|
|
9
|
+
## When to use
|
|
10
|
+
|
|
11
|
+
- Marketing headlines ("build {fast|easy|cheap} apps").
|
|
12
|
+
|
|
13
|
+
## Examples
|
|
14
|
+
|
|
15
|
+
### Text rotate
|
|
16
|
+
|
|
17
|
+
Source: `playground/components/text-rotate/text-rotate.html`
|
|
18
|
+
|
|
19
|
+
```html
|
|
20
|
+
<span class="text-rotate">
|
|
21
|
+
<span>
|
|
22
|
+
<span>ONE</span>
|
|
23
|
+
<span>TWO</span>
|
|
24
|
+
<span>THREE</span>
|
|
25
|
+
</span>
|
|
26
|
+
</span>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Custom line height
|
|
30
|
+
|
|
31
|
+
Source: `playground/components/text-rotate/custom-line-height.html`
|
|
32
|
+
|
|
33
|
+
```html
|
|
34
|
+
<span class="text-rotate text-7xl leading-[2]">
|
|
35
|
+
<span class="justify-items-center">
|
|
36
|
+
<span>📐 DESIGN</span>
|
|
37
|
+
<span>⌨️ DEVELOP</span>
|
|
38
|
+
<span>🌎 DEPLOY</span>
|
|
39
|
+
<span>🌱 SCALE</span>
|
|
40
|
+
<span>🔧 MAINTAIN</span>
|
|
41
|
+
<span>♻️ REPEAT</span>
|
|
42
|
+
</span>
|
|
43
|
+
</span>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Rotating 3 words with custom duration
|
|
47
|
+
|
|
48
|
+
Source: `playground/components/text-rotate/rotating-3-words-with-custom-duration.html`
|
|
49
|
+
|
|
50
|
+
```html
|
|
51
|
+
<span class="text-rotate text-7xl duration-6000">
|
|
52
|
+
<span class="justify-items-center">
|
|
53
|
+
<span>BLAZING</span>
|
|
54
|
+
<span class="font-bold italic px-2">FAST ▶︎▶︎</span>
|
|
55
|
+
</span>
|
|
56
|
+
</span>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Rotating 6 words
|
|
60
|
+
|
|
61
|
+
Source: `playground/components/text-rotate/rotating-6-words.html`
|
|
62
|
+
|
|
63
|
+
```html
|
|
64
|
+
<span class="text-rotate text-7xl">
|
|
65
|
+
<span class="justify-items-center">
|
|
66
|
+
<span>DESIGN</span>
|
|
67
|
+
<span>DEVELOP</span>
|
|
68
|
+
<span>DEPLOY</span>
|
|
69
|
+
<span>SCALE</span>
|
|
70
|
+
<span>MAINTAIN</span>
|
|
71
|
+
<span>REPEAT</span>
|
|
72
|
+
</span>
|
|
73
|
+
</span>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Rotating words in a sentence
|
|
77
|
+
|
|
78
|
+
Source: `playground/components/text-rotate/rotating-words-in-a-sentence.html`
|
|
79
|
+
|
|
80
|
+
```html
|
|
81
|
+
<span>
|
|
82
|
+
Providing AI Agents for
|
|
83
|
+
<span class="text-rotate">
|
|
84
|
+
<span>
|
|
85
|
+
<span class="bg-teal-400 text-teal-800 px-2">Designers</span>
|
|
86
|
+
<span class="bg-red-400 text-red-800 px-2">Developers</span>
|
|
87
|
+
<span class="bg-blue-400 text-blue-800 px-2">Managers</span>
|
|
88
|
+
</span>
|
|
89
|
+
</span>
|
|
90
|
+
</span>
|
|
91
|
+
```
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# textarea
|
|
2
|
+
|
|
3
|
+
_styled `<textarea>`_
|
|
4
|
+
|
|
5
|
+
## What it does
|
|
6
|
+
|
|
7
|
+
Themed `<textarea>`.
|
|
8
|
+
|
|
9
|
+
## When to use
|
|
10
|
+
|
|
11
|
+
- Multi-line text input.
|
|
12
|
+
- For single-line text input, use **input**.
|
|
13
|
+
|
|
14
|
+
## Core classes
|
|
15
|
+
|
|
16
|
+
`textarea`; color `textarea-primary|…`; style `textarea-ghost`; size `textarea-xs|sm|md|lg|xl`.
|
|
17
|
+
|
|
18
|
+
## Examples
|
|
19
|
+
|
|
20
|
+
### Textarea
|
|
21
|
+
|
|
22
|
+
Source: `playground/components/textarea/textarea.html`
|
|
23
|
+
|
|
24
|
+
```html
|
|
25
|
+
<textarea class="textarea" placeholder="Bio"></textarea>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Disabled
|
|
29
|
+
|
|
30
|
+
Source: `playground/components/textarea/disabled.html`
|
|
31
|
+
|
|
32
|
+
```html
|
|
33
|
+
<textarea class="textarea" placeholder="Bio" disabled></textarea>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Ghost no background
|
|
37
|
+
|
|
38
|
+
Source: `playground/components/textarea/ghost-no-background.html`
|
|
39
|
+
|
|
40
|
+
```html
|
|
41
|
+
<textarea class="textarea textarea-ghost" placeholder="Bio"></textarea>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Sizes
|
|
45
|
+
|
|
46
|
+
Source: `playground/components/textarea/sizes.html`
|
|
47
|
+
|
|
48
|
+
```html
|
|
49
|
+
<textarea placeholder="Bio" class="textarea textarea-xs"></textarea>
|
|
50
|
+
|
|
51
|
+
<textarea placeholder="Bio" class="textarea textarea-sm"></textarea>
|
|
52
|
+
|
|
53
|
+
<textarea placeholder="Bio" class="textarea textarea-md"></textarea>
|
|
54
|
+
|
|
55
|
+
<textarea placeholder="Bio" class="textarea textarea-lg"></textarea>
|
|
56
|
+
|
|
57
|
+
<textarea placeholder="Bio" class="textarea textarea-xl"></textarea>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Textarea colors
|
|
61
|
+
|
|
62
|
+
Source: `playground/components/textarea/textarea-colors.html`
|
|
63
|
+
|
|
64
|
+
```html
|
|
65
|
+
<textarea placeholder="Primary" class="textarea textarea-primary"></textarea>
|
|
66
|
+
<textarea placeholder="Secondary" class="textarea textarea-secondary"></textarea>
|
|
67
|
+
<textarea placeholder="Accent" class="textarea textarea-accent"></textarea>
|
|
68
|
+
<textarea placeholder="Neutral" class="textarea textarea-neutral"></textarea>
|
|
69
|
+
<textarea placeholder="Info" class="textarea textarea-info"></textarea>
|
|
70
|
+
<textarea placeholder="Success" class="textarea textarea-success"></textarea>
|
|
71
|
+
<textarea placeholder="Warning" class="textarea textarea-warning"></textarea>
|
|
72
|
+
<textarea placeholder="Error" class="textarea textarea-error"></textarea>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### With form control and labels
|
|
76
|
+
|
|
77
|
+
Source: `playground/components/textarea/with-form-control-and-labels.html`
|
|
78
|
+
|
|
79
|
+
```html
|
|
80
|
+
<fieldset class="fieldset">
|
|
81
|
+
<legend class="fieldset-legend">Your bio</legend>
|
|
82
|
+
<textarea class="textarea h-24" placeholder="Bio"></textarea>
|
|
83
|
+
<div class="label">Optional</div>
|
|
84
|
+
</fieldset>
|
|
85
|
+
```
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
# theme-controller
|
|
2
|
+
|
|
3
|
+
_checkbox / radio / dropdown that switches `data-theme`_
|
|
4
|
+
|
|
5
|
+
## What it does
|
|
6
|
+
|
|
7
|
+
A control that — when checked — sets `data-theme` on its enclosing `:has(...)` ancestor. CSS-only theme switching.
|
|
8
|
+
|
|
9
|
+
## When to use
|
|
10
|
+
|
|
11
|
+
- Theme switchers (light/dark toggles, dropdown of all themes).
|
|
12
|
+
|
|
13
|
+
## Core classes
|
|
14
|
+
|
|
15
|
+
`theme-controller` on the input/checkbox; the input's `value` becomes the applied theme name.
|
|
16
|
+
|
|
17
|
+
## Examples
|
|
18
|
+
|
|
19
|
+
### Theme controller using a checkbox
|
|
20
|
+
|
|
21
|
+
Source: `playground/components/theme-controller/theme-controller-using-a-checkbox.html`
|
|
22
|
+
|
|
23
|
+
```html
|
|
24
|
+
<input type="checkbox" value="synthwave" class="checkbox theme-controller" />
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Theme controller using a dropdown
|
|
28
|
+
|
|
29
|
+
Source: `playground/components/theme-controller/theme-controller-using-a-dropdown.html`
|
|
30
|
+
|
|
31
|
+
```html
|
|
32
|
+
<div class="dropdown mb-72">
|
|
33
|
+
<div tabindex="0" role="button" class="btn m-1">
|
|
34
|
+
Theme
|
|
35
|
+
<svg
|
|
36
|
+
width="12px"
|
|
37
|
+
height="12px"
|
|
38
|
+
class="inline-block h-2 w-2 fill-current opacity-60"
|
|
39
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
40
|
+
viewBox="0 0 2048 2048">
|
|
41
|
+
<path d="M1799 349l242 241-1017 1017L7 590l242-241 775 775 775-775z"></path>
|
|
42
|
+
</svg>
|
|
43
|
+
</div>
|
|
44
|
+
<ul tabindex="-1" class="dropdown-content bg-base-300 rounded-box z-1 w-52 p-2 shadow-2xl">
|
|
45
|
+
<li>
|
|
46
|
+
<input
|
|
47
|
+
type="radio"
|
|
48
|
+
name="theme-dropdown"
|
|
49
|
+
class="theme-controller w-full btn btn-sm btn-block btn-ghost justify-start"
|
|
50
|
+
aria-label="Default"
|
|
51
|
+
value="default" />
|
|
52
|
+
</li>
|
|
53
|
+
<li>
|
|
54
|
+
<input
|
|
55
|
+
type="radio"
|
|
56
|
+
name="theme-dropdown"
|
|
57
|
+
class="theme-controller w-full btn btn-sm btn-block btn-ghost justify-start"
|
|
58
|
+
aria-label="Retro"
|
|
59
|
+
value="retro" />
|
|
60
|
+
</li>
|
|
61
|
+
<li>
|
|
62
|
+
<input
|
|
63
|
+
type="radio"
|
|
64
|
+
name="theme-dropdown"
|
|
65
|
+
class="theme-controller w-full btn btn-sm btn-block btn-ghost justify-start"
|
|
66
|
+
aria-label="Cyberpunk"
|
|
67
|
+
value="cyberpunk" />
|
|
68
|
+
</li>
|
|
69
|
+
<li>
|
|
70
|
+
<input
|
|
71
|
+
type="radio"
|
|
72
|
+
name="theme-dropdown"
|
|
73
|
+
class="theme-controller w-full btn btn-sm btn-block btn-ghost justify-start"
|
|
74
|
+
aria-label="Valentine"
|
|
75
|
+
value="valentine" />
|
|
76
|
+
</li>
|
|
77
|
+
<li>
|
|
78
|
+
<input
|
|
79
|
+
type="radio"
|
|
80
|
+
name="theme-dropdown"
|
|
81
|
+
class="theme-controller w-full btn btn-sm btn-block btn-ghost justify-start"
|
|
82
|
+
aria-label="Aqua"
|
|
83
|
+
value="aqua" />
|
|
84
|
+
</li>
|
|
85
|
+
</ul>
|
|
86
|
+
</div>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Theme controller using a radio button
|
|
90
|
+
|
|
91
|
+
Source: `playground/components/theme-controller/theme-controller-using-a-radio-button.html`
|
|
92
|
+
|
|
93
|
+
```html
|
|
94
|
+
<div class="join join-vertical">
|
|
95
|
+
<input
|
|
96
|
+
type="radio"
|
|
97
|
+
name="theme-buttons"
|
|
98
|
+
class="btn theme-controller join-item"
|
|
99
|
+
aria-label="Default"
|
|
100
|
+
value="default" />
|
|
101
|
+
<input
|
|
102
|
+
type="radio"
|
|
103
|
+
name="theme-buttons"
|
|
104
|
+
class="btn theme-controller join-item"
|
|
105
|
+
aria-label="Retro"
|
|
106
|
+
value="retro" />
|
|
107
|
+
<input
|
|
108
|
+
type="radio"
|
|
109
|
+
name="theme-buttons"
|
|
110
|
+
class="btn theme-controller join-item"
|
|
111
|
+
aria-label="Cyberpunk"
|
|
112
|
+
value="cyberpunk" />
|
|
113
|
+
<input
|
|
114
|
+
type="radio"
|
|
115
|
+
name="theme-buttons"
|
|
116
|
+
class="btn theme-controller join-item"
|
|
117
|
+
aria-label="Valentine"
|
|
118
|
+
value="valentine" />
|
|
119
|
+
<input
|
|
120
|
+
type="radio"
|
|
121
|
+
name="theme-buttons"
|
|
122
|
+
class="btn theme-controller join-item"
|
|
123
|
+
aria-label="Aqua"
|
|
124
|
+
value="aqua" />
|
|
125
|
+
</div>
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Theme controller using a radio input
|
|
129
|
+
|
|
130
|
+
Source: `playground/components/theme-controller/theme-controller-using-a-radio-input.html`
|
|
131
|
+
|
|
132
|
+
```html
|
|
133
|
+
<fieldset class="fieldset">
|
|
134
|
+
<label class="flex gap-2 cursor-pointer items-center">
|
|
135
|
+
<input type="radio" name="theme-radios" class="radio radio-sm theme-controller" value="default"/>
|
|
136
|
+
Default
|
|
137
|
+
</label>
|
|
138
|
+
<label class="flex gap-2 cursor-pointer items-center">
|
|
139
|
+
<input type="radio" name="theme-radios" class="radio radio-sm theme-controller" value="retro"/>
|
|
140
|
+
Retro
|
|
141
|
+
</label>
|
|
142
|
+
<label class="flex gap-2 cursor-pointer items-center">
|
|
143
|
+
<input type="radio" name="theme-radios" class="radio radio-sm theme-controller" value="cyberpunk"/>
|
|
144
|
+
Cyberpunk
|
|
145
|
+
</label>
|
|
146
|
+
<label class="flex gap-2 cursor-pointer items-center">
|
|
147
|
+
<input type="radio" name="theme-radios" class="radio radio-sm theme-controller" value="valentine"/>
|
|
148
|
+
Valentine
|
|
149
|
+
</label>
|
|
150
|
+
<label class="flex gap-2 cursor-pointer items-center">
|
|
151
|
+
<input type="radio" name="theme-radios" class="radio radio-sm theme-controller" value="aqua"/>
|
|
152
|
+
Aqua
|
|
153
|
+
</label>
|
|
154
|
+
</fieldset>
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### Theme controller using a swap
|
|
158
|
+
|
|
159
|
+
Source: `playground/components/theme-controller/theme-controller-using-a-swap.html`
|
|
160
|
+
|
|
161
|
+
```html
|
|
162
|
+
<label class="swap swap-rotate">
|
|
163
|
+
<!-- this hidden checkbox controls the state -->
|
|
164
|
+
<input type="checkbox" class="theme-controller" value="synthwave" />
|
|
165
|
+
|
|
166
|
+
<!-- sun icon -->
|
|
167
|
+
<svg
|
|
168
|
+
class="swap-off h-10 w-10 fill-current"
|
|
169
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
170
|
+
viewBox="0 0 24 24">
|
|
171
|
+
<path
|
|
172
|
+
d="M5.64,17l-.71.71a1,1,0,0,0,0,1.41,1,1,0,0,0,1.41,0l.71-.71A1,1,0,0,0,5.64,17ZM5,12a1,1,0,0,0-1-1H3a1,1,0,0,0,0,2H4A1,1,0,0,0,5,12Zm7-7a1,1,0,0,0,1-1V3a1,1,0,0,0-2,0V4A1,1,0,0,0,12,5ZM5.64,7.05a1,1,0,0,0,.7.29,1,1,0,0,0,.71-.29,1,1,0,0,0,0-1.41l-.71-.71A1,1,0,0,0,4.93,6.34Zm12,.29a1,1,0,0,0,.7-.29l.71-.71a1,1,0,1,0-1.41-1.41L17,5.64a1,1,0,0,0,0,1.41A1,1,0,0,0,17.66,7.34ZM21,11H20a1,1,0,0,0,0,2h1a1,1,0,0,0,0-2Zm-9,8a1,1,0,0,0-1,1v1a1,1,0,0,0,2,0V20A1,1,0,0,0,12,19ZM18.36,17A1,1,0,0,0,17,18.36l.71.71a1,1,0,0,0,1.41,0,1,1,0,0,0,0-1.41ZM12,6.5A5.5,5.5,0,1,0,17.5,12,5.51,5.51,0,0,0,12,6.5Zm0,9A3.5,3.5,0,1,1,15.5,12,3.5,3.5,0,0,1,12,15.5Z" />
|
|
173
|
+
</svg>
|
|
174
|
+
|
|
175
|
+
<!-- moon icon -->
|
|
176
|
+
<svg
|
|
177
|
+
class="swap-on h-10 w-10 fill-current"
|
|
178
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
179
|
+
viewBox="0 0 24 24">
|
|
180
|
+
<path
|
|
181
|
+
d="M21.64,13a1,1,0,0,0-1.05-.14,8.05,8.05,0,0,1-3.37.73A8.15,8.15,0,0,1,9.08,5.49a8.59,8.59,0,0,1,.25-2A1,1,0,0,0,8,2.36,10.14,10.14,0,1,0,22,14.05,1,1,0,0,0,21.64,13Zm-9.5,6.69A8.14,8.14,0,0,1,7.08,5.22v.27A10.15,10.15,0,0,0,17.22,15.63a9.79,9.79,0,0,0,2.1-.22A8.11,8.11,0,0,1,12.14,19.73Z" />
|
|
182
|
+
</svg>
|
|
183
|
+
</label>
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### Theme controller using a toggle with custom colors
|
|
187
|
+
|
|
188
|
+
Source: `playground/components/theme-controller/theme-controller-using-a-toggle-with-custom-colors.html`
|
|
189
|
+
|
|
190
|
+
```html
|
|
191
|
+
<input
|
|
192
|
+
type="checkbox"
|
|
193
|
+
value="synthwave"
|
|
194
|
+
class="toggle theme-controller col-span-2 col-start-1 row-start-1 border-sky-400 bg-amber-300 [--tglbg:var(--color-sky-500)] checked:border-blue-800 checked:bg-blue-300 checked:[--tglbg:var(--color-blue-900)]" />
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### Theme controller using a toggle with icons inside
|
|
198
|
+
|
|
199
|
+
Source: `playground/components/theme-controller/theme-controller-using-a-toggle-with-icons-inside.html`
|
|
200
|
+
|
|
201
|
+
```html
|
|
202
|
+
<label class="toggle text-base-content">
|
|
203
|
+
<input type="checkbox" value="synthwave" class="theme-controller" />
|
|
204
|
+
|
|
205
|
+
<svg aria-label="sun" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g stroke-linejoin="round" stroke-linecap="round" stroke-width="2" fill="none" stroke="currentColor"><circle cx="12" cy="12" r="4"></circle><path d="M12 2v2"></path><path d="M12 20v2"></path><path d="m4.93 4.93 1.41 1.41"></path><path d="m17.66 17.66 1.41 1.41"></path><path d="M2 12h2"></path><path d="M20 12h2"></path><path d="m6.34 17.66-1.41 1.41"></path><path d="m19.07 4.93-1.41 1.41"></path></g></svg>
|
|
206
|
+
|
|
207
|
+
<svg aria-label="moon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g stroke-linejoin="round" stroke-linecap="round" stroke-width="2" fill="none" stroke="currentColor"><path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"></path></g></svg>
|
|
208
|
+
|
|
209
|
+
</label>
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### Theme controller using a toggle with icons
|
|
213
|
+
|
|
214
|
+
Source: `playground/components/theme-controller/theme-controller-using-a-toggle-with-icons.html`
|
|
215
|
+
|
|
216
|
+
```html
|
|
217
|
+
<label class="flex cursor-pointer gap-2">
|
|
218
|
+
<svg
|
|
219
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
220
|
+
width="20"
|
|
221
|
+
height="20"
|
|
222
|
+
viewBox="0 0 24 24"
|
|
223
|
+
fill="none"
|
|
224
|
+
stroke="currentColor"
|
|
225
|
+
stroke-width="2"
|
|
226
|
+
stroke-linecap="round"
|
|
227
|
+
stroke-linejoin="round">
|
|
228
|
+
<circle cx="12" cy="12" r="5" />
|
|
229
|
+
<path
|
|
230
|
+
d="M12 1v2M12 21v2M4.2 4.2l1.4 1.4M18.4 18.4l1.4 1.4M1 12h2M21 12h2M4.2 19.8l1.4-1.4M18.4 5.6l1.4-1.4" />
|
|
231
|
+
</svg>
|
|
232
|
+
<input type="checkbox" value="synthwave" class="toggle theme-controller" />
|
|
233
|
+
<svg
|
|
234
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
235
|
+
width="20"
|
|
236
|
+
height="20"
|
|
237
|
+
viewBox="0 0 24 24"
|
|
238
|
+
fill="none"
|
|
239
|
+
stroke="currentColor"
|
|
240
|
+
stroke-width="2"
|
|
241
|
+
stroke-linecap="round"
|
|
242
|
+
stroke-linejoin="round">
|
|
243
|
+
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>
|
|
244
|
+
</svg>
|
|
245
|
+
</label>
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
### Theme controller using a toggle with text
|
|
249
|
+
|
|
250
|
+
Source: `playground/components/theme-controller/theme-controller-using-a-toggle-with-text.html`
|
|
251
|
+
|
|
252
|
+
```html
|
|
253
|
+
<label class="flex cursor-pointer gap-2">
|
|
254
|
+
<span class="label-text">Current</span>
|
|
255
|
+
<input type="checkbox" value="synthwave" class="toggle theme-controller" />
|
|
256
|
+
<span class="label-text">Synthwave</span>
|
|
257
|
+
</label>
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
### Theme controller using a toggle
|
|
261
|
+
|
|
262
|
+
Source: `playground/components/theme-controller/theme-controller-using-a-toggle.html`
|
|
263
|
+
|
|
264
|
+
```html
|
|
265
|
+
<input type="checkbox" value="synthwave" class="toggle theme-controller" />
|
|
266
|
+
```
|