tutuca 0.11.2 → 0.12.0
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 +130 -104
- package/dist/tutuca-dev.ext.js +121 -90
- package/dist/tutuca-dev.js +121 -90
- package/dist/tutuca-dev.min.js +3 -3
- package/dist/tutuca-extra.ext.js +116 -59
- package/dist/tutuca-extra.js +116 -59
- package/dist/tutuca-extra.min.js +2 -2
- package/dist/tutuca-storybook.js +3 -3
- package/dist/tutuca.ext.js +116 -59
- package/dist/tutuca.js +116 -59
- package/dist/tutuca.min.js +2 -2
- package/package.json +1 -1
- package/skill/margaui/SKILL.md +105 -0
- package/skill/margaui/components/accordion.md +127 -0
- package/skill/margaui/components/alert.md +174 -0
- package/skill/margaui/components/aura.md +97 -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/megamenu.md +131 -0
- package/skill/margaui/components/menu.md +887 -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 +196 -0
- package/skill/margaui/components/navbar.md +282 -0
- package/skill/margaui/components/otp.md +171 -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/tutuca/SKILL.md +56 -0
- package/skill/tutuca/advanced.md +212 -0
- package/skill/tutuca/cli.md +239 -0
- package/skill/tutuca/component-design.md +168 -0
- package/skill/tutuca/core.md +918 -0
- package/skill/tutuca/iteration.md +207 -0
- package/skill/tutuca/macros.md +86 -0
- package/skill/tutuca/margaui.md +175 -0
- package/skill/tutuca/messages-and-intents.md +399 -0
- package/skill/tutuca/patterns/README.md +48 -0
- package/skill/tutuca/patterns/add-a-story.md +26 -0
- package/skill/tutuca/patterns/bind-text-and-attributes.md +30 -0
- package/skill/tutuca/patterns/conditional-attribute-value.md +29 -0
- package/skill/tutuca/patterns/coordinate-components.md +54 -0
- package/skill/tutuca/patterns/edit-through-a-dynamic-target.md +27 -0
- package/skill/tutuca/patterns/enrich-each-item.md +25 -0
- package/skill/tutuca/patterns/file-input.md +39 -0
- package/skill/tutuca/patterns/filter-a-list.md +25 -0
- package/skill/tutuca/patterns/filter-and-paginate.md +60 -0
- package/skill/tutuca/patterns/handle-events.md +44 -0
- package/skill/tutuca/patterns/iterate-a-list.md +18 -0
- package/skill/tutuca/patterns/paginate-a-list.md +29 -0
- package/skill/tutuca/patterns/render-a-child-component.md +21 -0
- package/skill/tutuca/patterns/reuse-markup-with-macros.md +36 -0
- package/skill/tutuca/patterns/share-state-across-the-tree.md +38 -0
- package/skill/tutuca/patterns/show-or-hide-content.md +23 -0
- package/skill/tutuca/patterns/switch-between-views.md +30 -0
- package/skill/tutuca/patterns/tabbed-interface.md +43 -0
- package/skill/tutuca/semantics.md +195 -0
- package/skill/tutuca/storybook.md +270 -0
- package/skill/tutuca/styles.md +48 -0
- package/skill/tutuca/testing.md +345 -0
- package/skill/tutuca-source/SKILL.md +33 -0
- package/skill/tutuca-source/tutuca.ext.js +4301 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# swap
|
|
2
|
+
|
|
3
|
+
_toggle between two children (icon swap, hamburger)_
|
|
4
|
+
|
|
5
|
+
## What it does
|
|
6
|
+
|
|
7
|
+
Toggle between two child elements driven by a checkbox or class.
|
|
8
|
+
|
|
9
|
+
## When to use
|
|
10
|
+
|
|
11
|
+
- Theme toggles, hamburger ↔ close icons, play ↔ pause.
|
|
12
|
+
|
|
13
|
+
## Core classes
|
|
14
|
+
|
|
15
|
+
`swap`; effect `swap-rotate|flip|active`; inner `swap-on`, `swap-off`.
|
|
16
|
+
|
|
17
|
+
## Examples
|
|
18
|
+
|
|
19
|
+
### Activate using class name instead of checkbox
|
|
20
|
+
|
|
21
|
+
Source: `playground/components/swap/activate-using-class-name-instead-of-checkbox.html`
|
|
22
|
+
|
|
23
|
+
```html
|
|
24
|
+
<label class="swap text-6xl">
|
|
25
|
+
<div class="swap-on">🥵</div>
|
|
26
|
+
<div class="swap-off">🥶</div>
|
|
27
|
+
</label>
|
|
28
|
+
<label class="swap swap-active text-6xl">
|
|
29
|
+
<div class="swap-on">🥳</div>
|
|
30
|
+
<div class="swap-off">😭</div>
|
|
31
|
+
</label>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Hamburger button
|
|
35
|
+
|
|
36
|
+
Source: `playground/components/swap/hamburger-button.html`
|
|
37
|
+
|
|
38
|
+
```html
|
|
39
|
+
<label class="btn btn-circle swap swap-rotate">
|
|
40
|
+
<!-- this hidden checkbox controls the state -->
|
|
41
|
+
<input type="checkbox" />
|
|
42
|
+
|
|
43
|
+
<!-- hamburger icon -->
|
|
44
|
+
<svg
|
|
45
|
+
class="swap-off fill-current"
|
|
46
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
47
|
+
width="32"
|
|
48
|
+
height="32"
|
|
49
|
+
viewBox="0 0 512 512">
|
|
50
|
+
<path d="M64,384H448V341.33H64Zm0-106.67H448V234.67H64ZM64,128v42.67H448V128Z" />
|
|
51
|
+
</svg>
|
|
52
|
+
|
|
53
|
+
<!-- close icon -->
|
|
54
|
+
<svg
|
|
55
|
+
class="swap-on fill-current"
|
|
56
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
57
|
+
width="32"
|
|
58
|
+
height="32"
|
|
59
|
+
viewBox="0 0 512 512">
|
|
60
|
+
<polygon
|
|
61
|
+
points="400 145.49 366.51 112 256 222.51 145.49 112 112 145.49 222.51 256 112 366.51 145.49 400 256 289.49 366.51 400 400 366.51 289.49 256 400 145.49" />
|
|
62
|
+
</svg>
|
|
63
|
+
</label>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Swap icons with flip effect
|
|
67
|
+
|
|
68
|
+
Source: `playground/components/swap/swap-icons-with-flip-effect.html`
|
|
69
|
+
|
|
70
|
+
```html
|
|
71
|
+
<label class="swap swap-flip text-9xl">
|
|
72
|
+
<!-- this hidden checkbox controls the state -->
|
|
73
|
+
<input type="checkbox" />
|
|
74
|
+
|
|
75
|
+
<div class="swap-on">😈</div>
|
|
76
|
+
<div class="swap-off">😇</div>
|
|
77
|
+
</label>
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Swap icons with rotate effect
|
|
81
|
+
|
|
82
|
+
Source: `playground/components/swap/swap-icons-with-rotate-effect.html`
|
|
83
|
+
|
|
84
|
+
```html
|
|
85
|
+
<label class="swap swap-rotate">
|
|
86
|
+
<!-- this hidden checkbox controls the state -->
|
|
87
|
+
<input type="checkbox" />
|
|
88
|
+
|
|
89
|
+
<!-- sun icon -->
|
|
90
|
+
<svg
|
|
91
|
+
class="swap-on h-10 w-10 fill-current"
|
|
92
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
93
|
+
viewBox="0 0 24 24">
|
|
94
|
+
<path
|
|
95
|
+
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" />
|
|
96
|
+
</svg>
|
|
97
|
+
|
|
98
|
+
<!-- moon icon -->
|
|
99
|
+
<svg
|
|
100
|
+
class="swap-off h-10 w-10 fill-current"
|
|
101
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
102
|
+
viewBox="0 0 24 24">
|
|
103
|
+
<path
|
|
104
|
+
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" />
|
|
105
|
+
</svg>
|
|
106
|
+
</label>
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Swap text
|
|
110
|
+
|
|
111
|
+
Source: `playground/components/swap/swap-text.html`
|
|
112
|
+
|
|
113
|
+
```html
|
|
114
|
+
<label class="swap">
|
|
115
|
+
<input type="checkbox" />
|
|
116
|
+
<div class="swap-on">ON</div>
|
|
117
|
+
<div class="swap-off">OFF</div>
|
|
118
|
+
</label>
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Swap volume icons
|
|
122
|
+
|
|
123
|
+
Source: `playground/components/swap/swap-volume-icons.html`
|
|
124
|
+
|
|
125
|
+
```html
|
|
126
|
+
<label class="swap">
|
|
127
|
+
<!-- this hidden checkbox controls the state -->
|
|
128
|
+
<input type="checkbox" />
|
|
129
|
+
|
|
130
|
+
<!-- volume on icon -->
|
|
131
|
+
<svg
|
|
132
|
+
class="swap-on fill-current"
|
|
133
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
134
|
+
width="48"
|
|
135
|
+
height="48"
|
|
136
|
+
viewBox="0 0 24 24">
|
|
137
|
+
<path
|
|
138
|
+
d="M14,3.23V5.29C16.89,6.15 19,8.83 19,12C19,15.17 16.89,17.84 14,18.7V20.77C18,19.86 21,16.28 21,12C21,7.72 18,4.14 14,3.23M16.5,12C16.5,10.23 15.5,8.71 14,7.97V16C15.5,15.29 16.5,13.76 16.5,12M3,9V15H7L12,20V4L7,9H3Z" />
|
|
139
|
+
</svg>
|
|
140
|
+
|
|
141
|
+
<!-- volume off icon -->
|
|
142
|
+
<svg
|
|
143
|
+
class="swap-off fill-current"
|
|
144
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
145
|
+
width="48"
|
|
146
|
+
height="48"
|
|
147
|
+
viewBox="0 0 24 24">
|
|
148
|
+
<path
|
|
149
|
+
d="M3,9H7L12,4V20L7,15H3V9M16.59,12L14,9.41L15.41,8L18,10.59L20.59,8L22,9.41L19.41,12L22,14.59L20.59,16L18,13.41L15.41,16L14,14.59L16.59,12Z" />
|
|
150
|
+
</svg>
|
|
151
|
+
</label>
|
|
152
|
+
```
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
# tab
|
|
2
|
+
|
|
3
|
+
_tabbed content (radio inputs or anchors)_
|
|
4
|
+
|
|
5
|
+
## What it does
|
|
6
|
+
|
|
7
|
+
Tab strip — radio-driven (CSS-only, supports content panels per tab) or anchor-driven (just visual styling).
|
|
8
|
+
|
|
9
|
+
## When to use
|
|
10
|
+
|
|
11
|
+
- Section switchers within a page.
|
|
12
|
+
|
|
13
|
+
## Core classes
|
|
14
|
+
|
|
15
|
+
`tabs`; style `tabs-box|border|lift`; size `tabs-xs|sm|md|lg|xl`; child `tab`, `tab-active`; content `tab-content`.
|
|
16
|
+
|
|
17
|
+
## Examples
|
|
18
|
+
|
|
19
|
+
### Radio tabs border — tab content
|
|
20
|
+
|
|
21
|
+
Source: `playground/components/tab/radio-tabs-border--tab-content.html`
|
|
22
|
+
|
|
23
|
+
```html
|
|
24
|
+
<!-- name of each tab group should be unique -->
|
|
25
|
+
<div class="tabs tabs-border">
|
|
26
|
+
<input type="radio" name="my_tabs_2" class="tab" aria-label="Tab 1" />
|
|
27
|
+
<div class="tab-content border-base-300 bg-base-100 p-10">Tab content 1</div>
|
|
28
|
+
|
|
29
|
+
<input type="radio" name="my_tabs_2" class="tab" aria-label="Tab 2" checked="checked" />
|
|
30
|
+
<div class="tab-content border-base-300 bg-base-100 p-10">Tab content 2</div>
|
|
31
|
+
|
|
32
|
+
<input type="radio" name="my_tabs_2" class="tab" aria-label="Tab 3" />
|
|
33
|
+
<div class="tab-content border-base-300 bg-base-100 p-10">Tab content 3</div>
|
|
34
|
+
</div>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Radio tabs box — tab content
|
|
38
|
+
|
|
39
|
+
Source: `playground/components/tab/radio-tabs-box--tab-content.html`
|
|
40
|
+
|
|
41
|
+
```html
|
|
42
|
+
<!-- name of each tab group should be unique -->
|
|
43
|
+
<div class="tabs tabs-box">
|
|
44
|
+
<input type="radio" name="my_tabs_6" class="tab" aria-label="Tab 1" />
|
|
45
|
+
<div class="tab-content bg-base-100 border-base-300 p-6">Tab content 1</div>
|
|
46
|
+
|
|
47
|
+
<input type="radio" name="my_tabs_6" class="tab" aria-label="Tab 2" checked="checked" />
|
|
48
|
+
<div class="tab-content bg-base-100 border-base-300 p-6">Tab content 2</div>
|
|
49
|
+
|
|
50
|
+
<input type="radio" name="my_tabs_6" class="tab" aria-label="Tab 3" />
|
|
51
|
+
<div class="tab-content bg-base-100 border-base-300 p-6">Tab content 3</div>
|
|
52
|
+
</div>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Radio tabs lift — tab content on bottom
|
|
56
|
+
|
|
57
|
+
Source: `playground/components/tab/radio-tabs-lift--tab-content-on-bottom.html`
|
|
58
|
+
|
|
59
|
+
```html
|
|
60
|
+
<!-- name of each tab group should be unique -->
|
|
61
|
+
<div class="tabs tabs-lift tabs-bottom">
|
|
62
|
+
<input type="radio" name="my_tabs_5" class="tab" aria-label="Tab 1" />
|
|
63
|
+
<div class="tab-content bg-base-100 border-base-300 p-6">Tab content 1</div>
|
|
64
|
+
|
|
65
|
+
<input type="radio" name="my_tabs_5" class="tab" aria-label="Tab 2" checked="checked" />
|
|
66
|
+
<div class="tab-content bg-base-100 border-base-300 p-6">Tab content 2</div>
|
|
67
|
+
|
|
68
|
+
<input type="radio" name="my_tabs_5" class="tab" aria-label="Tab 3" />
|
|
69
|
+
<div class="tab-content bg-base-100 border-base-300 p-6">Tab content 3</div>
|
|
70
|
+
</div>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Radio tabs lift — tab content
|
|
74
|
+
|
|
75
|
+
Source: `playground/components/tab/radio-tabs-lift--tab-content.html`
|
|
76
|
+
|
|
77
|
+
```html
|
|
78
|
+
<!-- name of each tab group should be unique -->
|
|
79
|
+
<div class="tabs tabs-lift">
|
|
80
|
+
<input type="radio" name="my_tabs_3" class="tab" aria-label="Tab 1" />
|
|
81
|
+
<div class="tab-content bg-base-100 border-base-300 p-6">Tab content 1</div>
|
|
82
|
+
|
|
83
|
+
<input type="radio" name="my_tabs_3" class="tab" aria-label="Tab 2" checked="checked" />
|
|
84
|
+
<div class="tab-content bg-base-100 border-base-300 p-6">Tab content 2</div>
|
|
85
|
+
|
|
86
|
+
<input type="radio" name="my_tabs_3" class="tab" aria-label="Tab 3" />
|
|
87
|
+
<div class="tab-content bg-base-100 border-base-300 p-6">Tab content 3</div>
|
|
88
|
+
</div>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Radio tabs lift with icons — tab content
|
|
92
|
+
|
|
93
|
+
Source: `playground/components/tab/radio-tabs-lift-with-icons--tab-content.html`
|
|
94
|
+
|
|
95
|
+
```html
|
|
96
|
+
<!-- name of each tab group should be unique -->
|
|
97
|
+
<div class="tabs tabs-lift">
|
|
98
|
+
<label class="tab">
|
|
99
|
+
<input type="radio" name="my_tabs_4" />
|
|
100
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4 me-2"><path stroke-linecap="round" stroke-linejoin="round" d="M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.347a1.125 1.125 0 0 1 0 1.972l-11.54 6.347a1.125 1.125 0 0 1-1.667-.986V5.653Z" /></svg>
|
|
101
|
+
Live
|
|
102
|
+
</label>
|
|
103
|
+
<div class="tab-content bg-base-100 border-base-300 p-6">Tab content 1</div>
|
|
104
|
+
|
|
105
|
+
<label class="tab">
|
|
106
|
+
<input type="radio" name="my_tabs_4" checked="checked" />
|
|
107
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4 me-2"><path stroke-linecap="round" stroke-linejoin="round" d="M15.182 15.182a4.5 4.5 0 0 1-6.364 0M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0ZM9.75 9.75c0 .414-.168.75-.375.75S9 10.164 9 9.75 9.168 9 9.375 9s.375.336.375.75Zm-.375 0h.008v.015h-.008V9.75Zm5.625 0c0 .414-.168.75-.375.75s-.375-.336-.375-.75.168-.75.375-.75.375.336.375.75Zm-.375 0h.008v.015h-.008V9.75Z" /></svg>
|
|
108
|
+
Laugh
|
|
109
|
+
</label>
|
|
110
|
+
<div class="tab-content bg-base-100 border-base-300 p-6">Tab content 2</div>
|
|
111
|
+
|
|
112
|
+
<label class="tab">
|
|
113
|
+
<input type="radio" name="my_tabs_4" />
|
|
114
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4 me-2"><path stroke-linecap="round" stroke-linejoin="round" d="M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733-.715-1.607-2.377-2.733-4.313-2.733C5.1 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12Z" /></svg>
|
|
115
|
+
Love
|
|
116
|
+
</label>
|
|
117
|
+
<div class="tab-content bg-base-100 border-base-300 p-6">Tab content 3</div>
|
|
118
|
+
</div>
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Sizes
|
|
122
|
+
|
|
123
|
+
Source: `playground/components/tab/sizes.html`
|
|
124
|
+
|
|
125
|
+
```html
|
|
126
|
+
|
|
127
|
+
<div role="tablist" class="tabs tabs-lift tabs-xs">
|
|
128
|
+
<a role="tab" class="tab">Xsmall</a>
|
|
129
|
+
<a role="tab" class="tab tab-active">Xsmall</a>
|
|
130
|
+
<a role="tab" class="tab">Xsmall</a>
|
|
131
|
+
</div>
|
|
132
|
+
|
|
133
|
+
<div role="tablist" class="tabs tabs-lift tabs-sm">
|
|
134
|
+
<a role="tab" class="tab">Small</a>
|
|
135
|
+
<a role="tab" class="tab tab-active">Small</a>
|
|
136
|
+
<a role="tab" class="tab">Small</a>
|
|
137
|
+
</div>
|
|
138
|
+
|
|
139
|
+
<div role="tablist" class="tabs tabs-lift">
|
|
140
|
+
<a role="tab" class="tab">Medium</a>
|
|
141
|
+
<a role="tab" class="tab tab-active">Medium</a>
|
|
142
|
+
<a role="tab" class="tab">Medium</a>
|
|
143
|
+
</div>
|
|
144
|
+
|
|
145
|
+
<div role="tablist" class="tabs tabs-lift tabs-lg">
|
|
146
|
+
<a role="tab" class="tab">Large</a>
|
|
147
|
+
<a role="tab" class="tab tab-active">Large</a>
|
|
148
|
+
<a role="tab" class="tab">Large</a>
|
|
149
|
+
</div>
|
|
150
|
+
|
|
151
|
+
<div role="tablist" class="tabs tabs-lift tabs-xl">
|
|
152
|
+
<a role="tab" class="tab">Xlarge</a>
|
|
153
|
+
<a role="tab" class="tab tab-active">Xlarge</a>
|
|
154
|
+
<a role="tab" class="tab">Xlarge</a>
|
|
155
|
+
</div>
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Tabs border
|
|
159
|
+
|
|
160
|
+
Source: `playground/components/tab/tabs-border.html`
|
|
161
|
+
|
|
162
|
+
```html
|
|
163
|
+
<div role="tablist" class="tabs tabs-border">
|
|
164
|
+
<a role="tab" class="tab">Tab 1</a>
|
|
165
|
+
<a role="tab" class="tab tab-active">Tab 2</a>
|
|
166
|
+
<a role="tab" class="tab">Tab 3</a>
|
|
167
|
+
</div>
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### Tabs box using radio inputs
|
|
171
|
+
|
|
172
|
+
Source: `playground/components/tab/tabs-box-using-radio-inputs.html`
|
|
173
|
+
|
|
174
|
+
```html
|
|
175
|
+
<!-- name of each tab group should be unique -->
|
|
176
|
+
<div class="tabs tabs-box">
|
|
177
|
+
<input type="radio" name="my_tabs_1" class="tab" aria-label="Tab 1" />
|
|
178
|
+
<input type="radio" name="my_tabs_1" class="tab" aria-label="Tab 2" checked="checked" />
|
|
179
|
+
<input type="radio" name="my_tabs_1" class="tab" aria-label="Tab 3" />
|
|
180
|
+
</div>
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### Tabs box with a horizontal scroll when theres no space
|
|
184
|
+
|
|
185
|
+
Source: `playground/components/tab/tabs-box-with-a-horizontal-scroll-when-theres-no-space.html`
|
|
186
|
+
|
|
187
|
+
```html
|
|
188
|
+
<div class="overflow-x-auto max-w-60">
|
|
189
|
+
<div class="tabs-lift tabs min-w-max">
|
|
190
|
+
<input type="radio" name="my_tabs_7" class="tab z-1" aria-label="Tab title 1" />
|
|
191
|
+
<div class="sticky start-0 tab-content max-w-60 border-base-300 bg-base-100 p-6">Tab content 1</div>
|
|
192
|
+
<input type="radio" name="my_tabs_7" class="tab z-1" aria-label="Tab title 2" checked="checked" />
|
|
193
|
+
<div class="sticky start-0 tab-content max-w-60 border-base-300 bg-base-100 p-6">Tab content 2</div>
|
|
194
|
+
<input type="radio" name="my_tabs_7" class="tab z-1" aria-label="Tab title 3" />
|
|
195
|
+
<div class="sticky start-0 tab-content max-w-60 border-base-300 bg-base-100 p-6">Tab content 3</div>
|
|
196
|
+
<input type="radio" name="my_tabs_7" class="tab z-1" aria-label="Tab title 4" />
|
|
197
|
+
<div class="sticky start-0 tab-content max-w-60 border-base-300 bg-base-100 p-6">Tab content 4</div>
|
|
198
|
+
</div>
|
|
199
|
+
</div>
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### Tabs box
|
|
203
|
+
|
|
204
|
+
Source: `playground/components/tab/tabs-box.html`
|
|
205
|
+
|
|
206
|
+
```html
|
|
207
|
+
<div role="tablist" class="tabs tabs-box">
|
|
208
|
+
<a role="tab" class="tab">Tab 1</a>
|
|
209
|
+
<a role="tab" class="tab tab-active">Tab 2</a>
|
|
210
|
+
<a role="tab" class="tab">Tab 3</a>
|
|
211
|
+
</div>
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
### Tabs lift
|
|
215
|
+
|
|
216
|
+
Source: `playground/components/tab/tabs-lift.html`
|
|
217
|
+
|
|
218
|
+
```html
|
|
219
|
+
<div role="tablist" class="tabs tabs-lift">
|
|
220
|
+
<a role="tab" class="tab">Tab 1</a>
|
|
221
|
+
<a role="tab" class="tab tab-active">Tab 2</a>
|
|
222
|
+
<a role="tab" class="tab">Tab 3</a>
|
|
223
|
+
</div>
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
### Tabs with custom color
|
|
227
|
+
|
|
228
|
+
Source: `playground/components/tab/tabs-with-custom-color.html`
|
|
229
|
+
|
|
230
|
+
```html
|
|
231
|
+
<div role="tablist" class="tabs tabs-lift">
|
|
232
|
+
<a role="tab" class="tab">Tab 1</a>
|
|
233
|
+
<a role="tab" class="tab tab-active text-primary [--tab-bg:orange] [--tab-border-color:red]"> Tab 2</a>
|
|
234
|
+
<a role="tab" class="tab">Tab 3</a>
|
|
235
|
+
</div>
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
### Tabs
|
|
239
|
+
|
|
240
|
+
Source: `playground/components/tab/tabs.html`
|
|
241
|
+
|
|
242
|
+
```html
|
|
243
|
+
<div role="tablist" class="tabs">
|
|
244
|
+
<a role="tab" class="tab">Tab 1</a>
|
|
245
|
+
<a role="tab" class="tab tab-active">Tab 2</a>
|
|
246
|
+
<a role="tab" class="tab">Tab 3</a>
|
|
247
|
+
</div>
|
|
248
|
+
```
|