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,173 @@
|
|
|
1
|
+
# dock
|
|
2
|
+
|
|
3
|
+
_bottom navigation bar (mobile-style)_
|
|
4
|
+
|
|
5
|
+
## What it does
|
|
6
|
+
|
|
7
|
+
Fixed bottom navigation bar with icon + label items.
|
|
8
|
+
|
|
9
|
+
## When to use
|
|
10
|
+
|
|
11
|
+
- Primary mobile/touch navigation.
|
|
12
|
+
- For top navigation, use **navbar**.
|
|
13
|
+
|
|
14
|
+
## Core classes
|
|
15
|
+
|
|
16
|
+
`dock`; size `dock-xs|sm|md|lg|xl`; active item `dock-active`; inner `dock-label`.
|
|
17
|
+
|
|
18
|
+
## Examples
|
|
19
|
+
|
|
20
|
+
### Dock
|
|
21
|
+
|
|
22
|
+
Source: `playground/components/dock/dock.html`
|
|
23
|
+
|
|
24
|
+
```html
|
|
25
|
+
<div class="dock">
|
|
26
|
+
<button>
|
|
27
|
+
<svg class="size-[1.2em]" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="currentColor" stroke-linejoin="miter" stroke-linecap="butt"><polyline points="1 11 12 2 23 11" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="2"></polyline><path d="m5,13v7c0,1.105.895,2,2,2h10c1.105,0,2-.895,2-2v-7" fill="none" stroke="currentColor" stroke-linecap="square" stroke-miterlimit="10" stroke-width="2"></path><line x1="12" y1="22" x2="12" y2="18" fill="none" stroke="currentColor" stroke-linecap="square" stroke-miterlimit="10" stroke-width="2"></line></g></svg>
|
|
28
|
+
<span class="dock-label">Home</span>
|
|
29
|
+
</button>
|
|
30
|
+
|
|
31
|
+
<button class="dock-active">
|
|
32
|
+
<svg class="size-[1.2em]" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="currentColor" stroke-linejoin="miter" stroke-linecap="butt"><polyline points="3 14 9 14 9 17 15 17 15 14 21 14" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="2"></polyline><rect x="3" y="3" width="18" height="18" rx="2" ry="2" fill="none" stroke="currentColor" stroke-linecap="square" stroke-miterlimit="10" stroke-width="2"></rect></g></svg>
|
|
33
|
+
<span class="dock-label">Inbox</span>
|
|
34
|
+
</button>
|
|
35
|
+
|
|
36
|
+
<button>
|
|
37
|
+
<svg class="size-[1.2em]" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="currentColor" stroke-linejoin="miter" stroke-linecap="butt"><circle cx="12" cy="12" r="3" fill="none" stroke="currentColor" stroke-linecap="square" stroke-miterlimit="10" stroke-width="2"></circle><path d="m22,13.25v-2.5l-2.318-.966c-.167-.581-.395-1.135-.682-1.654l.954-2.318-1.768-1.768-2.318.954c-.518-.287-1.073-.515-1.654-.682l-.966-2.318h-2.5l-.966,2.318c-.581.167-1.135.395-1.654.682l-2.318-.954-1.768,1.768.954,2.318c-.287.518-.515,1.073-.682,1.654l-2.318.966v2.5l2.318.966c.167.581.395,1.135.682,1.654l-.954,2.318,1.768,1.768,2.318-.954c.518.287,1.073.515,1.654.682l.966,2.318h2.5l.966-2.318c.581-.167,1.135-.395,1.654-.682l2.318.954,1.768-1.768-.954-2.318c.287-.518.515-1.073.682-1.654l2.318-.966Z" fill="none" stroke="currentColor" stroke-linecap="square" stroke-miterlimit="10" stroke-width="2"></path></g></svg>
|
|
38
|
+
<span class="dock-label">Settings</span>
|
|
39
|
+
</button>
|
|
40
|
+
</div>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Dock extra large size
|
|
44
|
+
|
|
45
|
+
Source: `playground/components/dock/dock-extra-large-size.html`
|
|
46
|
+
|
|
47
|
+
```html
|
|
48
|
+
<div class="dock dock-xl">
|
|
49
|
+
<button>
|
|
50
|
+
<svg class="size-[1.2em]" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="currentColor" stroke-linejoin="miter" stroke-linecap="butt"><polyline points="1 11 12 2 23 11" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="2"></polyline><path d="m5,13v7c0,1.105.895,2,2,2h10c1.105,0,2-.895,2-2v-7" fill="none" stroke="currentColor" stroke-linecap="square" stroke-miterlimit="10" stroke-width="2"></path><line x1="12" y1="22" x2="12" y2="18" fill="none" stroke="currentColor" stroke-linecap="square" stroke-miterlimit="10" stroke-width="2"></line></g></svg>
|
|
51
|
+
<span class="dock-label">Home</span>
|
|
52
|
+
</button>
|
|
53
|
+
|
|
54
|
+
<button class="dock-active">
|
|
55
|
+
<svg class="size-[1.2em]" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="currentColor" stroke-linejoin="miter" stroke-linecap="butt"><polyline points="3 14 9 14 9 17 15 17 15 14 21 14" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="2"></polyline><rect x="3" y="3" width="18" height="18" rx="2" ry="2" fill="none" stroke="currentColor" stroke-linecap="square" stroke-miterlimit="10" stroke-width="2"></rect></g></svg>
|
|
56
|
+
<span class="dock-label">Inbox</span>
|
|
57
|
+
</button>
|
|
58
|
+
|
|
59
|
+
<button>
|
|
60
|
+
<svg class="size-[1.2em]" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="currentColor" stroke-linejoin="miter" stroke-linecap="butt"><circle cx="12" cy="12" r="3" fill="none" stroke="currentColor" stroke-linecap="square" stroke-miterlimit="10" stroke-width="2"></circle><path d="m22,13.25v-2.5l-2.318-.966c-.167-.581-.395-1.135-.682-1.654l.954-2.318-1.768-1.768-2.318.954c-.518-.287-1.073-.515-1.654-.682l-.966-2.318h-2.5l-.966,2.318c-.581.167-1.135.395-1.654.682l-2.318-.954-1.768,1.768.954,2.318c-.287.518-.515,1.073-.682,1.654l-2.318.966v2.5l2.318.966c.167.581.395,1.135.682,1.654l-.954,2.318,1.768,1.768,2.318-.954c.518.287,1.073.515,1.654.682l.966,2.318h2.5l.966-2.318c.581-.167,1.135-.395,1.654-.682l2.318.954,1.768-1.768-.954-2.318c.287-.518.515-1.073.682-1.654l2.318-.966Z" fill="none" stroke="currentColor" stroke-linecap="square" stroke-miterlimit="10" stroke-width="2"></path></g></svg>
|
|
61
|
+
<span class="dock-label">Settings</span>
|
|
62
|
+
</button>
|
|
63
|
+
</div>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Dock extra small size
|
|
67
|
+
|
|
68
|
+
Source: `playground/components/dock/dock-extra-small-size.html`
|
|
69
|
+
|
|
70
|
+
```html
|
|
71
|
+
<div class="dock dock-xs">
|
|
72
|
+
<button>
|
|
73
|
+
<svg class="size-[1.2em]" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="currentColor" stroke-linejoin="miter" stroke-linecap="butt"><polyline points="1 11 12 2 23 11" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="2"></polyline><path d="m5,13v7c0,1.105.895,2,2,2h10c1.105,0,2-.895,2-2v-7" fill="none" stroke="currentColor" stroke-linecap="square" stroke-miterlimit="10" stroke-width="2"></path><line x1="12" y1="22" x2="12" y2="18" fill="none" stroke="currentColor" stroke-linecap="square" stroke-miterlimit="10" stroke-width="2"></line></g></svg>
|
|
74
|
+
</button>
|
|
75
|
+
|
|
76
|
+
<button class="dock-active">
|
|
77
|
+
<svg class="size-[1.2em]" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="currentColor" stroke-linejoin="miter" stroke-linecap="butt"><polyline points="3 14 9 14 9 17 15 17 15 14 21 14" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="2"></polyline><rect x="3" y="3" width="18" height="18" rx="2" ry="2" fill="none" stroke="currentColor" stroke-linecap="square" stroke-miterlimit="10" stroke-width="2"></rect></g></svg>
|
|
78
|
+
</button>
|
|
79
|
+
|
|
80
|
+
<button>
|
|
81
|
+
<svg class="size-[1.2em]" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="currentColor" stroke-linejoin="miter" stroke-linecap="butt"><circle cx="12" cy="12" r="3" fill="none" stroke="currentColor" stroke-linecap="square" stroke-miterlimit="10" stroke-width="2"></circle><path d="m22,13.25v-2.5l-2.318-.966c-.167-.581-.395-1.135-.682-1.654l.954-2.318-1.768-1.768-2.318.954c-.518-.287-1.073-.515-1.654-.682l-.966-2.318h-2.5l-.966,2.318c-.581.167-1.135.395-1.654.682l-2.318-.954-1.768,1.768.954,2.318c-.287.518-.515,1.073-.682,1.654l-2.318.966v2.5l2.318.966c.167.581.395,1.135.682,1.654l-.954,2.318,1.768,1.768,2.318-.954c.518.287,1.073.515,1.654.682l.966,2.318h2.5l.966-2.318c.581-.167,1.135-.395,1.654-.682l2.318.954,1.768-1.768-.954-2.318c.287-.518.515-1.073.682-1.654l2.318-.966Z" fill="none" stroke="currentColor" stroke-linecap="square" stroke-miterlimit="10" stroke-width="2"></path></g></svg>
|
|
82
|
+
</button>
|
|
83
|
+
</div>
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Dock large size
|
|
87
|
+
|
|
88
|
+
Source: `playground/components/dock/dock-large-size.html`
|
|
89
|
+
|
|
90
|
+
```html
|
|
91
|
+
<div class="dock dock-lg">
|
|
92
|
+
<button>
|
|
93
|
+
<svg class="size-[1.2em]" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="currentColor" stroke-linejoin="miter" stroke-linecap="butt"><polyline points="1 11 12 2 23 11" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="2"></polyline><path d="m5,13v7c0,1.105.895,2,2,2h10c1.105,0,2-.895,2-2v-7" fill="none" stroke="currentColor" stroke-linecap="square" stroke-miterlimit="10" stroke-width="2"></path><line x1="12" y1="22" x2="12" y2="18" fill="none" stroke="currentColor" stroke-linecap="square" stroke-miterlimit="10" stroke-width="2"></line></g></svg>
|
|
94
|
+
<span class="dock-label">Home</span>
|
|
95
|
+
</button>
|
|
96
|
+
|
|
97
|
+
<button class="dock-active">
|
|
98
|
+
<svg class="size-[1.2em]" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="currentColor" stroke-linejoin="miter" stroke-linecap="butt"><polyline points="3 14 9 14 9 17 15 17 15 14 21 14" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="2"></polyline><rect x="3" y="3" width="18" height="18" rx="2" ry="2" fill="none" stroke="currentColor" stroke-linecap="square" stroke-miterlimit="10" stroke-width="2"></rect></g></svg>
|
|
99
|
+
<span class="dock-label">Inbox</span>
|
|
100
|
+
</button>
|
|
101
|
+
|
|
102
|
+
<button>
|
|
103
|
+
<svg class="size-[1.2em]" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="currentColor" stroke-linejoin="miter" stroke-linecap="butt"><circle cx="12" cy="12" r="3" fill="none" stroke="currentColor" stroke-linecap="square" stroke-miterlimit="10" stroke-width="2"></circle><path d="m22,13.25v-2.5l-2.318-.966c-.167-.581-.395-1.135-.682-1.654l.954-2.318-1.768-1.768-2.318.954c-.518-.287-1.073-.515-1.654-.682l-.966-2.318h-2.5l-.966,2.318c-.581.167-1.135.395-1.654.682l-2.318-.954-1.768,1.768.954,2.318c-.287.518-.515,1.073-.682,1.654l-2.318.966v2.5l2.318.966c.167.581.395,1.135.682,1.654l-.954,2.318,1.768,1.768,2.318-.954c.518.287,1.073.515,1.654.682l.966,2.318h2.5l.966-2.318c.581-.167,1.135-.395,1.654-.682l2.318.954,1.768-1.768-.954-2.318c.287-.518.515-1.073.682-1.654l2.318-.966Z" fill="none" stroke="currentColor" stroke-linecap="square" stroke-miterlimit="10" stroke-width="2"></path></g></svg>
|
|
104
|
+
<span class="dock-label">Settings</span>
|
|
105
|
+
</button>
|
|
106
|
+
</div>
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Dock medium size
|
|
110
|
+
|
|
111
|
+
Source: `playground/components/dock/dock-medium-size.html`
|
|
112
|
+
|
|
113
|
+
```html
|
|
114
|
+
<div class="dock dock-md">
|
|
115
|
+
<button>
|
|
116
|
+
<svg class="size-[1.2em]" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="currentColor" stroke-linejoin="miter" stroke-linecap="butt"><polyline points="1 11 12 2 23 11" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="2"></polyline><path d="m5,13v7c0,1.105.895,2,2,2h10c1.105,0,2-.895,2-2v-7" fill="none" stroke="currentColor" stroke-linecap="square" stroke-miterlimit="10" stroke-width="2"></path><line x1="12" y1="22" x2="12" y2="18" fill="none" stroke="currentColor" stroke-linecap="square" stroke-miterlimit="10" stroke-width="2"></line></g></svg>
|
|
117
|
+
<span class="dock-label">Home</span>
|
|
118
|
+
</button>
|
|
119
|
+
|
|
120
|
+
<button class="dock-active">
|
|
121
|
+
<svg class="size-[1.2em]" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="currentColor" stroke-linejoin="miter" stroke-linecap="butt"><polyline points="3 14 9 14 9 17 15 17 15 14 21 14" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="2"></polyline><rect x="3" y="3" width="18" height="18" rx="2" ry="2" fill="none" stroke="currentColor" stroke-linecap="square" stroke-miterlimit="10" stroke-width="2"></rect></g></svg>
|
|
122
|
+
<span class="dock-label">Inbox</span>
|
|
123
|
+
</button>
|
|
124
|
+
|
|
125
|
+
<button>
|
|
126
|
+
<svg class="size-[1.2em]" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="currentColor" stroke-linejoin="miter" stroke-linecap="butt"><circle cx="12" cy="12" r="3" fill="none" stroke="currentColor" stroke-linecap="square" stroke-miterlimit="10" stroke-width="2"></circle><path d="m22,13.25v-2.5l-2.318-.966c-.167-.581-.395-1.135-.682-1.654l.954-2.318-1.768-1.768-2.318.954c-.518-.287-1.073-.515-1.654-.682l-.966-2.318h-2.5l-.966,2.318c-.581.167-1.135.395-1.654.682l-2.318-.954-1.768,1.768.954,2.318c-.287.518-.515,1.073-.682,1.654l-2.318.966v2.5l2.318.966c.167.581.395,1.135.682,1.654l-.954,2.318,1.768,1.768,2.318-.954c.518.287,1.073.515,1.654.682l.966,2.318h2.5l.966-2.318c.581-.167,1.135-.395,1.654-.682l2.318.954,1.768-1.768-.954-2.318c.287-.518.515-1.073.682-1.654l2.318-.966Z" fill="none" stroke="currentColor" stroke-linecap="square" stroke-miterlimit="10" stroke-width="2"></path></g></svg>
|
|
127
|
+
<span class="dock-label">Settings</span>
|
|
128
|
+
</button>
|
|
129
|
+
</div>
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Dock small size
|
|
133
|
+
|
|
134
|
+
Source: `playground/components/dock/dock-small-size.html`
|
|
135
|
+
|
|
136
|
+
```html
|
|
137
|
+
<div class="dock dock-sm">
|
|
138
|
+
<button>
|
|
139
|
+
<svg class="size-[1.2em]" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="currentColor" stroke-linejoin="miter" stroke-linecap="butt"><polyline points="1 11 12 2 23 11" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="2"></polyline><path d="m5,13v7c0,1.105.895,2,2,2h10c1.105,0,2-.895,2-2v-7" fill="none" stroke="currentColor" stroke-linecap="square" stroke-miterlimit="10" stroke-width="2"></path><line x1="12" y1="22" x2="12" y2="18" fill="none" stroke="currentColor" stroke-linecap="square" stroke-miterlimit="10" stroke-width="2"></line></g></svg>
|
|
140
|
+
</button>
|
|
141
|
+
|
|
142
|
+
<button class="dock-active">
|
|
143
|
+
<svg class="size-[1.2em]" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="currentColor" stroke-linejoin="miter" stroke-linecap="butt"><polyline points="3 14 9 14 9 17 15 17 15 14 21 14" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="2"></polyline><rect x="3" y="3" width="18" height="18" rx="2" ry="2" fill="none" stroke="currentColor" stroke-linecap="square" stroke-miterlimit="10" stroke-width="2"></rect></g></svg>
|
|
144
|
+
</button>
|
|
145
|
+
|
|
146
|
+
<button>
|
|
147
|
+
<svg class="size-[1.2em]" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="currentColor" stroke-linejoin="miter" stroke-linecap="butt"><circle cx="12" cy="12" r="3" fill="none" stroke="currentColor" stroke-linecap="square" stroke-miterlimit="10" stroke-width="2"></circle><path d="m22,13.25v-2.5l-2.318-.966c-.167-.581-.395-1.135-.682-1.654l.954-2.318-1.768-1.768-2.318.954c-.518-.287-1.073-.515-1.654-.682l-.966-2.318h-2.5l-.966,2.318c-.581.167-1.135.395-1.654.682l-2.318-.954-1.768,1.768.954,2.318c-.287.518-.515,1.073-.682,1.654l-2.318.966v2.5l2.318.966c.167.581.395,1.135.682,1.654l-.954,2.318,1.768,1.768,2.318-.954c.518.287,1.073.515,1.654.682l.966,2.318h2.5l.966-2.318c.581-.167,1.135-.395,1.654-.682l2.318.954,1.768-1.768-.954-2.318c.287-.518.515-1.073.682-1.654l2.318-.966Z" fill="none" stroke="currentColor" stroke-linecap="square" stroke-miterlimit="10" stroke-width="2"></path></g></svg>
|
|
148
|
+
</button>
|
|
149
|
+
</div>
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Dock with custom colors
|
|
153
|
+
|
|
154
|
+
Source: `playground/components/dock/dock-with-custom-colors.html`
|
|
155
|
+
|
|
156
|
+
```html
|
|
157
|
+
<div class="dock bg-neutral text-neutral-content">
|
|
158
|
+
<button>
|
|
159
|
+
<svg class="size-[1.2em]" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="currentColor" stroke-linejoin="miter" stroke-linecap="butt"><polyline points="1 11 12 2 23 11" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="2"></polyline><path d="m5,13v7c0,1.105.895,2,2,2h10c1.105,0,2-.895,2-2v-7" fill="none" stroke="currentColor" stroke-linecap="square" stroke-miterlimit="10" stroke-width="2"></path><line x1="12" y1="22" x2="12" y2="18" fill="none" stroke="currentColor" stroke-linecap="square" stroke-miterlimit="10" stroke-width="2"></line></g></svg>
|
|
160
|
+
<span class="dock-label">Home</span>
|
|
161
|
+
</button>
|
|
162
|
+
|
|
163
|
+
<button class="dock-active">
|
|
164
|
+
<svg class="size-[1.2em]" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="currentColor" stroke-linejoin="miter" stroke-linecap="butt"><polyline points="3 14 9 14 9 17 15 17 15 14 21 14" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="2"></polyline><rect x="3" y="3" width="18" height="18" rx="2" ry="2" fill="none" stroke="currentColor" stroke-linecap="square" stroke-miterlimit="10" stroke-width="2"></rect></g></svg>
|
|
165
|
+
<span class="dock-label">Inbox</span>
|
|
166
|
+
</button>
|
|
167
|
+
|
|
168
|
+
<button>
|
|
169
|
+
<svg class="size-[1.2em]" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="currentColor" stroke-linejoin="miter" stroke-linecap="butt"><circle cx="12" cy="12" r="3" fill="none" stroke="currentColor" stroke-linecap="square" stroke-miterlimit="10" stroke-width="2"></circle><path d="m22,13.25v-2.5l-2.318-.966c-.167-.581-.395-1.135-.682-1.654l.954-2.318-1.768-1.768-2.318.954c-.518-.287-1.073-.515-1.654-.682l-.966-2.318h-2.5l-.966,2.318c-.581.167-1.135.395-1.654.682l-2.318-.954-1.768,1.768.954,2.318c-.287.518-.515,1.073-.682,1.654l-2.318.966v2.5l2.318.966c.167.581.395,1.135.682,1.654l-.954,2.318,1.768,1.768,2.318-.954c.518.287,1.073.515,1.654.682l.966,2.318h2.5l.966-2.318c.581-.167,1.135-.395,1.654-.682l2.318.954,1.768-1.768-.954-2.318c.287-.518.515-1.073.682-1.654l2.318-.966Z" fill="none" stroke="currentColor" stroke-linecap="square" stroke-miterlimit="10" stroke-width="2"></path></g></svg>
|
|
170
|
+
<span class="dock-label">Settings</span>
|
|
171
|
+
</button>
|
|
172
|
+
</div>
|
|
173
|
+
```
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
# drawer
|
|
2
|
+
|
|
3
|
+
_off-canvas sidebar (toggle via checkbox)_
|
|
4
|
+
|
|
5
|
+
## What it does
|
|
6
|
+
|
|
7
|
+
Sliding off-canvas sidebar driven by a hidden checkbox — works without JS.
|
|
8
|
+
|
|
9
|
+
## When to use
|
|
10
|
+
|
|
11
|
+
- Mobile menus, side panels that overlay content.
|
|
12
|
+
- For an always-visible navigation column, use **menu** in a flex layout instead.
|
|
13
|
+
|
|
14
|
+
## Core classes
|
|
15
|
+
|
|
16
|
+
`drawer`; `drawer-toggle` on the checkbox; `drawer-content`, `drawer-side`, `drawer-overlay`; modifier `drawer-end` for right-side drawer; `drawer-open` to keep open by default.
|
|
17
|
+
|
|
18
|
+
## Examples
|
|
19
|
+
|
|
20
|
+
### Drawer sidebar that opens from right side of page
|
|
21
|
+
|
|
22
|
+
Source: `playground/components/drawer/drawer-sidebar-that-opens-from-right-side-of-page.html`
|
|
23
|
+
|
|
24
|
+
```html
|
|
25
|
+
<div class="drawer drawer-end">
|
|
26
|
+
<input id="my-drawer-5" type="checkbox" class="drawer-toggle" />
|
|
27
|
+
<div class="drawer-content">
|
|
28
|
+
<!-- Page content here -->
|
|
29
|
+
<label for="my-drawer-5" class="drawer-button btn btn-primary">Open drawer</label>
|
|
30
|
+
</div>
|
|
31
|
+
<div class="drawer-side">
|
|
32
|
+
<label for="my-drawer-5" aria-label="close sidebar" class="drawer-overlay"></label>
|
|
33
|
+
<ul class="menu bg-base-200 min-h-full w-80 p-4">
|
|
34
|
+
<!-- Sidebar content here -->
|
|
35
|
+
<li><a>Sidebar Item 1</a></li>
|
|
36
|
+
<li><a>Sidebar Item 2</a></li>
|
|
37
|
+
</ul>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Drawer sidebar
|
|
43
|
+
|
|
44
|
+
Source: `playground/components/drawer/drawer-sidebar.html`
|
|
45
|
+
|
|
46
|
+
```html
|
|
47
|
+
<div class="drawer">
|
|
48
|
+
<input id="my-drawer-1" type="checkbox" class="drawer-toggle" />
|
|
49
|
+
<div class="drawer-content">
|
|
50
|
+
<!-- Page content here -->
|
|
51
|
+
<label for="my-drawer-1" class="btn drawer-button">Open drawer</label>
|
|
52
|
+
</div>
|
|
53
|
+
<div class="drawer-side">
|
|
54
|
+
<label for="my-drawer-1" aria-label="close sidebar" class="drawer-overlay"></label>
|
|
55
|
+
<ul class="menu bg-base-200 min-h-full w-80 p-4">
|
|
56
|
+
<!-- Sidebar content here -->
|
|
57
|
+
<li><a>Sidebar Item 1</a></li>
|
|
58
|
+
<li><a>Sidebar Item 2</a></li>
|
|
59
|
+
</ul>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Navbar menu for desktop — sidebar drawer for mobile
|
|
65
|
+
|
|
66
|
+
Source: `playground/components/drawer/navbar-menu-for-desktop--sidebar-drawer-for-mobile.html`
|
|
67
|
+
|
|
68
|
+
```html
|
|
69
|
+
<div class="drawer">
|
|
70
|
+
<input id="my-drawer-2" type="checkbox" class="drawer-toggle" />
|
|
71
|
+
<div class="drawer-content flex flex-col">
|
|
72
|
+
<!-- Navbar -->
|
|
73
|
+
<div class="navbar bg-base-300 w-full">
|
|
74
|
+
<div class="flex-none lg:hidden">
|
|
75
|
+
<label for="my-drawer-2" aria-label="open sidebar" class="btn btn-square btn-ghost">
|
|
76
|
+
<svg
|
|
77
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
78
|
+
fill="none"
|
|
79
|
+
viewBox="0 0 24 24"
|
|
80
|
+
class="inline-block h-6 w-6 stroke-current"
|
|
81
|
+
>
|
|
82
|
+
<path
|
|
83
|
+
stroke-linecap="round"
|
|
84
|
+
stroke-linejoin="round"
|
|
85
|
+
stroke-width="2"
|
|
86
|
+
d="M4 6h16M4 12h16M4 18h16"
|
|
87
|
+
></path>
|
|
88
|
+
</svg>
|
|
89
|
+
</label>
|
|
90
|
+
</div>
|
|
91
|
+
<div class="mx-2 flex-1 px-2">Navbar Title</div>
|
|
92
|
+
<div class="hidden flex-none lg:block">
|
|
93
|
+
<ul class="menu menu-horizontal">
|
|
94
|
+
<!-- Navbar menu content here -->
|
|
95
|
+
<li><a>Navbar Item 1</a></li>
|
|
96
|
+
<li><a>Navbar Item 2</a></li>
|
|
97
|
+
</ul>
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
100
|
+
<!-- Page content here -->
|
|
101
|
+
Content
|
|
102
|
+
</div>
|
|
103
|
+
<div class="drawer-side">
|
|
104
|
+
<label for="my-drawer-2" aria-label="close sidebar" class="drawer-overlay"></label>
|
|
105
|
+
<ul class="menu bg-base-200 min-h-full w-80 p-4">
|
|
106
|
+
<!-- Sidebar content here -->
|
|
107
|
+
<li><a>Sidebar Item 1</a></li>
|
|
108
|
+
<li><a>Sidebar Item 2</a></li>
|
|
109
|
+
</ul>
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Responsive collapsible icon only drawer sidebar using is drawer close and is drawer open
|
|
115
|
+
|
|
116
|
+
Source: `playground/components/drawer/responsive-collapsible-icon-only-drawer-sidebar-using-is-drawer-close-and-is-drawer-open.html`
|
|
117
|
+
|
|
118
|
+
```html
|
|
119
|
+
<div class="drawer lg:drawer-open">
|
|
120
|
+
<input id="my-drawer-4" type="checkbox" class="drawer-toggle" />
|
|
121
|
+
<div class="drawer-content">
|
|
122
|
+
<!-- Navbar -->
|
|
123
|
+
<nav class="navbar w-full bg-base-300">
|
|
124
|
+
<label for="my-drawer-4" aria-label="open sidebar" class="btn btn-square btn-ghost">
|
|
125
|
+
<!-- Sidebar toggle icon -->
|
|
126
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-linejoin="round" stroke-linecap="round" stroke-width="2" fill="none" stroke="currentColor" class="my-1.5 inline-block size-4"><path d="M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z"></path><path d="M9 4v16"></path><path d="M14 10l2 2l-2 2"></path></svg>
|
|
127
|
+
</label>
|
|
128
|
+
<div class="px-4">Navbar Title</div>
|
|
129
|
+
</nav>
|
|
130
|
+
<!-- Page content here -->
|
|
131
|
+
<div class="p-4">Page Content</div>
|
|
132
|
+
</div>
|
|
133
|
+
|
|
134
|
+
<div class="drawer-side is-drawer-close:overflow-visible">
|
|
135
|
+
<label for="my-drawer-4" aria-label="close sidebar" class="drawer-overlay"></label>
|
|
136
|
+
<div class="flex min-h-full flex-col items-start bg-base-200 is-drawer-close:w-14 is-drawer-open:w-64">
|
|
137
|
+
<!-- Sidebar content here -->
|
|
138
|
+
<ul class="menu w-full grow">
|
|
139
|
+
<!-- List item -->
|
|
140
|
+
<li>
|
|
141
|
+
<button class="is-drawer-close:tooltip is-drawer-close:tooltip-right" data-tip="Homepage">
|
|
142
|
+
<!-- Home icon -->
|
|
143
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-linejoin="round" stroke-linecap="round" stroke-width="2" fill="none" stroke="currentColor" class="my-1.5 inline-block size-4"><path d="M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"></path><path d="M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path></svg>
|
|
144
|
+
<span class="is-drawer-close:hidden">Homepage</span>
|
|
145
|
+
</button>
|
|
146
|
+
</li>
|
|
147
|
+
|
|
148
|
+
<!-- List item -->
|
|
149
|
+
<li>
|
|
150
|
+
<button class="is-drawer-close:tooltip is-drawer-close:tooltip-right" data-tip="Settings">
|
|
151
|
+
<!-- Settings icon -->
|
|
152
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-linejoin="round" stroke-linecap="round" stroke-width="2" fill="none" stroke="currentColor" class="my-1.5 inline-block size-4"><path d="M20 7h-9"></path><path d="M14 17H5"></path><circle cx="17" cy="17" r="3"></circle><circle cx="7" cy="7" r="3"></circle></svg>
|
|
153
|
+
<span class="is-drawer-close:hidden">Settings</span>
|
|
154
|
+
</button>
|
|
155
|
+
</li>
|
|
156
|
+
</ul>
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
</div>
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Responsive sidebar is always visible on large screen can be toggled on small screen
|
|
163
|
+
|
|
164
|
+
Source: `playground/components/drawer/responsive-sidebar-is-always-visible-on-large-screen-can-be-toggled-on-small-screen.html`
|
|
165
|
+
|
|
166
|
+
```html
|
|
167
|
+
<div class="drawer lg:drawer-open">
|
|
168
|
+
<input id="my-drawer-3" type="checkbox" class="drawer-toggle" />
|
|
169
|
+
<div class="drawer-content flex flex-col items-center justify-center">
|
|
170
|
+
<!-- Page content here -->
|
|
171
|
+
<label for="my-drawer-3" class="btn drawer-button lg:hidden">
|
|
172
|
+
Open drawer
|
|
173
|
+
</label>
|
|
174
|
+
</div>
|
|
175
|
+
<div class="drawer-side">
|
|
176
|
+
<label for="my-drawer-3" aria-label="close sidebar" class="drawer-overlay"></label>
|
|
177
|
+
<ul class="menu bg-base-200 min-h-full w-80 p-4">
|
|
178
|
+
<!-- Sidebar content here -->
|
|
179
|
+
<li><a>Sidebar Item 1</a></li>
|
|
180
|
+
<li><a>Sidebar Item 2</a></li>
|
|
181
|
+
</ul>
|
|
182
|
+
</div>
|
|
183
|
+
</div>
|
|
184
|
+
```
|