@primevue/mcp 4.5.5 → 5.0.0-rc.2
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/LICENSE.md +45 -21
- package/README.md +48 -250
- package/data/components.json +47269 -0
- package/data/llms/components/accordion.md +629 -0
- package/data/llms/components/animateonscroll.md +165 -0
- package/data/llms/components/autocomplete.md +995 -0
- package/data/llms/components/avatar.md +264 -0
- package/data/llms/components/badge.md +200 -0
- package/data/llms/components/blockui.md +99 -0
- package/data/llms/components/breadcrumb.md +269 -0
- package/data/llms/components/button.md +902 -0
- package/data/llms/components/card.md +209 -0
- package/data/llms/components/carousel.md +506 -0
- package/data/llms/components/cascadeselect.md +1207 -0
- package/data/llms/components/chart.md +1022 -0
- package/data/llms/components/checkbox.md +401 -0
- package/data/llms/components/chip.md +206 -0
- package/data/llms/components/colorpicker.md +213 -0
- package/data/llms/components/commandmenu.md +660 -0
- package/data/llms/components/compare.md +407 -0
- package/data/llms/components/confirmdialog.md +343 -0
- package/data/llms/components/confirmpopup.md +252 -0
- package/data/llms/components/contextmenu.md +522 -0
- package/data/llms/components/datatable.md +5266 -0
- package/data/llms/components/dataview.md +569 -0
- package/data/llms/components/datepicker.md +964 -0
- package/data/llms/components/deferredcontent.md +96 -0
- package/data/llms/components/dialog.md +702 -0
- package/data/llms/components/divider.md +152 -0
- package/data/llms/components/dock.md +488 -0
- package/data/llms/components/drawer.md +469 -0
- package/data/llms/components/dynamicdialog.md +214 -0
- package/data/llms/components/editor.md +205 -0
- package/data/llms/components/fieldset.md +253 -0
- package/data/llms/components/fileupload.md +459 -0
- package/data/llms/components/floatlabel.md +144 -0
- package/data/llms/components/fluid.md +104 -0
- package/data/llms/components/focustrap.md +59 -0
- package/data/llms/components/forms.md +344 -0
- package/data/llms/components/galleria.md +1119 -0
- package/data/llms/components/gallery.md +1003 -0
- package/data/llms/components/iconfield.md +283 -0
- package/data/llms/components/iftalabel.md +96 -0
- package/data/llms/components/image.md +179 -0
- package/data/llms/components/imagecompare.md +108 -0
- package/data/llms/components/inplace.md +183 -0
- package/data/llms/components/inputcolor.md +869 -0
- package/data/llms/components/inputgroup.md +419 -0
- package/data/llms/components/inputmask.md +345 -0
- package/data/llms/components/inputnumber.md +551 -0
- package/data/llms/components/inputotp.md +345 -0
- package/data/llms/components/inputpassword.md +738 -0
- package/data/llms/components/inputtags.md +432 -0
- package/data/llms/components/inputtext.md +569 -0
- package/data/llms/components/installation.md +1 -0
- package/data/llms/components/keyfilter.md +116 -0
- package/data/llms/components/knob.md +318 -0
- package/data/llms/components/label.md +151 -0
- package/data/llms/components/laravel.md +53 -0
- package/data/llms/components/listbox.md +636 -0
- package/data/llms/components/mask.md +203 -0
- package/data/llms/components/mcp.md +39 -0
- package/data/llms/components/megamenu.md +563 -0
- package/data/llms/components/menu.md +651 -0
- package/data/llms/components/menubar.md +446 -0
- package/data/llms/components/message.md +497 -0
- package/data/llms/components/metergroup.md +281 -0
- package/data/llms/components/multiselect.md +752 -0
- package/data/llms/components/orderlist.md +224 -0
- package/data/llms/components/organizationchart.md +418 -0
- package/data/llms/components/paginator.md +221 -0
- package/data/llms/components/panel.md +321 -0
- package/data/llms/components/panelmenu.md +703 -0
- package/data/llms/components/password.md +657 -0
- package/data/llms/components/picklist.md +286 -0
- package/data/llms/components/popover.md +145 -0
- package/data/llms/components/progressbar.md +242 -0
- package/data/llms/components/progressspinner.md +104 -0
- package/data/llms/components/radiobutton.md +427 -0
- package/data/llms/components/rating.md +312 -0
- package/data/llms/components/ripple.md +91 -0
- package/data/llms/components/scrollarea.md +700 -0
- package/data/llms/components/scrollpanel.md +131 -0
- package/data/llms/components/scrolltop.md +87 -0
- package/data/llms/components/select.md +1251 -0
- package/data/llms/components/selectbutton.md +268 -0
- package/data/llms/components/sidebar.md +2232 -0
- package/data/llms/components/skeleton.md +302 -0
- package/data/llms/components/slider.md +416 -0
- package/data/llms/components/speeddial.md +402 -0
- package/data/llms/components/splitbutton.md +840 -0
- package/data/llms/components/splitter.md +447 -0
- package/data/llms/components/stepper.md +551 -0
- package/data/llms/components/styleclass.md +226 -0
- package/data/llms/components/tabs.md +609 -0
- package/data/llms/components/tag.md +178 -0
- package/data/llms/components/terminal.md +123 -0
- package/data/llms/components/textarea.md +519 -0
- package/data/llms/components/tieredmenu.md +578 -0
- package/data/llms/components/timeline.md +494 -0
- package/data/llms/components/toast.md +472 -0
- package/data/llms/components/togglebutton.md +276 -0
- package/data/llms/components/toggleswitch.md +271 -0
- package/data/llms/components/toolbar.md +140 -0
- package/data/llms/components/tooltip.md +160 -0
- package/data/llms/components/tree.md +1076 -0
- package/data/llms/components/treeselect.md +660 -0
- package/data/llms/components/treetable.md +2493 -0
- package/data/llms/components/virtualscroller.md +265 -0
- package/data/llms/guides/autoimport.md +28 -0
- package/data/llms/guides/cdn.md +72 -0
- package/data/llms/guides/configuration.md +158 -0
- package/data/llms/guides/customicons.md +67 -0
- package/data/llms/guides/guides/accessibility.md +27 -0
- package/data/llms/guides/guides/animations.md +119 -0
- package/data/llms/guides/guides/rtl.md +7 -0
- package/data/llms/guides/icons.md +136 -0
- package/data/llms/guides/installation.md +3 -0
- package/data/llms/guides/laravel.md +66 -0
- package/data/llms/guides/llms.md +15 -0
- package/data/llms/guides/mcp.md +104 -0
- package/data/llms/guides/migration/v4.md +15 -0
- package/data/llms/guides/migration/v5.md +15 -0
- package/data/llms/guides/nuxt.md +141 -0
- package/data/llms/guides/passthrough.md +137 -0
- package/data/llms/guides/primeclt.md +43 -0
- package/data/llms/guides/tailwind.md +151 -0
- package/data/llms/guides/theming/styled.md +497 -0
- package/data/llms/guides/theming/unstyled.md +57 -0
- package/data/llms/guides/uikit.md +3 -0
- package/data/llms/guides/vite.md +90 -0
- package/data/llms/llms-full.txt +54465 -0
- package/data/llms/llms.txt +132 -0
- package/data/llms/pages/accessibility.md +27 -0
- package/data/llms/pages/animations.md +119 -0
- package/data/llms/pages/autoimport.md +28 -0
- package/data/llms/pages/cdn.md +72 -0
- package/data/llms/pages/configuration.md +158 -0
- package/data/llms/pages/contribution.md +31 -0
- package/data/llms/pages/customicons.md +67 -0
- package/data/llms/pages/designer.md +79 -0
- package/data/llms/pages/dynamicimports.md +7 -0
- package/data/llms/pages/forms.md +63 -0
- package/data/llms/pages/guides/accessibility.md +27 -0
- package/data/llms/pages/guides/animations.md +119 -0
- package/data/llms/pages/guides/rtl.md +7 -0
- package/data/llms/pages/icons.md +136 -0
- package/data/llms/pages/installation.md +3 -0
- package/data/llms/pages/introduction.md +23 -0
- package/data/llms/pages/laravel.md +66 -0
- package/data/llms/pages/llms.md +15 -0
- package/data/llms/pages/mcp.md +104 -0
- package/data/llms/pages/migration/v4.md +15 -0
- package/data/llms/pages/migration/v5.md +15 -0
- package/data/llms/pages/nuxt.md +141 -0
- package/data/llms/pages/passthrough.md +137 -0
- package/data/llms/pages/primeclt.md +43 -0
- package/data/llms/pages/rtl.md +7 -0
- package/data/llms/pages/setup.md +3 -0
- package/data/llms/pages/styled.md +497 -0
- package/data/llms/pages/tailwind.md +151 -0
- package/data/llms/pages/theming/styled.md +497 -0
- package/data/llms/pages/theming/unstyled.md +57 -0
- package/data/llms/pages/uikit.md +3 -0
- package/data/llms/pages/unstyled.md +57 -0
- package/data/llms/pages/v4.md +15 -0
- package/data/llms/pages/v5.md +15 -0
- package/data/llms/pages/vite.md +90 -0
- package/data/manifest.json +11117 -0
- package/data/mcp-data.json +55940 -0
- package/dist/index.d.ts +17 -1
- package/dist/index.js +66066 -72541
- package/package.json +10 -12
|
@@ -0,0 +1,2232 @@
|
|
|
1
|
+
# Sidebar
|
|
2
|
+
|
|
3
|
+
Sidebar is a compound navigation panel with collapsible icon mode, offcanvas mode, variants and optional overlay.
|
|
4
|
+
|
|
5
|
+
## Variants
|
|
6
|
+
|
|
7
|
+
Interactive playground for every sidebar variant , collapsible mode, side , overlay , open-on-hover and backdrop.
|
|
8
|
+
|
|
9
|
+
```vue
|
|
10
|
+
<template>
|
|
11
|
+
<div>
|
|
12
|
+
<div class="flex flex-wrap items-start gap-4 mb-4">
|
|
13
|
+
<div class="flex flex-col gap-1.5">
|
|
14
|
+
<Label>Variant</Label>
|
|
15
|
+
<Select v-model="variant" :options="variantOptions" optionLabel="label" optionValue="value" placeholder="Variant" class="w-40" />
|
|
16
|
+
</div>
|
|
17
|
+
<div class="flex flex-col gap-1.5">
|
|
18
|
+
<Label>Collapsible</Label>
|
|
19
|
+
<Select v-model="collapsible" :options="collapsibleOptions" optionLabel="label" optionValue="value" placeholder="Collapsible" class="w-40" />
|
|
20
|
+
</div>
|
|
21
|
+
<div class="flex flex-col gap-1.5">
|
|
22
|
+
<Label>Side</Label>
|
|
23
|
+
<SelectButton v-model="side" :options="sideOptions" optionLabel="label" optionValue="value" :allowEmpty="false" />
|
|
24
|
+
</div>
|
|
25
|
+
<div class="flex flex-col gap-1.5">
|
|
26
|
+
<Label for="overlay-sw">Overlay</Label>
|
|
27
|
+
<ToggleSwitch v-model="overlay" inputId="overlay-sw" />
|
|
28
|
+
</div>
|
|
29
|
+
<div class="flex flex-col gap-1.5">
|
|
30
|
+
<Label for="hover-sw">Open on Hover</Label>
|
|
31
|
+
<ToggleSwitch v-model="openOnHover" inputId="hover-sw" />
|
|
32
|
+
</div>
|
|
33
|
+
<div class="flex flex-col gap-1.5">
|
|
34
|
+
<Label for="backdrop-sw">Backdrop</Label>
|
|
35
|
+
<ToggleSwitch v-model="backdrop" inputId="backdrop-sw" />
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
<div class="border border-surface-200 dark:border-surface-700 rounded-lg overflow-hidden">
|
|
39
|
+
<SidebarLayout class="min-h-192! relative!">
|
|
40
|
+
<SidebarBackdrop v-if="(backdrop || isMobile) && open" class="absolute!" />
|
|
41
|
+
<SidebarMain v-if="side === 'right'">
|
|
42
|
+
<header class="flex h-12 items-center gap-2 border-b border-surface-200 dark:border-surface-700 px-4">
|
|
43
|
+
<SidebarTrigger severity="secondary" target="variants-demo" :text="true" size="small">
|
|
44
|
+
<SidebarIcon />
|
|
45
|
+
</SidebarTrigger>
|
|
46
|
+
</header>
|
|
47
|
+
<div class="flex-1 p-4 flex flex-col gap-4">
|
|
48
|
+
<div class="rounded-lg bg-surface-100 dark:bg-surface-800 h-48"></div>
|
|
49
|
+
<div class="rounded-lg bg-surface-100 dark:bg-surface-800 flex-1"></div>
|
|
50
|
+
</div>
|
|
51
|
+
</SidebarMain>
|
|
52
|
+
<Sidebar id="variants-demo" :variant="variant" :collapsible="isMobile ? 'offcanvas' : collapsible" :side="side" :overlay="isMobile || overlay" :openOnHover="openOnHover" v-model:open="open">
|
|
53
|
+
<SidebarSpacer />
|
|
54
|
+
<SidebarAside>
|
|
55
|
+
<SidebarPanel>
|
|
56
|
+
<SidebarHeader>
|
|
57
|
+
<SidebarMenu>
|
|
58
|
+
<SidebarMenuItem>
|
|
59
|
+
<SidebarMenuButton class="px-1!">
|
|
60
|
+
<div class="flex size-6 shrink-0 items-center justify-center rounded-md bg-linear-to-br from-violet-500 to-indigo-600 text-white text-xs font-bold leading-none">A</div>
|
|
61
|
+
<span class="font-semibold text-sm">Acme Inc</span>
|
|
62
|
+
</SidebarMenuButton>
|
|
63
|
+
</SidebarMenuItem>
|
|
64
|
+
</SidebarMenu>
|
|
65
|
+
</SidebarHeader>
|
|
66
|
+
<SidebarContent>
|
|
67
|
+
<SidebarGroup v-for="group in navGroups" :key="group.label">
|
|
68
|
+
<SidebarGroupLabel>{{ group.label }}</SidebarGroupLabel>
|
|
69
|
+
<SidebarGroupContent>
|
|
70
|
+
<SidebarMenu>
|
|
71
|
+
<SidebarMenuItem v-for="item in group.items" :key="item.label" :collapsible="!!item.subItems" :defaultOpen="item.subItems ? item.subItems.some((s) => s.isActive) : undefined">
|
|
72
|
+
<SidebarMenuButton :isActive="item.isActive">
|
|
73
|
+
<component :is="item.icon" />
|
|
74
|
+
<span>{{ item.label }}</span>
|
|
75
|
+
<ChevronDown v-if="item.subItems" class="ml-auto transition-transform duration-200 [[data-open]>&]:rotate-180" />
|
|
76
|
+
</SidebarMenuButton>
|
|
77
|
+
<SidebarMenuBadge v-if="item.badge">{{ item.badge }}</SidebarMenuBadge>
|
|
78
|
+
<SidebarMenuSub v-if="item.subItems">
|
|
79
|
+
<SidebarMenuSubItem v-for="sub in item.subItems" :key="sub.label">
|
|
80
|
+
<SidebarMenuSubButton :isActive="sub.isActive">
|
|
81
|
+
<span>{{ sub.label }}</span>
|
|
82
|
+
</SidebarMenuSubButton>
|
|
83
|
+
</SidebarMenuSubItem>
|
|
84
|
+
</SidebarMenuSub>
|
|
85
|
+
<SidebarMenuAction v-else-if="!item.badge" :showOnHover="true">
|
|
86
|
+
<EllipsisV />
|
|
87
|
+
</SidebarMenuAction>
|
|
88
|
+
</SidebarMenuItem>
|
|
89
|
+
</SidebarMenu>
|
|
90
|
+
</SidebarGroupContent>
|
|
91
|
+
</SidebarGroup>
|
|
92
|
+
</SidebarContent>
|
|
93
|
+
<SidebarFooter>
|
|
94
|
+
<SidebarMenu>
|
|
95
|
+
<SidebarMenuItem>
|
|
96
|
+
<SidebarMenuButton class="p-1!">
|
|
97
|
+
<Avatar label="JD" shape="circle" class="size-6 shrink-0 text-xs" />
|
|
98
|
+
<span>John Doe</span>
|
|
99
|
+
</SidebarMenuButton>
|
|
100
|
+
</SidebarMenuItem>
|
|
101
|
+
</SidebarMenu>
|
|
102
|
+
</SidebarFooter>
|
|
103
|
+
<SidebarRail />
|
|
104
|
+
</SidebarPanel>
|
|
105
|
+
</SidebarAside>
|
|
106
|
+
</Sidebar>
|
|
107
|
+
<SidebarMain v-if="side === 'left'">
|
|
108
|
+
<header class="flex h-12 items-center gap-2 border-b border-surface-200 dark:border-surface-700 px-4">
|
|
109
|
+
<SidebarTrigger severity="secondary" target="variants-demo" :text="true" size="small">
|
|
110
|
+
<SidebarIcon />
|
|
111
|
+
</SidebarTrigger>
|
|
112
|
+
</header>
|
|
113
|
+
<div class="flex-1 p-4 flex flex-col gap-4">
|
|
114
|
+
<div class="rounded-lg bg-surface-100 dark:bg-surface-800 h-48"></div>
|
|
115
|
+
<div class="rounded-lg bg-surface-100 dark:bg-surface-800 flex-1"></div>
|
|
116
|
+
</div>
|
|
117
|
+
</SidebarMain>
|
|
118
|
+
</SidebarLayout>
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
</template>
|
|
122
|
+
|
|
123
|
+
<script setup>
|
|
124
|
+
import { onBeforeUnmount, onMounted, ref } from 'vue';
|
|
125
|
+
import Bell from '@primeicons/vue/bell';
|
|
126
|
+
import CalendarIcon from '@primeicons/vue/calendar';
|
|
127
|
+
import ChartBar from '@primeicons/vue/chart-bar';
|
|
128
|
+
import ChevronDown from '@primeicons/vue/chevron-down';
|
|
129
|
+
import CreditCard from '@primeicons/vue/credit-card';
|
|
130
|
+
import EllipsisV from '@primeicons/vue/ellipsis-v';
|
|
131
|
+
import Folder from '@primeicons/vue/folder';
|
|
132
|
+
import Home from '@primeicons/vue/home';
|
|
133
|
+
import Inbox from '@primeicons/vue/inbox';
|
|
134
|
+
import Search from '@primeicons/vue/search';
|
|
135
|
+
import ShoppingCart from '@primeicons/vue/shopping-cart';
|
|
136
|
+
import SidebarIcon from '@primeicons/vue/sidebar';
|
|
137
|
+
import Star from '@primeicons/vue/star';
|
|
138
|
+
import Users from '@primeicons/vue/users';
|
|
139
|
+
|
|
140
|
+
const isMobile = ref(false);
|
|
141
|
+
const open = ref(true);
|
|
142
|
+
const variant = ref('sidebar');
|
|
143
|
+
const collapsible = ref('icon');
|
|
144
|
+
const side = ref('left');
|
|
145
|
+
const overlay = ref(false);
|
|
146
|
+
const openOnHover = ref(false);
|
|
147
|
+
const backdrop = ref(false);
|
|
148
|
+
let mql = null;
|
|
149
|
+
let onMqlChange = null;
|
|
150
|
+
|
|
151
|
+
onMounted(() => {
|
|
152
|
+
if (typeof window === 'undefined') return;
|
|
153
|
+
|
|
154
|
+
mql = window.matchMedia('(max-width: 1023px)');
|
|
155
|
+
isMobile.value = mql.matches;
|
|
156
|
+
open.value = !isMobile.value;
|
|
157
|
+
onMqlChange = (event) => {
|
|
158
|
+
isMobile.value = event.matches;
|
|
159
|
+
open.value = !event.matches;
|
|
160
|
+
};
|
|
161
|
+
mql.addEventListener('change', onMqlChange);
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
onBeforeUnmount(() => {
|
|
165
|
+
if (mql && onMqlChange) {
|
|
166
|
+
mql.removeEventListener('change', onMqlChange);
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
const variantOptions = [
|
|
171
|
+
{ label: 'Sidebar', value: 'sidebar' },
|
|
172
|
+
{ label: 'Floating', value: 'floating' },
|
|
173
|
+
{ label: 'Inset', value: 'inset' }
|
|
174
|
+
];
|
|
175
|
+
const collapsibleOptions = [
|
|
176
|
+
{ label: 'Icon', value: 'icon' },
|
|
177
|
+
{ label: 'Offcanvas', value: 'offcanvas' },
|
|
178
|
+
{ label: 'None', value: 'none' }
|
|
179
|
+
];
|
|
180
|
+
const sideOptions = [
|
|
181
|
+
{ label: 'Left', value: 'left' },
|
|
182
|
+
{ label: 'Right', value: 'right' }
|
|
183
|
+
];
|
|
184
|
+
const navGroups = [
|
|
185
|
+
{
|
|
186
|
+
label: 'Navigation',
|
|
187
|
+
items: [
|
|
188
|
+
{ icon: Home, label: 'Home', isActive: true },
|
|
189
|
+
{ icon: Inbox, label: 'Inbox', badge: '12' },
|
|
190
|
+
{ icon: Search, label: 'Search' },
|
|
191
|
+
{ icon: Bell, label: 'Notifications', badge: '3' }
|
|
192
|
+
]
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
label: 'Projects',
|
|
196
|
+
items: [
|
|
197
|
+
{ icon: ChartBar, label: 'Analytics', subItems: [{ label: 'Overview', isActive: true }, { label: 'Reports' }, { label: 'Real-time' }] },
|
|
198
|
+
{ icon: Users, label: 'Team' },
|
|
199
|
+
{ icon: CalendarIcon, label: 'Calendar' },
|
|
200
|
+
{ icon: Folder, label: 'Documents', subItems: [{ label: 'Shared' }, { label: 'Private' }, { label: 'Archived' }] }
|
|
201
|
+
]
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
label: 'Billing',
|
|
205
|
+
items: [
|
|
206
|
+
{ icon: CreditCard, label: 'Payments' },
|
|
207
|
+
{ icon: ShoppingCart, label: 'Orders' },
|
|
208
|
+
{ icon: Star, label: 'Subscriptions' }
|
|
209
|
+
]
|
|
210
|
+
}
|
|
211
|
+
];
|
|
212
|
+
<\/script>
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
## With Menu
|
|
216
|
+
|
|
217
|
+
Full application chrome with a workspace switcher in the header, grouped navigation and a user menu in the footer using the Menu component. Collapses to icon mode.
|
|
218
|
+
|
|
219
|
+
```vue
|
|
220
|
+
<template>
|
|
221
|
+
<div class="border border-surface-200 dark:border-surface-700 rounded-lg overflow-hidden">
|
|
222
|
+
<SidebarLayout class="min-h-192! relative!">
|
|
223
|
+
<SidebarBackdrop v-if="isMobile && open" class="absolute!" />
|
|
224
|
+
<Sidebar id="menu-demo" :collapsible="isMobile ? 'offcanvas' : 'icon'" :overlay="isMobile" v-model:open="open">
|
|
225
|
+
<SidebarSpacer />
|
|
226
|
+
<SidebarAside>
|
|
227
|
+
<SidebarPanel>
|
|
228
|
+
<SidebarHeader>
|
|
229
|
+
<SidebarMenu>
|
|
230
|
+
<SidebarMenuItem>
|
|
231
|
+
<SidebarMenuButton class="p-1!" @click="(e) => $refs.companyMenu.toggle(e)" aria-haspopup="true" aria-controls="company_menu">
|
|
232
|
+
<div :class="\`flex size-6 shrink-0 items-center justify-center rounded-md bg-linear-to-br \${activeCompany.color} text-white text-xs font-bold leading-none\`">
|
|
233
|
+
{{ activeCompany.logo }}
|
|
234
|
+
</div>
|
|
235
|
+
<span class="font-semibold text-sm">{{ activeCompany.name }}</span>
|
|
236
|
+
<ChevronDown class="ml-auto" />
|
|
237
|
+
</SidebarMenuButton>
|
|
238
|
+
<Menu ref="companyMenu" id="company_menu" :model="companyMenuItems" :popup="true">
|
|
239
|
+
<template #start>
|
|
240
|
+
<div class="px-3 py-1 text-sm font-medium text-muted-color">Companies</div>
|
|
241
|
+
</template>
|
|
242
|
+
<template #item="{ item }">
|
|
243
|
+
<div class="flex items-center gap-2 p-2">
|
|
244
|
+
<div v-if="item.logo" :class="\`flex size-5 shrink-0 items-center justify-center rounded-sm bg-linear-to-br \${item.color} text-white text-[0.625rem] font-bold leading-none\`">
|
|
245
|
+
{{ item.logo }}
|
|
246
|
+
</div>
|
|
247
|
+
<span class="text-sm">{{ item.label }}</span>
|
|
248
|
+
<Check v-if="item.active" class="ml-auto" />
|
|
249
|
+
</div>
|
|
250
|
+
</template>
|
|
251
|
+
<template #end>
|
|
252
|
+
<div class="flex items-center gap-2 p-2 px-3">
|
|
253
|
+
<Plus />
|
|
254
|
+
<div class="text-sm font-medium text-muted-color">Add company</div>
|
|
255
|
+
</div>
|
|
256
|
+
</template>
|
|
257
|
+
</Menu>
|
|
258
|
+
</SidebarMenuItem>
|
|
259
|
+
</SidebarMenu>
|
|
260
|
+
</SidebarHeader>
|
|
261
|
+
|
|
262
|
+
<SidebarContent>
|
|
263
|
+
<SidebarGroup>
|
|
264
|
+
<SidebarGroupLabel>Navigation</SidebarGroupLabel>
|
|
265
|
+
<SidebarGroupContent>
|
|
266
|
+
<SidebarMenu>
|
|
267
|
+
<SidebarMenuItem>
|
|
268
|
+
<SidebarMenuButton :isActive="true">
|
|
269
|
+
<Home />
|
|
270
|
+
<span>Home</span>
|
|
271
|
+
</SidebarMenuButton>
|
|
272
|
+
</SidebarMenuItem>
|
|
273
|
+
<SidebarMenuItem>
|
|
274
|
+
<SidebarMenuButton>
|
|
275
|
+
<Inbox />
|
|
276
|
+
<span>Inbox</span>
|
|
277
|
+
</SidebarMenuButton>
|
|
278
|
+
</SidebarMenuItem>
|
|
279
|
+
<SidebarMenuItem>
|
|
280
|
+
<SidebarMenuButton>
|
|
281
|
+
<Search />
|
|
282
|
+
<span>Search</span>
|
|
283
|
+
</SidebarMenuButton>
|
|
284
|
+
</SidebarMenuItem>
|
|
285
|
+
<SidebarMenuItem>
|
|
286
|
+
<SidebarMenuButton>
|
|
287
|
+
<Users />
|
|
288
|
+
<span>Team</span>
|
|
289
|
+
</SidebarMenuButton>
|
|
290
|
+
</SidebarMenuItem>
|
|
291
|
+
<SidebarMenuItem>
|
|
292
|
+
<SidebarMenuButton>
|
|
293
|
+
<Bell />
|
|
294
|
+
<span>Notifications</span>
|
|
295
|
+
</SidebarMenuButton>
|
|
296
|
+
</SidebarMenuItem>
|
|
297
|
+
</SidebarMenu>
|
|
298
|
+
</SidebarGroupContent>
|
|
299
|
+
</SidebarGroup>
|
|
300
|
+
</SidebarContent>
|
|
301
|
+
|
|
302
|
+
<SidebarFooter>
|
|
303
|
+
<SidebarMenu>
|
|
304
|
+
<SidebarMenuItem>
|
|
305
|
+
<SidebarMenuButton class="p-1!" @click="(e) => $refs.userMenu.toggle(e)" aria-haspopup="true" aria-controls="user_menu">
|
|
306
|
+
<Avatar label="JD" shape="circle" class="size-6 shrink-0 text-xs" />
|
|
307
|
+
<span>John Doe</span>
|
|
308
|
+
<ChevronDown class="ml-auto" />
|
|
309
|
+
</SidebarMenuButton>
|
|
310
|
+
<Menu ref="userMenu" id="user_menu" :model="userMenuItems" :popup="true">
|
|
311
|
+
<template #start>
|
|
312
|
+
<div class="px-3 py-1 text-xs font-medium text-muted-color">john@acme.com</div>
|
|
313
|
+
</template>
|
|
314
|
+
</Menu>
|
|
315
|
+
</SidebarMenuItem>
|
|
316
|
+
</SidebarMenu>
|
|
317
|
+
</SidebarFooter>
|
|
318
|
+
<SidebarRail />
|
|
319
|
+
</SidebarPanel>
|
|
320
|
+
</SidebarAside>
|
|
321
|
+
</Sidebar>
|
|
322
|
+
|
|
323
|
+
<SidebarMain>
|
|
324
|
+
<header class="flex h-12 items-center gap-2 border-b border-surface-200 dark:border-surface-700 px-4">
|
|
325
|
+
<SidebarTrigger severity="secondary" target="menu-demo" :text="true" size="small">
|
|
326
|
+
<SidebarIcon />
|
|
327
|
+
</SidebarTrigger>
|
|
328
|
+
</header>
|
|
329
|
+
<div class="flex-1 p-4 flex flex-col gap-4">
|
|
330
|
+
<div class="rounded-lg bg-surface-100 dark:bg-surface-800 h-48"></div>
|
|
331
|
+
<div class="rounded-lg bg-surface-100 dark:bg-surface-800 flex-1"></div>
|
|
332
|
+
</div>
|
|
333
|
+
</SidebarMain>
|
|
334
|
+
</SidebarLayout>
|
|
335
|
+
</div>
|
|
336
|
+
</template>
|
|
337
|
+
|
|
338
|
+
<script setup>
|
|
339
|
+
import { computed, onBeforeUnmount, onMounted, ref } from 'vue';
|
|
340
|
+
import Bell from '@primeicons/vue/bell';
|
|
341
|
+
import Check from '@primeicons/vue/check';
|
|
342
|
+
import ChevronDown from '@primeicons/vue/chevron-down';
|
|
343
|
+
import Cog from '@primeicons/vue/cog';
|
|
344
|
+
import Home from '@primeicons/vue/home';
|
|
345
|
+
import Inbox from '@primeicons/vue/inbox';
|
|
346
|
+
import Plus from '@primeicons/vue/plus';
|
|
347
|
+
import Search from '@primeicons/vue/search';
|
|
348
|
+
import SidebarIcon from '@primeicons/vue/sidebar';
|
|
349
|
+
import SignOut from '@primeicons/vue/sign-out';
|
|
350
|
+
import Users from '@primeicons/vue/users';
|
|
351
|
+
|
|
352
|
+
const isMobile = ref(false);
|
|
353
|
+
const open = ref(true);
|
|
354
|
+
let mql = null;
|
|
355
|
+
let onMqlChange = null;
|
|
356
|
+
|
|
357
|
+
onMounted(() => {
|
|
358
|
+
if (typeof window === 'undefined') return;
|
|
359
|
+
|
|
360
|
+
mql = window.matchMedia('(max-width: 1023px)');
|
|
361
|
+
isMobile.value = mql.matches;
|
|
362
|
+
open.value = !isMobile.value;
|
|
363
|
+
onMqlChange = (event) => {
|
|
364
|
+
isMobile.value = event.matches;
|
|
365
|
+
open.value = !event.matches;
|
|
366
|
+
};
|
|
367
|
+
mql.addEventListener('change', onMqlChange);
|
|
368
|
+
});
|
|
369
|
+
|
|
370
|
+
onBeforeUnmount(() => {
|
|
371
|
+
if (mql && onMqlChange) {
|
|
372
|
+
mql.removeEventListener('change', onMqlChange);
|
|
373
|
+
}
|
|
374
|
+
});
|
|
375
|
+
|
|
376
|
+
const companies = [
|
|
377
|
+
{ name: 'Acme Inc', logo: 'A', color: 'from-violet-500 to-indigo-600' },
|
|
378
|
+
{ name: 'Globex Corp', logo: 'G', color: 'from-emerald-500 to-teal-600' },
|
|
379
|
+
{ name: 'Initech', logo: 'I', color: 'from-orange-500 to-red-600' }
|
|
380
|
+
];
|
|
381
|
+
const activeCompany = ref({ name: 'Acme Inc', logo: 'A', color: 'from-violet-500 to-indigo-600' });
|
|
382
|
+
const userMenuItems = [{ label: 'Settings', icon: Cog }, { label: 'Notifications', icon: Bell }, { separator: true }, { label: 'Sign out', icon: SignOut }];
|
|
383
|
+
const companyMenuItems = computed(() => [
|
|
384
|
+
...companies.map((c) => ({
|
|
385
|
+
label: c.name,
|
|
386
|
+
logo: c.logo,
|
|
387
|
+
color: c.color,
|
|
388
|
+
active: activeCompany.value.name === c.name,
|
|
389
|
+
command: () => {
|
|
390
|
+
activeCompany.value = c;
|
|
391
|
+
}
|
|
392
|
+
})),
|
|
393
|
+
{ separator: true }
|
|
394
|
+
]);
|
|
395
|
+
<\/script>
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
## Responsive
|
|
399
|
+
|
|
400
|
+
Below 1024px the sidebar turns into an offcanvas overlay with a backdrop. Above that it stays in icon mode pushing the inset. Use a matchMedia reactive flag to switch between the two layouts.
|
|
401
|
+
|
|
402
|
+
```vue
|
|
403
|
+
<template>
|
|
404
|
+
<div class="border border-surface-200 dark:border-surface-700 rounded-lg overflow-hidden">
|
|
405
|
+
<SidebarLayout class="min-h-192! relative!">
|
|
406
|
+
<SidebarBackdrop v-if="isMobile && open" class="absolute!" />
|
|
407
|
+
<Sidebar id="mobile-nav" :collapsible="isMobile ? 'offcanvas' : 'icon'" :overlay="isMobile" v-model:open="open" width="14rem">
|
|
408
|
+
<SidebarSpacer />
|
|
409
|
+
<SidebarAside>
|
|
410
|
+
<SidebarPanel>
|
|
411
|
+
<SidebarHeader>
|
|
412
|
+
<SidebarMenu>
|
|
413
|
+
<SidebarMenuItem>
|
|
414
|
+
<SidebarMenuButton class="p-1!">
|
|
415
|
+
<div class="flex size-6 shrink-0 items-center justify-center rounded-md bg-linear-to-br from-violet-500 to-indigo-600 text-white text-xs font-bold leading-none">A</div>
|
|
416
|
+
<span class="font-semibold text-sm">Acme Inc</span>
|
|
417
|
+
</SidebarMenuButton>
|
|
418
|
+
</SidebarMenuItem>
|
|
419
|
+
</SidebarMenu>
|
|
420
|
+
</SidebarHeader>
|
|
421
|
+
|
|
422
|
+
<SidebarContent>
|
|
423
|
+
<SidebarGroup>
|
|
424
|
+
<SidebarGroupLabel>Menu</SidebarGroupLabel>
|
|
425
|
+
<SidebarGroupContent>
|
|
426
|
+
<SidebarMenu>
|
|
427
|
+
<SidebarMenuItem>
|
|
428
|
+
<SidebarMenuButton :isActive="true">
|
|
429
|
+
<Home />
|
|
430
|
+
<span>Home</span>
|
|
431
|
+
</SidebarMenuButton>
|
|
432
|
+
</SidebarMenuItem>
|
|
433
|
+
<SidebarMenuItem>
|
|
434
|
+
<SidebarMenuButton>
|
|
435
|
+
<Inbox />
|
|
436
|
+
<span>Inbox</span>
|
|
437
|
+
</SidebarMenuButton>
|
|
438
|
+
<SidebarMenuBadge>3</SidebarMenuBadge>
|
|
439
|
+
</SidebarMenuItem>
|
|
440
|
+
<SidebarMenuItem>
|
|
441
|
+
<SidebarMenuButton>
|
|
442
|
+
<Search />
|
|
443
|
+
<span>Search</span>
|
|
444
|
+
</SidebarMenuButton>
|
|
445
|
+
</SidebarMenuItem>
|
|
446
|
+
<SidebarMenuItem>
|
|
447
|
+
<SidebarMenuButton>
|
|
448
|
+
<Users />
|
|
449
|
+
<span>Team</span>
|
|
450
|
+
</SidebarMenuButton>
|
|
451
|
+
</SidebarMenuItem>
|
|
452
|
+
<SidebarMenuItem>
|
|
453
|
+
<SidebarMenuButton>
|
|
454
|
+
<Bell />
|
|
455
|
+
<span>Notifications</span>
|
|
456
|
+
</SidebarMenuButton>
|
|
457
|
+
</SidebarMenuItem>
|
|
458
|
+
<SidebarMenuItem>
|
|
459
|
+
<SidebarMenuButton>
|
|
460
|
+
<Cog />
|
|
461
|
+
<span>Settings</span>
|
|
462
|
+
</SidebarMenuButton>
|
|
463
|
+
</SidebarMenuItem>
|
|
464
|
+
</SidebarMenu>
|
|
465
|
+
</SidebarGroupContent>
|
|
466
|
+
</SidebarGroup>
|
|
467
|
+
</SidebarContent>
|
|
468
|
+
|
|
469
|
+
<SidebarFooter>
|
|
470
|
+
<SidebarMenu>
|
|
471
|
+
<SidebarMenuItem>
|
|
472
|
+
<SidebarMenuButton class="p-1!">
|
|
473
|
+
<Avatar label="JD" shape="circle" class="size-6 shrink-0 text-xs" />
|
|
474
|
+
<span>John Doe</span>
|
|
475
|
+
</SidebarMenuButton>
|
|
476
|
+
</SidebarMenuItem>
|
|
477
|
+
</SidebarMenu>
|
|
478
|
+
</SidebarFooter>
|
|
479
|
+
</SidebarPanel>
|
|
480
|
+
</SidebarAside>
|
|
481
|
+
</Sidebar>
|
|
482
|
+
|
|
483
|
+
<SidebarMain>
|
|
484
|
+
<header class="flex h-12 items-center gap-2 border-b border-surface-200 dark:border-surface-700 px-4">
|
|
485
|
+
<SidebarTrigger severity="secondary" target="mobile-nav" :text="true" size="small">
|
|
486
|
+
<SidebarIcon />
|
|
487
|
+
</SidebarTrigger>
|
|
488
|
+
<span class="text-sm font-medium">Dashboard</span>
|
|
489
|
+
<span class="ml-auto text-xs text-muted-color rounded-md bg-surface-100 dark:bg-surface-800 px-2 py-1">{{ isMobile ? 'Mobile' : 'Desktop' }}</span>
|
|
490
|
+
</header>
|
|
491
|
+
<div class="flex-1 p-4 flex flex-col gap-4">
|
|
492
|
+
<div class="rounded-lg bg-surface-100 dark:bg-surface-800 h-48"></div>
|
|
493
|
+
<div class="rounded-lg bg-surface-100 dark:bg-surface-800 flex-1"></div>
|
|
494
|
+
</div>
|
|
495
|
+
</SidebarMain>
|
|
496
|
+
</SidebarLayout>
|
|
497
|
+
</div>
|
|
498
|
+
</template>
|
|
499
|
+
|
|
500
|
+
<script setup>
|
|
501
|
+
import { onBeforeUnmount, onMounted, ref } from 'vue';
|
|
502
|
+
import Bell from '@primeicons/vue/bell';
|
|
503
|
+
import Cog from '@primeicons/vue/cog';
|
|
504
|
+
import Home from '@primeicons/vue/home';
|
|
505
|
+
import Inbox from '@primeicons/vue/inbox';
|
|
506
|
+
import Search from '@primeicons/vue/search';
|
|
507
|
+
import SidebarIcon from '@primeicons/vue/sidebar';
|
|
508
|
+
import Users from '@primeicons/vue/users';
|
|
509
|
+
|
|
510
|
+
const isMobile = ref(false);
|
|
511
|
+
const open = ref(true);
|
|
512
|
+
let mql = null;
|
|
513
|
+
let onMqlChange = null;
|
|
514
|
+
|
|
515
|
+
onMounted(() => {
|
|
516
|
+
if (typeof window === 'undefined') return;
|
|
517
|
+
|
|
518
|
+
mql = window.matchMedia('(max-width: 1023px)');
|
|
519
|
+
isMobile.value = mql.matches;
|
|
520
|
+
open.value = !isMobile.value;
|
|
521
|
+
onMqlChange = (event) => {
|
|
522
|
+
isMobile.value = event.matches;
|
|
523
|
+
open.value = !event.matches;
|
|
524
|
+
};
|
|
525
|
+
mql.addEventListener('change', onMqlChange);
|
|
526
|
+
});
|
|
527
|
+
|
|
528
|
+
onBeforeUnmount(() => {
|
|
529
|
+
if (mql && onMqlChange) {
|
|
530
|
+
mql.removeEventListener('change', onMqlChange);
|
|
531
|
+
}
|
|
532
|
+
});
|
|
533
|
+
<\/script>
|
|
534
|
+
```
|
|
535
|
+
|
|
536
|
+
## Dual Sidebar
|
|
537
|
+
|
|
538
|
+
Two sidebars on opposite sides of the layout: a primary navigation on the left (icon-collapsible) and a secondary AI chat panel on the right (offcanvas). Each SidebarTrigger targets its sidebar by id.
|
|
539
|
+
|
|
540
|
+
```vue
|
|
541
|
+
<template>
|
|
542
|
+
<div class="border border-surface-200 dark:border-surface-700 rounded-lg overflow-hidden">
|
|
543
|
+
<SidebarLayout class="min-h-192! relative!">
|
|
544
|
+
<SidebarBackdrop v-if="isMobile && (navOpen || open)" class="absolute!" />
|
|
545
|
+
<!-- Left sidebar - icon collapsible -->
|
|
546
|
+
<Sidebar id="nav" side="left" :collapsible="isMobile ? 'offcanvas' : 'icon'" :overlay="isMobile" v-model:open="navOpen" width="14rem">
|
|
547
|
+
<SidebarSpacer />
|
|
548
|
+
<SidebarAside>
|
|
549
|
+
<SidebarPanel>
|
|
550
|
+
<SidebarHeader>
|
|
551
|
+
<SidebarMenu>
|
|
552
|
+
<SidebarMenuItem>
|
|
553
|
+
<SidebarMenuButton class="p-1!">
|
|
554
|
+
<div class="flex size-6 shrink-0 items-center justify-center rounded-md bg-linear-to-br from-violet-500 to-indigo-600 text-white text-xs font-bold leading-none">A</div>
|
|
555
|
+
<span class="font-semibold text-sm">Acme Inc</span>
|
|
556
|
+
</SidebarMenuButton>
|
|
557
|
+
</SidebarMenuItem>
|
|
558
|
+
</SidebarMenu>
|
|
559
|
+
</SidebarHeader>
|
|
560
|
+
|
|
561
|
+
<SidebarContent>
|
|
562
|
+
<SidebarGroup>
|
|
563
|
+
<SidebarGroupLabel>Navigation</SidebarGroupLabel>
|
|
564
|
+
<SidebarGroupContent>
|
|
565
|
+
<SidebarMenu>
|
|
566
|
+
<SidebarMenuItem>
|
|
567
|
+
<SidebarMenuButton :isActive="true">
|
|
568
|
+
<Home />
|
|
569
|
+
<span>Home</span>
|
|
570
|
+
</SidebarMenuButton>
|
|
571
|
+
</SidebarMenuItem>
|
|
572
|
+
<SidebarMenuItem>
|
|
573
|
+
<SidebarMenuButton>
|
|
574
|
+
<Inbox />
|
|
575
|
+
<span>Inbox</span>
|
|
576
|
+
</SidebarMenuButton>
|
|
577
|
+
<SidebarMenuBadge>5</SidebarMenuBadge>
|
|
578
|
+
</SidebarMenuItem>
|
|
579
|
+
<SidebarMenuItem>
|
|
580
|
+
<SidebarMenuButton>
|
|
581
|
+
<Search />
|
|
582
|
+
<span>Search</span>
|
|
583
|
+
</SidebarMenuButton>
|
|
584
|
+
</SidebarMenuItem>
|
|
585
|
+
<SidebarMenuItem>
|
|
586
|
+
<SidebarMenuButton>
|
|
587
|
+
<Bell />
|
|
588
|
+
<span>Notifications</span>
|
|
589
|
+
</SidebarMenuButton>
|
|
590
|
+
</SidebarMenuItem>
|
|
591
|
+
</SidebarMenu>
|
|
592
|
+
</SidebarGroupContent>
|
|
593
|
+
</SidebarGroup>
|
|
594
|
+
|
|
595
|
+
<SidebarGroup>
|
|
596
|
+
<SidebarGroupLabel>Projects</SidebarGroupLabel>
|
|
597
|
+
<SidebarGroupContent>
|
|
598
|
+
<SidebarMenu>
|
|
599
|
+
<SidebarMenuItem :collapsible="true" :defaultOpen="true">
|
|
600
|
+
<SidebarMenuButton>
|
|
601
|
+
<ChartBar />
|
|
602
|
+
<span>Analytics</span>
|
|
603
|
+
<ChevronDown class="ml-auto transition-transform duration-200 [[data-open]>&]:rotate-180" />
|
|
604
|
+
</SidebarMenuButton>
|
|
605
|
+
<SidebarMenuSub>
|
|
606
|
+
<SidebarMenuSubItem>
|
|
607
|
+
<SidebarMenuSubButton :isActive="true">Overview</SidebarMenuSubButton>
|
|
608
|
+
</SidebarMenuSubItem>
|
|
609
|
+
<SidebarMenuSubItem>
|
|
610
|
+
<SidebarMenuSubButton>Reports</SidebarMenuSubButton>
|
|
611
|
+
</SidebarMenuSubItem>
|
|
612
|
+
</SidebarMenuSub>
|
|
613
|
+
</SidebarMenuItem>
|
|
614
|
+
<SidebarMenuItem>
|
|
615
|
+
<SidebarMenuButton>
|
|
616
|
+
<Users />
|
|
617
|
+
<span>Team</span>
|
|
618
|
+
</SidebarMenuButton>
|
|
619
|
+
</SidebarMenuItem>
|
|
620
|
+
<SidebarMenuItem>
|
|
621
|
+
<SidebarMenuButton>
|
|
622
|
+
<CalendarIcon />
|
|
623
|
+
<span>Calendar</span>
|
|
624
|
+
</SidebarMenuButton>
|
|
625
|
+
</SidebarMenuItem>
|
|
626
|
+
</SidebarMenu>
|
|
627
|
+
</SidebarGroupContent>
|
|
628
|
+
</SidebarGroup>
|
|
629
|
+
</SidebarContent>
|
|
630
|
+
|
|
631
|
+
<SidebarFooter>
|
|
632
|
+
<SidebarMenu>
|
|
633
|
+
<SidebarMenuItem>
|
|
634
|
+
<SidebarMenuButton>
|
|
635
|
+
<Cog />
|
|
636
|
+
<span>Settings</span>
|
|
637
|
+
</SidebarMenuButton>
|
|
638
|
+
</SidebarMenuItem>
|
|
639
|
+
</SidebarMenu>
|
|
640
|
+
</SidebarFooter>
|
|
641
|
+
</SidebarPanel>
|
|
642
|
+
</SidebarAside>
|
|
643
|
+
</Sidebar>
|
|
644
|
+
|
|
645
|
+
<!-- Main content -->
|
|
646
|
+
<SidebarMain>
|
|
647
|
+
<header class="flex h-12 items-center gap-2 border-b border-surface-200 dark:border-surface-700 px-4">
|
|
648
|
+
<SidebarTrigger target="nav" severity="secondary" :text="true" size="small">
|
|
649
|
+
<SidebarIcon />
|
|
650
|
+
</SidebarTrigger>
|
|
651
|
+
<span class="text-sm font-medium flex-1">Dashboard</span>
|
|
652
|
+
<SidebarTrigger target="ai" severity="secondary" :text="true" size="small">
|
|
653
|
+
<Comment />
|
|
654
|
+
</SidebarTrigger>
|
|
655
|
+
</header>
|
|
656
|
+
<div class="flex-1 p-4 flex flex-col gap-4">
|
|
657
|
+
<div class="rounded-lg bg-surface-100 dark:bg-surface-800 h-48"></div>
|
|
658
|
+
<div class="rounded-lg bg-surface-100 dark:bg-surface-800 flex-1"></div>
|
|
659
|
+
</div>
|
|
660
|
+
</SidebarMain>
|
|
661
|
+
|
|
662
|
+
<!-- Right sidebar - Claude-style chat, offcanvas -->
|
|
663
|
+
<Sidebar id="ai" side="right" collapsible="offcanvas" overlay v-model:open="open" width="18rem">
|
|
664
|
+
<SidebarSpacer />
|
|
665
|
+
<SidebarAside>
|
|
666
|
+
<SidebarPanel>
|
|
667
|
+
<SidebarHeader>
|
|
668
|
+
<div class="flex items-center gap-2 px-1">
|
|
669
|
+
<span class="font-semibold text-sm text-surface-500">Weekly metrics overview</span>
|
|
670
|
+
</div>
|
|
671
|
+
</SidebarHeader>
|
|
672
|
+
|
|
673
|
+
<SidebarContent>
|
|
674
|
+
<div class="flex flex-col gap-4 px-3 py-2">
|
|
675
|
+
<div class="rounded-xl bg-surface-100 dark:bg-surface-800 px-3 py-2.5 text-sm">Show me this week's metrics</div>
|
|
676
|
+
|
|
677
|
+
<div class="text-sm leading-relaxed">
|
|
678
|
+
<p>Here are your key metrics for this week:</p>
|
|
679
|
+
<ul class="mt-2 space-y-1.5 text-muted-color">
|
|
680
|
+
<li class="flex justify-between">
|
|
681
|
+
<span>Page views</span>
|
|
682
|
+
<span class="font-medium text-color">12,482</span>
|
|
683
|
+
</li>
|
|
684
|
+
<li class="flex justify-between">
|
|
685
|
+
<span>New users</span>
|
|
686
|
+
<span class="font-medium text-color">342</span>
|
|
687
|
+
</li>
|
|
688
|
+
<li class="flex justify-between">
|
|
689
|
+
<span>Bounce rate</span>
|
|
690
|
+
<span class="font-medium text-color">34%</span>
|
|
691
|
+
</li>
|
|
692
|
+
</ul>
|
|
693
|
+
</div>
|
|
694
|
+
</div>
|
|
695
|
+
</SidebarContent>
|
|
696
|
+
|
|
697
|
+
<SidebarFooter>
|
|
698
|
+
<div class="mx-1 rounded-xl border border-surface-200 dark:border-surface-700 px-3 py-2.5">
|
|
699
|
+
<input type="text" placeholder="Reply to Claude..." class="w-full bg-transparent border-none outline-none text-sm" />
|
|
700
|
+
</div>
|
|
701
|
+
</SidebarFooter>
|
|
702
|
+
</SidebarPanel>
|
|
703
|
+
</SidebarAside>
|
|
704
|
+
</Sidebar>
|
|
705
|
+
</SidebarLayout>
|
|
706
|
+
</div>
|
|
707
|
+
</template>
|
|
708
|
+
|
|
709
|
+
<script setup>
|
|
710
|
+
import { onBeforeUnmount, onMounted, ref } from 'vue';
|
|
711
|
+
import Bell from '@primeicons/vue/bell';
|
|
712
|
+
import CalendarIcon from '@primeicons/vue/calendar';
|
|
713
|
+
import ChartBar from '@primeicons/vue/chart-bar';
|
|
714
|
+
import ChevronDown from '@primeicons/vue/chevron-down';
|
|
715
|
+
import Cog from '@primeicons/vue/cog';
|
|
716
|
+
import Comment from '@primeicons/vue/comment';
|
|
717
|
+
import Home from '@primeicons/vue/home';
|
|
718
|
+
import Inbox from '@primeicons/vue/inbox';
|
|
719
|
+
import Search from '@primeicons/vue/search';
|
|
720
|
+
import SidebarIcon from '@primeicons/vue/sidebar';
|
|
721
|
+
import Users from '@primeicons/vue/users';
|
|
722
|
+
|
|
723
|
+
const isMobile = ref(false);
|
|
724
|
+
const navOpen = ref(true);
|
|
725
|
+
const open = ref(false);
|
|
726
|
+
let mql = null;
|
|
727
|
+
let onMqlChange = null;
|
|
728
|
+
|
|
729
|
+
onMounted(() => {
|
|
730
|
+
if (typeof window === 'undefined') return;
|
|
731
|
+
|
|
732
|
+
mql = window.matchMedia('(max-width: 1023px)');
|
|
733
|
+
isMobile.value = mql.matches;
|
|
734
|
+
navOpen.value = !isMobile.value;
|
|
735
|
+
onMqlChange = (event) => {
|
|
736
|
+
isMobile.value = event.matches;
|
|
737
|
+
navOpen.value = !event.matches;
|
|
738
|
+
};
|
|
739
|
+
mql.addEventListener('change', onMqlChange);
|
|
740
|
+
});
|
|
741
|
+
|
|
742
|
+
onBeforeUnmount(() => {
|
|
743
|
+
if (mql && onMqlChange) {
|
|
744
|
+
mql.removeEventListener('change', onMqlChange);
|
|
745
|
+
}
|
|
746
|
+
});
|
|
747
|
+
<\/script>
|
|
748
|
+
```
|
|
749
|
+
|
|
750
|
+
## Multi Sidebar
|
|
751
|
+
|
|
752
|
+
Two stacked sidebars within a single SidebarLayout : a hover-to-open icon bar (icon mode + overlay) and a secondary panel that stays open on desktop and collapses to an offcanvas overlay on smaller screens. IDE-like layout.
|
|
753
|
+
|
|
754
|
+
```vue
|
|
755
|
+
<template>
|
|
756
|
+
<div class="border border-surface-200 dark:border-surface-700 rounded-lg overflow-hidden">
|
|
757
|
+
<SidebarLayout class="min-h-192! relative!">
|
|
758
|
+
<SidebarBackdrop v-if="isMobile && (open || secondaryOpen)" class="absolute!" />
|
|
759
|
+
<!-- Icon bar - always collapsed, opens on hover as overlay -->
|
|
760
|
+
<Sidebar id="iconbar" side="left" :collapsible="isMobile ? 'offcanvas' : 'icon'" :overlay="true" :openOnHover="!isMobile" width="12rem" v-model:open="open">
|
|
761
|
+
<SidebarSpacer />
|
|
762
|
+
<SidebarAside>
|
|
763
|
+
<SidebarPanel>
|
|
764
|
+
<SidebarHeader>
|
|
765
|
+
<SidebarMenu>
|
|
766
|
+
<SidebarMenuItem>
|
|
767
|
+
<SidebarMenuButton class="p-1!">
|
|
768
|
+
<div class="flex size-6 shrink-0 items-center justify-center rounded-md bg-emerald-600 text-white text-xs font-bold leading-none">A</div>
|
|
769
|
+
<span class="font-semibold text-sm">Acme Inc</span>
|
|
770
|
+
</SidebarMenuButton>
|
|
771
|
+
</SidebarMenuItem>
|
|
772
|
+
</SidebarMenu>
|
|
773
|
+
</SidebarHeader>
|
|
774
|
+
|
|
775
|
+
<SidebarContent>
|
|
776
|
+
<SidebarGroup>
|
|
777
|
+
<SidebarGroupContent>
|
|
778
|
+
<SidebarMenu>
|
|
779
|
+
<SidebarMenuItem>
|
|
780
|
+
<SidebarMenuButton :isActive="true">
|
|
781
|
+
<Home />
|
|
782
|
+
<span>Home</span>
|
|
783
|
+
</SidebarMenuButton>
|
|
784
|
+
</SidebarMenuItem>
|
|
785
|
+
<SidebarMenuItem>
|
|
786
|
+
<SidebarMenuButton>
|
|
787
|
+
<Database />
|
|
788
|
+
<span>Database</span>
|
|
789
|
+
</SidebarMenuButton>
|
|
790
|
+
</SidebarMenuItem>
|
|
791
|
+
<SidebarMenuItem>
|
|
792
|
+
<SidebarMenuButton>
|
|
793
|
+
<Key />
|
|
794
|
+
<span>Authentication</span>
|
|
795
|
+
</SidebarMenuButton>
|
|
796
|
+
</SidebarMenuItem>
|
|
797
|
+
<SidebarMenuItem>
|
|
798
|
+
<SidebarMenuButton>
|
|
799
|
+
<Server />
|
|
800
|
+
<span>Edge Functions</span>
|
|
801
|
+
</SidebarMenuButton>
|
|
802
|
+
</SidebarMenuItem>
|
|
803
|
+
<SidebarMenuItem>
|
|
804
|
+
<SidebarMenuButton>
|
|
805
|
+
<Globe />
|
|
806
|
+
<span>Storage</span>
|
|
807
|
+
</SidebarMenuButton>
|
|
808
|
+
</SidebarMenuItem>
|
|
809
|
+
<SidebarMenuItem>
|
|
810
|
+
<SidebarMenuButton>
|
|
811
|
+
<Code />
|
|
812
|
+
<span>SQL Editor</span>
|
|
813
|
+
</SidebarMenuButton>
|
|
814
|
+
</SidebarMenuItem>
|
|
815
|
+
</SidebarMenu>
|
|
816
|
+
</SidebarGroupContent>
|
|
817
|
+
</SidebarGroup>
|
|
818
|
+
</SidebarContent>
|
|
819
|
+
|
|
820
|
+
<SidebarFooter>
|
|
821
|
+
<SidebarMenu>
|
|
822
|
+
<SidebarMenuItem>
|
|
823
|
+
<SidebarMenuButton>
|
|
824
|
+
<Cog />
|
|
825
|
+
<span>Settings</span>
|
|
826
|
+
</SidebarMenuButton>
|
|
827
|
+
</SidebarMenuItem>
|
|
828
|
+
</SidebarMenu>
|
|
829
|
+
</SidebarFooter>
|
|
830
|
+
</SidebarPanel>
|
|
831
|
+
</SidebarAside>
|
|
832
|
+
</Sidebar>
|
|
833
|
+
|
|
834
|
+
<!-- Secondary sidebar - always open on desktop, offcanvas on mobile -->
|
|
835
|
+
<Sidebar id="secondary" side="left" width="14rem" :collapsible="isMobile ? 'offcanvas' : 'none'" :overlay="isMobile" v-model:open="secondaryOpen">
|
|
836
|
+
<SidebarSpacer />
|
|
837
|
+
<SidebarAside>
|
|
838
|
+
<SidebarPanel>
|
|
839
|
+
<SidebarHeader>
|
|
840
|
+
<div class="px-1">
|
|
841
|
+
<span class="font-semibold text-sm">Settings</span>
|
|
842
|
+
</div>
|
|
843
|
+
</SidebarHeader>
|
|
844
|
+
|
|
845
|
+
<SidebarContent>
|
|
846
|
+
<SidebarGroup>
|
|
847
|
+
<SidebarGroupLabel>Configuration</SidebarGroupLabel>
|
|
848
|
+
<SidebarGroupContent>
|
|
849
|
+
<SidebarMenu>
|
|
850
|
+
<SidebarMenuItem>
|
|
851
|
+
<SidebarMenuButton :isActive="true"><span>General</span></SidebarMenuButton>
|
|
852
|
+
</SidebarMenuItem>
|
|
853
|
+
<SidebarMenuItem>
|
|
854
|
+
<SidebarMenuButton><span>Compute and Disk</span></SidebarMenuButton>
|
|
855
|
+
</SidebarMenuItem>
|
|
856
|
+
<SidebarMenuItem>
|
|
857
|
+
<SidebarMenuButton><span>Infrastructure</span></SidebarMenuButton>
|
|
858
|
+
</SidebarMenuItem>
|
|
859
|
+
<SidebarMenuItem>
|
|
860
|
+
<SidebarMenuButton><span>Integrations</span></SidebarMenuButton>
|
|
861
|
+
</SidebarMenuItem>
|
|
862
|
+
<SidebarMenuItem>
|
|
863
|
+
<SidebarMenuButton><span>API Keys</span></SidebarMenuButton>
|
|
864
|
+
</SidebarMenuItem>
|
|
865
|
+
<SidebarMenuItem>
|
|
866
|
+
<SidebarMenuButton><span>JWT Keys</span></SidebarMenuButton>
|
|
867
|
+
</SidebarMenuItem>
|
|
868
|
+
<SidebarMenuItem>
|
|
869
|
+
<SidebarMenuButton><span>Log Drains</span></SidebarMenuButton>
|
|
870
|
+
</SidebarMenuItem>
|
|
871
|
+
<SidebarMenuItem>
|
|
872
|
+
<SidebarMenuButton><span>Add-ons</span></SidebarMenuButton>
|
|
873
|
+
</SidebarMenuItem>
|
|
874
|
+
</SidebarMenu>
|
|
875
|
+
</SidebarGroupContent>
|
|
876
|
+
</SidebarGroup>
|
|
877
|
+
|
|
878
|
+
<SidebarGroup>
|
|
879
|
+
<SidebarGroupLabel>Integrations</SidebarGroupLabel>
|
|
880
|
+
<SidebarGroupContent>
|
|
881
|
+
<SidebarMenu>
|
|
882
|
+
<SidebarMenuItem>
|
|
883
|
+
<SidebarMenuButton>
|
|
884
|
+
<span>Data API</span>
|
|
885
|
+
<ExternalLink class="ml-auto" />
|
|
886
|
+
</SidebarMenuButton>
|
|
887
|
+
</SidebarMenuItem>
|
|
888
|
+
<SidebarMenuItem>
|
|
889
|
+
<SidebarMenuButton>
|
|
890
|
+
<span>Vault</span>
|
|
891
|
+
<SidebarMenuBadge>BETA</SidebarMenuBadge>
|
|
892
|
+
</SidebarMenuButton>
|
|
893
|
+
</SidebarMenuItem>
|
|
894
|
+
</SidebarMenu>
|
|
895
|
+
</SidebarGroupContent>
|
|
896
|
+
</SidebarGroup>
|
|
897
|
+
|
|
898
|
+
<SidebarGroup>
|
|
899
|
+
<SidebarGroupLabel>Billing</SidebarGroupLabel>
|
|
900
|
+
<SidebarGroupContent>
|
|
901
|
+
<SidebarMenu>
|
|
902
|
+
<SidebarMenuItem>
|
|
903
|
+
<SidebarMenuButton>
|
|
904
|
+
<span>Subscription</span>
|
|
905
|
+
<ExternalLink class="ml-auto" />
|
|
906
|
+
</SidebarMenuButton>
|
|
907
|
+
</SidebarMenuItem>
|
|
908
|
+
<SidebarMenuItem>
|
|
909
|
+
<SidebarMenuButton>
|
|
910
|
+
<span>Usage</span>
|
|
911
|
+
<ExternalLink class="ml-auto" />
|
|
912
|
+
</SidebarMenuButton>
|
|
913
|
+
</SidebarMenuItem>
|
|
914
|
+
</SidebarMenu>
|
|
915
|
+
</SidebarGroupContent>
|
|
916
|
+
</SidebarGroup>
|
|
917
|
+
</SidebarContent>
|
|
918
|
+
</SidebarPanel>
|
|
919
|
+
</SidebarAside>
|
|
920
|
+
</Sidebar>
|
|
921
|
+
|
|
922
|
+
<!-- Main content -->
|
|
923
|
+
<SidebarMain>
|
|
924
|
+
<header class="flex h-12 items-center gap-2 border-b border-surface-200 dark:border-surface-700 px-4">
|
|
925
|
+
<SidebarTrigger v-if="isMobile" target="iconbar" severity="secondary" :text="true" size="small">
|
|
926
|
+
<SidebarIcon />
|
|
927
|
+
</SidebarTrigger>
|
|
928
|
+
<SidebarTrigger v-if="isMobile" target="secondary" severity="secondary" :text="true" size="small">
|
|
929
|
+
<Cog />
|
|
930
|
+
</SidebarTrigger>
|
|
931
|
+
<span class="text-sm font-medium">Table Editor</span>
|
|
932
|
+
<span class="text-xs text-muted-color">/ users</span>
|
|
933
|
+
</header>
|
|
934
|
+
<div class="flex-1 p-4 flex flex-col gap-4">
|
|
935
|
+
<div class="rounded-lg bg-surface-100 dark:bg-surface-800 h-48"></div>
|
|
936
|
+
<div class="rounded-lg bg-surface-100 dark:bg-surface-800 flex-1"></div>
|
|
937
|
+
</div>
|
|
938
|
+
</SidebarMain>
|
|
939
|
+
</SidebarLayout>
|
|
940
|
+
</div>
|
|
941
|
+
</template>
|
|
942
|
+
|
|
943
|
+
<script setup>
|
|
944
|
+
import { onBeforeUnmount, onMounted, ref } from 'vue';
|
|
945
|
+
import Code from '@primeicons/vue/code';
|
|
946
|
+
import Cog from '@primeicons/vue/cog';
|
|
947
|
+
import Database from '@primeicons/vue/database';
|
|
948
|
+
import ExternalLink from '@primeicons/vue/external-link';
|
|
949
|
+
import Globe from '@primeicons/vue/globe';
|
|
950
|
+
import Home from '@primeicons/vue/home';
|
|
951
|
+
import Key from '@primeicons/vue/key';
|
|
952
|
+
import Server from '@primeicons/vue/server';
|
|
953
|
+
import SidebarIcon from '@primeicons/vue/sidebar';
|
|
954
|
+
|
|
955
|
+
const isMobile = ref(false);
|
|
956
|
+
const open = ref(false);
|
|
957
|
+
const secondaryOpen = ref(true);
|
|
958
|
+
let mql = null;
|
|
959
|
+
let onMqlChange = null;
|
|
960
|
+
|
|
961
|
+
onMounted(() => {
|
|
962
|
+
if (typeof window === 'undefined') return;
|
|
963
|
+
|
|
964
|
+
mql = window.matchMedia('(max-width: 1023px)');
|
|
965
|
+
isMobile.value = mql.matches;
|
|
966
|
+
secondaryOpen.value = !isMobile.value;
|
|
967
|
+
onMqlChange = (event) => {
|
|
968
|
+
isMobile.value = event.matches;
|
|
969
|
+
secondaryOpen.value = !event.matches;
|
|
970
|
+
};
|
|
971
|
+
mql.addEventListener('change', onMqlChange);
|
|
972
|
+
});
|
|
973
|
+
|
|
974
|
+
onBeforeUnmount(() => {
|
|
975
|
+
if (mql && onMqlChange) {
|
|
976
|
+
mql.removeEventListener('change', onMqlChange);
|
|
977
|
+
}
|
|
978
|
+
});
|
|
979
|
+
<\/script>
|
|
980
|
+
```
|
|
981
|
+
|
|
982
|
+
## Nested Menu
|
|
983
|
+
|
|
984
|
+
Menu items become collapsible to reveal a nested SidebarMenuSub with deep trees and active-state tracking.
|
|
985
|
+
|
|
986
|
+
```vue
|
|
987
|
+
<template>
|
|
988
|
+
<div class="border border-surface-200 dark:border-surface-700 rounded-lg overflow-hidden">
|
|
989
|
+
<SidebarLayout class="min-h-192! relative!">
|
|
990
|
+
<SidebarBackdrop v-if="isMobile && open" class="absolute!" />
|
|
991
|
+
<Sidebar id="nested" :collapsible="isMobile ? 'offcanvas' : 'icon'" :overlay="isMobile" v-model:open="open">
|
|
992
|
+
<SidebarSpacer />
|
|
993
|
+
<SidebarAside>
|
|
994
|
+
<SidebarPanel>
|
|
995
|
+
<SidebarHeader>
|
|
996
|
+
<SidebarMenu>
|
|
997
|
+
<SidebarMenuItem>
|
|
998
|
+
<SidebarMenuButton class="p-1!">
|
|
999
|
+
<div class="flex size-6 shrink-0 items-center justify-center rounded-md bg-linear-to-br from-emerald-500 to-teal-600 text-white text-xs font-bold leading-none">F</div>
|
|
1000
|
+
<span class="font-semibold text-sm">File Manager</span>
|
|
1001
|
+
</SidebarMenuButton>
|
|
1002
|
+
</SidebarMenuItem>
|
|
1003
|
+
</SidebarMenu>
|
|
1004
|
+
</SidebarHeader>
|
|
1005
|
+
|
|
1006
|
+
<SidebarContent>
|
|
1007
|
+
<SidebarGroup>
|
|
1008
|
+
<SidebarGroupLabel>Files</SidebarGroupLabel>
|
|
1009
|
+
<SidebarGroupContent>
|
|
1010
|
+
<SidebarMenu>
|
|
1011
|
+
<SidebarMenuItem :collapsible="true" :defaultOpen="true">
|
|
1012
|
+
<SidebarMenuButton>
|
|
1013
|
+
<Folder />
|
|
1014
|
+
<span>Documents</span>
|
|
1015
|
+
<ChevronDown class="ml-auto transition-transform duration-200 [[data-open]>&]:rotate-180" />
|
|
1016
|
+
</SidebarMenuButton>
|
|
1017
|
+
<SidebarMenuSub>
|
|
1018
|
+
<SidebarMenuItem :collapsible="true" :defaultOpen="true">
|
|
1019
|
+
<SidebarMenuButton>
|
|
1020
|
+
<span>Work</span>
|
|
1021
|
+
<ChevronDown class="ml-auto transition-transform duration-200 [[data-open]>&]:rotate-180" />
|
|
1022
|
+
</SidebarMenuButton>
|
|
1023
|
+
<SidebarMenuSub>
|
|
1024
|
+
<SidebarMenuItem :collapsible="true" :defaultOpen="true">
|
|
1025
|
+
<SidebarMenuButton>
|
|
1026
|
+
<span>Projects</span>
|
|
1027
|
+
<ChevronDown class="ml-auto transition-transform duration-200 [[data-open]>&]:rotate-180" />
|
|
1028
|
+
</SidebarMenuButton>
|
|
1029
|
+
<SidebarMenuSub>
|
|
1030
|
+
<SidebarMenuSubItem>
|
|
1031
|
+
<SidebarMenuSubButton :isActive="true">
|
|
1032
|
+
<span>Q1 Report</span>
|
|
1033
|
+
</SidebarMenuSubButton>
|
|
1034
|
+
</SidebarMenuSubItem>
|
|
1035
|
+
<SidebarMenuSubItem>
|
|
1036
|
+
<SidebarMenuSubButton>
|
|
1037
|
+
<span>Q2 Report</span>
|
|
1038
|
+
</SidebarMenuSubButton>
|
|
1039
|
+
</SidebarMenuSubItem>
|
|
1040
|
+
<SidebarMenuSubItem>
|
|
1041
|
+
<SidebarMenuSubButton>
|
|
1042
|
+
<span>Roadmap</span>
|
|
1043
|
+
</SidebarMenuSubButton>
|
|
1044
|
+
</SidebarMenuSubItem>
|
|
1045
|
+
</SidebarMenuSub>
|
|
1046
|
+
</SidebarMenuItem>
|
|
1047
|
+
<SidebarMenuSubItem>
|
|
1048
|
+
<SidebarMenuSubButton>
|
|
1049
|
+
<span>Invoices</span>
|
|
1050
|
+
</SidebarMenuSubButton>
|
|
1051
|
+
</SidebarMenuSubItem>
|
|
1052
|
+
<SidebarMenuSubItem>
|
|
1053
|
+
<SidebarMenuSubButton>
|
|
1054
|
+
<span>Contracts</span>
|
|
1055
|
+
</SidebarMenuSubButton>
|
|
1056
|
+
</SidebarMenuSubItem>
|
|
1057
|
+
</SidebarMenuSub>
|
|
1058
|
+
</SidebarMenuItem>
|
|
1059
|
+
<SidebarMenuItem :collapsible="true">
|
|
1060
|
+
<SidebarMenuButton>
|
|
1061
|
+
<span>Personal</span>
|
|
1062
|
+
<ChevronDown class="ml-auto transition-transform duration-200 [[data-open]>&]:rotate-180" />
|
|
1063
|
+
</SidebarMenuButton>
|
|
1064
|
+
<SidebarMenuSub>
|
|
1065
|
+
<SidebarMenuSubItem>
|
|
1066
|
+
<SidebarMenuSubButton>
|
|
1067
|
+
<span>Recipes</span>
|
|
1068
|
+
</SidebarMenuSubButton>
|
|
1069
|
+
</SidebarMenuSubItem>
|
|
1070
|
+
<SidebarMenuSubItem>
|
|
1071
|
+
<SidebarMenuSubButton>
|
|
1072
|
+
<span>Travel</span>
|
|
1073
|
+
</SidebarMenuSubButton>
|
|
1074
|
+
</SidebarMenuSubItem>
|
|
1075
|
+
</SidebarMenuSub>
|
|
1076
|
+
</SidebarMenuItem>
|
|
1077
|
+
</SidebarMenuSub>
|
|
1078
|
+
</SidebarMenuItem>
|
|
1079
|
+
</SidebarMenu>
|
|
1080
|
+
</SidebarGroupContent>
|
|
1081
|
+
</SidebarGroup>
|
|
1082
|
+
|
|
1083
|
+
<SidebarGroup>
|
|
1084
|
+
<SidebarGroupLabel>Media</SidebarGroupLabel>
|
|
1085
|
+
<SidebarGroupContent>
|
|
1086
|
+
<SidebarMenu>
|
|
1087
|
+
<SidebarMenuItem :collapsible="true">
|
|
1088
|
+
<SidebarMenuButton>
|
|
1089
|
+
<ImageIcon />
|
|
1090
|
+
<span>Photos</span>
|
|
1091
|
+
<ChevronDown class="ml-auto transition-transform duration-200 [[data-open]>&]:rotate-180" />
|
|
1092
|
+
</SidebarMenuButton>
|
|
1093
|
+
<SidebarMenuSub>
|
|
1094
|
+
<SidebarMenuSubItem>
|
|
1095
|
+
<SidebarMenuSubButton>
|
|
1096
|
+
<span>2024</span>
|
|
1097
|
+
</SidebarMenuSubButton>
|
|
1098
|
+
</SidebarMenuSubItem>
|
|
1099
|
+
<SidebarMenuSubItem>
|
|
1100
|
+
<SidebarMenuSubButton>
|
|
1101
|
+
<span>2025</span>
|
|
1102
|
+
</SidebarMenuSubButton>
|
|
1103
|
+
</SidebarMenuSubItem>
|
|
1104
|
+
</SidebarMenuSub>
|
|
1105
|
+
</SidebarMenuItem>
|
|
1106
|
+
<SidebarMenuItem :collapsible="true">
|
|
1107
|
+
<SidebarMenuButton>
|
|
1108
|
+
<Video />
|
|
1109
|
+
<span>Videos</span>
|
|
1110
|
+
<ChevronDown class="ml-auto transition-transform duration-200 [[data-open]>&]:rotate-180" />
|
|
1111
|
+
</SidebarMenuButton>
|
|
1112
|
+
<SidebarMenuSub>
|
|
1113
|
+
<SidebarMenuSubItem>
|
|
1114
|
+
<SidebarMenuSubButton>
|
|
1115
|
+
<span>Tutorials</span>
|
|
1116
|
+
</SidebarMenuSubButton>
|
|
1117
|
+
</SidebarMenuSubItem>
|
|
1118
|
+
<SidebarMenuSubItem>
|
|
1119
|
+
<SidebarMenuSubButton>
|
|
1120
|
+
<span>Recordings</span>
|
|
1121
|
+
</SidebarMenuSubButton>
|
|
1122
|
+
</SidebarMenuSubItem>
|
|
1123
|
+
</SidebarMenuSub>
|
|
1124
|
+
</SidebarMenuItem>
|
|
1125
|
+
</SidebarMenu>
|
|
1126
|
+
</SidebarGroupContent>
|
|
1127
|
+
</SidebarGroup>
|
|
1128
|
+
|
|
1129
|
+
<SidebarGroup>
|
|
1130
|
+
<SidebarGroupLabel>Bookmarks</SidebarGroupLabel>
|
|
1131
|
+
<SidebarGroupContent>
|
|
1132
|
+
<SidebarMenu>
|
|
1133
|
+
<SidebarMenuItem :collapsible="true">
|
|
1134
|
+
<SidebarMenuButton>
|
|
1135
|
+
<Globe />
|
|
1136
|
+
<span>Websites</span>
|
|
1137
|
+
<ChevronDown class="ml-auto transition-transform duration-200 [[data-open]>&]:rotate-180" />
|
|
1138
|
+
</SidebarMenuButton>
|
|
1139
|
+
<SidebarMenuSub>
|
|
1140
|
+
<SidebarMenuSubItem>
|
|
1141
|
+
<SidebarMenuSubButton>
|
|
1142
|
+
<span>Blog</span>
|
|
1143
|
+
</SidebarMenuSubButton>
|
|
1144
|
+
</SidebarMenuSubItem>
|
|
1145
|
+
<SidebarMenuSubItem>
|
|
1146
|
+
<SidebarMenuSubButton>
|
|
1147
|
+
<span>Portfolio</span>
|
|
1148
|
+
</SidebarMenuSubButton>
|
|
1149
|
+
</SidebarMenuSubItem>
|
|
1150
|
+
<SidebarMenuSubItem>
|
|
1151
|
+
<SidebarMenuSubButton>
|
|
1152
|
+
<span>Documentation</span>
|
|
1153
|
+
</SidebarMenuSubButton>
|
|
1154
|
+
</SidebarMenuSubItem>
|
|
1155
|
+
</SidebarMenuSub>
|
|
1156
|
+
</SidebarMenuItem>
|
|
1157
|
+
</SidebarMenu>
|
|
1158
|
+
</SidebarGroupContent>
|
|
1159
|
+
</SidebarGroup>
|
|
1160
|
+
</SidebarContent>
|
|
1161
|
+
|
|
1162
|
+
<SidebarFooter>
|
|
1163
|
+
<SidebarMenu>
|
|
1164
|
+
<SidebarMenuItem>
|
|
1165
|
+
<SidebarMenuButton class="p-1!">
|
|
1166
|
+
<Avatar label="JD" shape="circle" class="size-6 shrink-0 text-xs" />
|
|
1167
|
+
<span>John Doe</span>
|
|
1168
|
+
</SidebarMenuButton>
|
|
1169
|
+
</SidebarMenuItem>
|
|
1170
|
+
</SidebarMenu>
|
|
1171
|
+
</SidebarFooter>
|
|
1172
|
+
<SidebarRail />
|
|
1173
|
+
</SidebarPanel>
|
|
1174
|
+
</SidebarAside>
|
|
1175
|
+
</Sidebar>
|
|
1176
|
+
|
|
1177
|
+
<SidebarMain>
|
|
1178
|
+
<header class="flex h-12 items-center gap-2 border-b border-surface-200 dark:border-surface-700 px-4">
|
|
1179
|
+
<SidebarTrigger severity="secondary" target="nested" :text="true" size="small">
|
|
1180
|
+
<SidebarIcon />
|
|
1181
|
+
</SidebarTrigger>
|
|
1182
|
+
<span class="text-sm font-medium">File Manager</span>
|
|
1183
|
+
</header>
|
|
1184
|
+
<div class="flex-1 p-6">
|
|
1185
|
+
<h1 class="text-2xl font-bold mb-4">Q1 Report</h1>
|
|
1186
|
+
<p class="text-muted-color">Documents > Work > Projects > Q1 Report</p>
|
|
1187
|
+
</div>
|
|
1188
|
+
</SidebarMain>
|
|
1189
|
+
</SidebarLayout>
|
|
1190
|
+
</div>
|
|
1191
|
+
</template>
|
|
1192
|
+
|
|
1193
|
+
<script setup>
|
|
1194
|
+
import { onBeforeUnmount, onMounted, ref } from 'vue';
|
|
1195
|
+
import ChevronDown from '@primeicons/vue/chevron-down';
|
|
1196
|
+
import Folder from '@primeicons/vue/folder';
|
|
1197
|
+
import Globe from '@primeicons/vue/globe';
|
|
1198
|
+
import ImageIcon from '@primeicons/vue/image';
|
|
1199
|
+
import SidebarIcon from '@primeicons/vue/sidebar';
|
|
1200
|
+
import Video from '@primeicons/vue/video';
|
|
1201
|
+
|
|
1202
|
+
const isMobile = ref(false);
|
|
1203
|
+
const open = ref(true);
|
|
1204
|
+
let mql = null;
|
|
1205
|
+
let onMqlChange = null;
|
|
1206
|
+
|
|
1207
|
+
onMounted(() => {
|
|
1208
|
+
if (typeof window === 'undefined') return;
|
|
1209
|
+
|
|
1210
|
+
mql = window.matchMedia('(max-width: 1023px)');
|
|
1211
|
+
isMobile.value = mql.matches;
|
|
1212
|
+
open.value = !isMobile.value;
|
|
1213
|
+
onMqlChange = (event) => {
|
|
1214
|
+
isMobile.value = event.matches;
|
|
1215
|
+
open.value = !event.matches;
|
|
1216
|
+
};
|
|
1217
|
+
mql.addEventListener('change', onMqlChange);
|
|
1218
|
+
});
|
|
1219
|
+
|
|
1220
|
+
onBeforeUnmount(() => {
|
|
1221
|
+
if (mql && onMqlChange) {
|
|
1222
|
+
mql.removeEventListener('change', onMqlChange);
|
|
1223
|
+
}
|
|
1224
|
+
});
|
|
1225
|
+
<\/script>
|
|
1226
|
+
```
|
|
1227
|
+
|
|
1228
|
+
## Chat Application
|
|
1229
|
+
|
|
1230
|
+
Chat history sidebar with grouped conversations (Today, Yesterday, Previous 7 days, Previous 30 days). Each item exposes a hover-only delete action. Pinned shortcuts at the top: Search, New chat, Browse web.
|
|
1231
|
+
|
|
1232
|
+
```vue
|
|
1233
|
+
<template>
|
|
1234
|
+
<div class="border border-surface-200 dark:border-surface-700 rounded-lg overflow-hidden">
|
|
1235
|
+
<SidebarLayout class="min-h-192! relative!">
|
|
1236
|
+
<SidebarBackdrop v-if="isMobile && open" class="absolute!" />
|
|
1237
|
+
<Sidebar id="chat-history" :collapsible="isMobile ? 'offcanvas' : 'icon'" :overlay="isMobile" v-model:open="open" width="16rem">
|
|
1238
|
+
<SidebarSpacer />
|
|
1239
|
+
<SidebarAside>
|
|
1240
|
+
<SidebarPanel>
|
|
1241
|
+
<SidebarHeader>
|
|
1242
|
+
<SidebarMenu>
|
|
1243
|
+
<SidebarMenuItem>
|
|
1244
|
+
<SidebarMenuButton class="p-1!">
|
|
1245
|
+
<div class="flex size-6 shrink-0 items-center justify-center rounded-full bg-surface-900 dark:bg-surface-0">
|
|
1246
|
+
<Sparkles class="size-3 text-surface-0 dark:text-surface-900" />
|
|
1247
|
+
</div>
|
|
1248
|
+
<span class="font-semibold text-sm">ChatGPT</span>
|
|
1249
|
+
</SidebarMenuButton>
|
|
1250
|
+
</SidebarMenuItem>
|
|
1251
|
+
</SidebarMenu>
|
|
1252
|
+
<SidebarMenu>
|
|
1253
|
+
<SidebarMenuItem>
|
|
1254
|
+
<SidebarMenuButton>
|
|
1255
|
+
<Search />
|
|
1256
|
+
<span>Search</span>
|
|
1257
|
+
</SidebarMenuButton>
|
|
1258
|
+
</SidebarMenuItem>
|
|
1259
|
+
<SidebarMenuItem>
|
|
1260
|
+
<SidebarMenuButton>
|
|
1261
|
+
<PenToSquare />
|
|
1262
|
+
<span>New chat</span>
|
|
1263
|
+
</SidebarMenuButton>
|
|
1264
|
+
</SidebarMenuItem>
|
|
1265
|
+
<SidebarMenuItem>
|
|
1266
|
+
<SidebarMenuButton>
|
|
1267
|
+
<Globe />
|
|
1268
|
+
<span>Browse web</span>
|
|
1269
|
+
</SidebarMenuButton>
|
|
1270
|
+
</SidebarMenuItem>
|
|
1271
|
+
</SidebarMenu>
|
|
1272
|
+
</SidebarHeader>
|
|
1273
|
+
|
|
1274
|
+
<SidebarContent>
|
|
1275
|
+
<SidebarGroup v-for="group in chatHistory" :key="group.label">
|
|
1276
|
+
<SidebarGroupLabel>{{ group.label }}</SidebarGroupLabel>
|
|
1277
|
+
<SidebarGroupContent>
|
|
1278
|
+
<SidebarMenu>
|
|
1279
|
+
<SidebarMenuItem v-for="chat in group.chats" :key="chat.title">
|
|
1280
|
+
<SidebarMenuButton :isActive="!!chat.active">
|
|
1281
|
+
<span>{{ chat.title }}</span>
|
|
1282
|
+
</SidebarMenuButton>
|
|
1283
|
+
<SidebarMenuAction :showOnHover="true">
|
|
1284
|
+
<Trash />
|
|
1285
|
+
</SidebarMenuAction>
|
|
1286
|
+
</SidebarMenuItem>
|
|
1287
|
+
</SidebarMenu>
|
|
1288
|
+
</SidebarGroupContent>
|
|
1289
|
+
</SidebarGroup>
|
|
1290
|
+
</SidebarContent>
|
|
1291
|
+
|
|
1292
|
+
<SidebarFooter>
|
|
1293
|
+
<SidebarMenu>
|
|
1294
|
+
<SidebarMenuItem>
|
|
1295
|
+
<SidebarMenuButton class="p-1!">
|
|
1296
|
+
<Avatar label="JD" shape="circle" class="size-6 shrink-0 text-xs" />
|
|
1297
|
+
<span>John Doe</span>
|
|
1298
|
+
</SidebarMenuButton>
|
|
1299
|
+
</SidebarMenuItem>
|
|
1300
|
+
</SidebarMenu>
|
|
1301
|
+
</SidebarFooter>
|
|
1302
|
+
</SidebarPanel>
|
|
1303
|
+
</SidebarAside>
|
|
1304
|
+
</Sidebar>
|
|
1305
|
+
|
|
1306
|
+
<SidebarMain>
|
|
1307
|
+
<header class="flex h-12 items-center gap-2 border-b border-surface-200 dark:border-surface-700 px-4">
|
|
1308
|
+
<SidebarTrigger severity="secondary" target="chat-history" :text="true" size="small">
|
|
1309
|
+
<SidebarIcon />
|
|
1310
|
+
</SidebarTrigger>
|
|
1311
|
+
</header>
|
|
1312
|
+
<div class="flex-1 p-4 flex flex-col gap-4">
|
|
1313
|
+
<div class="rounded-lg bg-surface-100 dark:bg-surface-800 h-48"></div>
|
|
1314
|
+
<div class="rounded-lg bg-surface-100 dark:bg-surface-800 flex-1"></div>
|
|
1315
|
+
</div>
|
|
1316
|
+
</SidebarMain>
|
|
1317
|
+
</SidebarLayout>
|
|
1318
|
+
</div>
|
|
1319
|
+
</template>
|
|
1320
|
+
|
|
1321
|
+
<script setup>
|
|
1322
|
+
import { onBeforeUnmount, onMounted, ref } from 'vue';
|
|
1323
|
+
import Globe from '@primeicons/vue/globe';
|
|
1324
|
+
import PenToSquare from '@primeicons/vue/pen-to-square';
|
|
1325
|
+
import Search from '@primeicons/vue/search';
|
|
1326
|
+
import SidebarIcon from '@primeicons/vue/sidebar';
|
|
1327
|
+
import Sparkles from '@primeicons/vue/sparkles';
|
|
1328
|
+
import Trash from '@primeicons/vue/trash';
|
|
1329
|
+
|
|
1330
|
+
const isMobile = ref(false);
|
|
1331
|
+
const open = ref(true);
|
|
1332
|
+
let mql = null;
|
|
1333
|
+
let onMqlChange = null;
|
|
1334
|
+
|
|
1335
|
+
onMounted(() => {
|
|
1336
|
+
if (typeof window === 'undefined') return;
|
|
1337
|
+
|
|
1338
|
+
mql = window.matchMedia('(max-width: 1023px)');
|
|
1339
|
+
isMobile.value = mql.matches;
|
|
1340
|
+
open.value = !isMobile.value;
|
|
1341
|
+
onMqlChange = (event) => {
|
|
1342
|
+
isMobile.value = event.matches;
|
|
1343
|
+
open.value = !event.matches;
|
|
1344
|
+
};
|
|
1345
|
+
mql.addEventListener('change', onMqlChange);
|
|
1346
|
+
});
|
|
1347
|
+
|
|
1348
|
+
onBeforeUnmount(() => {
|
|
1349
|
+
if (mql && onMqlChange) {
|
|
1350
|
+
mql.removeEventListener('change', onMqlChange);
|
|
1351
|
+
}
|
|
1352
|
+
});
|
|
1353
|
+
|
|
1354
|
+
const chatHistory = [
|
|
1355
|
+
{
|
|
1356
|
+
label: 'Today',
|
|
1357
|
+
chats: [
|
|
1358
|
+
{
|
|
1359
|
+
title: 'PrimeVue Sidebar component',
|
|
1360
|
+
active: true
|
|
1361
|
+
},
|
|
1362
|
+
{ title: 'How to use Vue composables' },
|
|
1363
|
+
{ title: 'Fix TypeScript generics issue' }
|
|
1364
|
+
]
|
|
1365
|
+
},
|
|
1366
|
+
{
|
|
1367
|
+
label: 'Yesterday',
|
|
1368
|
+
chats: [{ title: 'Design system architecture' }, { title: 'Vue 3 new features overview' }, { title: 'CSS light-dark() function usage' }]
|
|
1369
|
+
},
|
|
1370
|
+
{
|
|
1371
|
+
label: 'Previous 7 days',
|
|
1372
|
+
chats: [{ title: 'Build a dashboard layout' }, { title: 'Tailwind v4 migration guide' }, { title: 'Node.js API authentication' }, { title: 'Monorepo setup with pnpm' }, { title: 'Deploy Nuxt to Vercel' }]
|
|
1373
|
+
},
|
|
1374
|
+
{
|
|
1375
|
+
label: 'Previous 30 days',
|
|
1376
|
+
chats: [{ title: 'GraphQL schema design' }, { title: 'WebSocket real-time updates' }, { title: 'PostgreSQL query optimization' }, { title: 'Docker compose for dev env' }]
|
|
1377
|
+
}
|
|
1378
|
+
];
|
|
1379
|
+
<\/script>
|
|
1380
|
+
```
|
|
1381
|
+
|
|
1382
|
+
## Accessibility
|
|
1383
|
+
|
|
1384
|
+
Screen Reader Sidebar is a headless compound component and does not define a specific ARIA role by default. Use semantic elements such as nav or aside with aria-label or aria-labelledby to describe the purpose of the sidebar based on your layout. When a sidebar can be collapsed or displayed offcanvas, the trigger should describe the relationship with the sidebar using aria-controls and expose the current state with aria-expanded . In layouts with multiple sidebars, provide the target prop to SidebarTrigger so it toggles the intended sidebar. SidebarMenu renders a semantic list structure by default. Menu items are expected to contain interactive elements such as links or buttons. Collapsible SidebarMenuItem components add aria-expanded to their SidebarMenuButton automatically. Trigger Keyboard Support Key Function enter Toggles the sidebar. space Toggles the sidebar. Menu Keyboard Support Key Function tab Moves focus to the next focusable element in the sidebar or page tab sequence. shift + tab Moves focus to the previous focusable element in the sidebar or page tab sequence. enter Activates the focused link or button. For a collapsible menu item, toggles the submenu. space Activates the focused button. For a collapsible menu item, toggles the submenu.
|
|
1385
|
+
|
|
1386
|
+
```vue
|
|
1387
|
+
<template>
|
|
1388
|
+
<SidebarLayout>
|
|
1389
|
+
<Sidebar id="main-navigation" v-model:open="open" as="nav" aria-label="Main navigation">
|
|
1390
|
+
<SidebarAside>
|
|
1391
|
+
<SidebarPanel>
|
|
1392
|
+
<SidebarContent>
|
|
1393
|
+
<SidebarMenu>
|
|
1394
|
+
<SidebarMenuItem>
|
|
1395
|
+
<SidebarMenuButton as="a" href="/" :isActive="true">
|
|
1396
|
+
<Home />
|
|
1397
|
+
<span>Home</span>
|
|
1398
|
+
</SidebarMenuButton>
|
|
1399
|
+
</SidebarMenuItem>
|
|
1400
|
+
|
|
1401
|
+
<SidebarMenuItem :collapsible="true">
|
|
1402
|
+
<SidebarMenuButton>
|
|
1403
|
+
<Folder />
|
|
1404
|
+
<span>Projects</span>
|
|
1405
|
+
</SidebarMenuButton>
|
|
1406
|
+
<SidebarMenuSub>
|
|
1407
|
+
<SidebarMenuSubItem>
|
|
1408
|
+
<SidebarMenuSubButton as="a" href="/projects/alpha">
|
|
1409
|
+
<span>Alpha</span>
|
|
1410
|
+
</SidebarMenuSubButton>
|
|
1411
|
+
</SidebarMenuSubItem>
|
|
1412
|
+
</SidebarMenuSub>
|
|
1413
|
+
</SidebarMenuItem>
|
|
1414
|
+
</SidebarMenu>
|
|
1415
|
+
</SidebarContent>
|
|
1416
|
+
</SidebarPanel>
|
|
1417
|
+
</SidebarAside>
|
|
1418
|
+
</Sidebar>
|
|
1419
|
+
|
|
1420
|
+
<SidebarMain>
|
|
1421
|
+
<SidebarTrigger target="main-navigation" aria-controls="main-navigation" :aria-expanded="open" aria-label="Toggle navigation">
|
|
1422
|
+
<SidebarIcon />
|
|
1423
|
+
</SidebarTrigger>
|
|
1424
|
+
</SidebarMain>
|
|
1425
|
+
</SidebarLayout>
|
|
1426
|
+
</template>
|
|
1427
|
+
```
|
|
1428
|
+
|
|
1429
|
+
## Sidebar API
|
|
1430
|
+
|
|
1431
|
+
### Props
|
|
1432
|
+
|
|
1433
|
+
| Name |Type |Default |Description |
|
|
1434
|
+
| --- | --- | --- | --- |
|
|
1435
|
+
| id | string | - | Unique identifier; required when nested in a SidebarLayout to participate in registry. |
|
|
1436
|
+
| side | "left" \| "right" | 'left' | Side of the viewport on which the sidebar is anchored. |
|
|
1437
|
+
| variant | "sidebar" \| "floating" \| "inset" | 'sidebar' | Visual variant. |
|
|
1438
|
+
| collapsible | "none" \| "offcanvas" \| "icon" | 'icon' | Collapse behavior. |
|
|
1439
|
+
| overlay | boolean | false | Whether the panel renders as a floating overlay. |
|
|
1440
|
+
| open | boolean | - | Controlled open state. Use with `v-model:open` or `@update:open` . |
|
|
1441
|
+
| openOnHover | boolean | false | When true, hovering the panel triggers expand/collapse. |
|
|
1442
|
+
| hoverOpenDelay | number | 50 | Delay before expanding on hover, in ms. |
|
|
1443
|
+
| hoverCloseDelay | number | 100 | Delay before collapsing after pointer leave, in ms. |
|
|
1444
|
+
| dismissable | boolean | true | Whether clicking the backdrop dismisses the sidebar. |
|
|
1445
|
+
| hideOnOutsideClick | boolean | true | When overlay is active, clicking inside the SidebarMain area collapses the sidebar. Clicks originating from a SidebarTrigger are excluded so opening via the trigger is not immediately undone. |
|
|
1446
|
+
| width | string | '16rem' | Width of the expanded panel as a CSS length. |
|
|
1447
|
+
| iconWidth | string | '3rem' | Width of the panel when collapsed in icon mode. |
|
|
1448
|
+
| as | string \| object | - | The element or component to render. Defaults to a sensible HTML element. |
|
|
1449
|
+
| asChild | boolean | false | When true, renders the slot content as the root element with merged props. |
|
|
1450
|
+
| dt | any | - | It generates scoped CSS variables using design tokens for the component. |
|
|
1451
|
+
| pt | PassThrough<SidebarPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
|
|
1452
|
+
| ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
|
|
1453
|
+
| unstyled | boolean | false | When enabled, it removes component related styles in the core. |
|
|
1454
|
+
|
|
1455
|
+
### Emits
|
|
1456
|
+
|
|
1457
|
+
| Name |Parameters |Description |
|
|
1458
|
+
| --- | --- | --- |
|
|
1459
|
+
| update:open | Function | |
|
|
1460
|
+
|
|
1461
|
+
### Pass Through Options
|
|
1462
|
+
|
|
1463
|
+
| Name |Type |Description |
|
|
1464
|
+
| --- | --- | --- |
|
|
1465
|
+
| root | SidebarPassThroughOptionType | Used to pass attributes to the root's DOM element. |
|
|
1466
|
+
| hooks | any | Used to manage all lifecycle hooks. |
|
|
1467
|
+
|
|
1468
|
+
### Theming
|
|
1469
|
+
|
|
1470
|
+
### CSS Classes
|
|
1471
|
+
|
|
1472
|
+
| Class |Description |
|
|
1473
|
+
| --- | --- |
|
|
1474
|
+
| p-sidebar | Class name of the root element |
|
|
1475
|
+
|
|
1476
|
+
### Design Tokens
|
|
1477
|
+
|
|
1478
|
+
| Token |CSS Variable |Description |
|
|
1479
|
+
| --- | --- | --- |
|
|
1480
|
+
| sidebar.border.color | --p-sidebar-border-color | Border color of root |
|
|
1481
|
+
| sidebar.focus.ring.width | --p-sidebar-focus-ring-width | Focus ring width of root |
|
|
1482
|
+
| sidebar.focus.ring.style | --p-sidebar-focus-ring-style | Focus ring style of root |
|
|
1483
|
+
| sidebar.focus.ring.color | --p-sidebar-focus-ring-color | Focus ring color of root |
|
|
1484
|
+
| sidebar.focus.ring.offset | --p-sidebar-focus-ring-offset | Focus ring offset of root |
|
|
1485
|
+
| sidebar.focus.ring.shadow | --p-sidebar-focus-ring-shadow | Focus ring shadow of root |
|
|
1486
|
+
| sidebar.layout.background | --p-sidebar-layout-background | Background of layout |
|
|
1487
|
+
| sidebar.header.padding | --p-sidebar-header-padding | Padding of header |
|
|
1488
|
+
| sidebar.header.gap | --p-sidebar-header-gap | Gap of header |
|
|
1489
|
+
| sidebar.footer.padding | --p-sidebar-footer-padding | Padding of footer |
|
|
1490
|
+
| sidebar.footer.gap | --p-sidebar-footer-gap | Gap of footer |
|
|
1491
|
+
| sidebar.panel.background | --p-sidebar-panel-background | Background of panel |
|
|
1492
|
+
| sidebar.panel.color | --p-sidebar-panel-color | Color of panel |
|
|
1493
|
+
| sidebar.panel.floating.border.radius | --p-sidebar-panel-floating-border-radius | Border radius of floating variant panel |
|
|
1494
|
+
| sidebar.panel.floating.shadow | --p-sidebar-panel-floating-shadow | Shadow of floating variant panel |
|
|
1495
|
+
| sidebar.content.gap | --p-sidebar-content-gap | Gap of content |
|
|
1496
|
+
| sidebar.aside.padding | --p-sidebar-aside-padding | Padding of aside |
|
|
1497
|
+
| sidebar.group.padding | --p-sidebar-group-padding | Padding of group |
|
|
1498
|
+
| sidebar.group.label.padding | --p-sidebar-group-label-padding | Padding of group label |
|
|
1499
|
+
| sidebar.group.label.height | --p-sidebar-group-label-height | Height of group label |
|
|
1500
|
+
| sidebar.group.label.border.radius | --p-sidebar-group-label-border-radius | Border radius of group label |
|
|
1501
|
+
| sidebar.group.label.font.size | --p-sidebar-group-label-font-size | Font size of group label |
|
|
1502
|
+
| sidebar.group.label.font.weight | --p-sidebar-group-label-font-weight | Font weight of group label |
|
|
1503
|
+
| sidebar.group.label.color | --p-sidebar-group-label-color | Color of group label |
|
|
1504
|
+
| sidebar.group.action.top | --p-sidebar-group-action-top | Top of group action |
|
|
1505
|
+
| sidebar.group.action.right | --p-sidebar-group-action-right | Right of group action |
|
|
1506
|
+
| sidebar.group.action.size | --p-sidebar-group-action-size | Size of group action |
|
|
1507
|
+
| sidebar.group.action.border.radius | --p-sidebar-group-action-border-radius | Border radius of group action |
|
|
1508
|
+
| sidebar.group.action.color | --p-sidebar-group-action-color | Color of group action |
|
|
1509
|
+
| sidebar.group.action.focus.color | --p-sidebar-group-action-focus-color | Focus color of group action |
|
|
1510
|
+
| sidebar.group.action.focus.background | --p-sidebar-group-action-focus-background | Focus background of group action |
|
|
1511
|
+
| sidebar.group.action.icon.size | --p-sidebar-group-action-icon-size | Icon size of group action |
|
|
1512
|
+
| sidebar.menu.gap | --p-sidebar-menu-gap | Gap of menu |
|
|
1513
|
+
| sidebar.menu.button.padding | --p-sidebar-menu-button-padding | Padding of menu button |
|
|
1514
|
+
| sidebar.menu.button.gap | --p-sidebar-menu-button-gap | Gap of menu button |
|
|
1515
|
+
| sidebar.menu.button.height | --p-sidebar-menu-button-height | Height of menu button |
|
|
1516
|
+
| sidebar.menu.button.border.radius | --p-sidebar-menu-button-border-radius | Border radius of menu button |
|
|
1517
|
+
| sidebar.menu.button.font.size | --p-sidebar-menu-button-font-size | Font size of menu button |
|
|
1518
|
+
| sidebar.menu.button.font.weight | --p-sidebar-menu-button-font-weight | Font weight of menu button |
|
|
1519
|
+
| sidebar.menu.button.color | --p-sidebar-menu-button-color | Color of menu button |
|
|
1520
|
+
| sidebar.menu.button.focus.background | --p-sidebar-menu-button-focus-background | Focus background of menu button |
|
|
1521
|
+
| sidebar.menu.button.focus.color | --p-sidebar-menu-button-focus-color | Focus color of menu button |
|
|
1522
|
+
| sidebar.menu.button.active.background | --p-sidebar-menu-button-active-background | Active background of menu button |
|
|
1523
|
+
| sidebar.menu.button.active.color | --p-sidebar-menu-button-active-color | Active color of menu button |
|
|
1524
|
+
| sidebar.menu.button.icon.only.width | --p-sidebar-menu-button-icon-only-width | Width of menu button in icon-only collapsible mode |
|
|
1525
|
+
| sidebar.menu.button.with.action.padding.end | --p-sidebar-menu-button-with-action-padding-end | Padding end of menu button when it has a sibling menu action |
|
|
1526
|
+
| sidebar.menu.button.icon.color | --p-sidebar-menu-button-icon-color | Icon color of menu button |
|
|
1527
|
+
| sidebar.menu.button.icon.focus.color | --p-sidebar-menu-button-icon-focus-color | Icon focus color of menu button |
|
|
1528
|
+
| sidebar.menu.button.icon.size | --p-sidebar-menu-button-icon-size | Icon size of menu button |
|
|
1529
|
+
| sidebar.menu.action.top | --p-sidebar-menu-action-top | Top of menu action |
|
|
1530
|
+
| sidebar.menu.action.right | --p-sidebar-menu-action-right | Right of menu action |
|
|
1531
|
+
| sidebar.menu.action.width | --p-sidebar-menu-action-width | Width of menu action |
|
|
1532
|
+
| sidebar.menu.action.border.radius | --p-sidebar-menu-action-border-radius | Border radius of menu action |
|
|
1533
|
+
| sidebar.menu.action.color | --p-sidebar-menu-action-color | Color of menu action |
|
|
1534
|
+
| sidebar.menu.action.focus.color | --p-sidebar-menu-action-focus-color | Focus color of menu action |
|
|
1535
|
+
| sidebar.menu.action.focus.background | --p-sidebar-menu-action-focus-background | Focus background of menu action |
|
|
1536
|
+
| sidebar.menu.action.icon.size | --p-sidebar-menu-action-icon-size | Icon size of menu action |
|
|
1537
|
+
| sidebar.menu.badge.top | --p-sidebar-menu-badge-top | Top of menu badge |
|
|
1538
|
+
| sidebar.menu.badge.right | --p-sidebar-menu-badge-right | Right of menu badge |
|
|
1539
|
+
| sidebar.menu.badge.height | --p-sidebar-menu-badge-height | Height of menu badge |
|
|
1540
|
+
| sidebar.menu.badge.min.width | --p-sidebar-menu-badge-min-width | Min width of menu badge |
|
|
1541
|
+
| sidebar.menu.badge.border.radius | --p-sidebar-menu-badge-border-radius | Border radius of menu badge |
|
|
1542
|
+
| sidebar.menu.badge.padding | --p-sidebar-menu-badge-padding | Padding of menu badge |
|
|
1543
|
+
| sidebar.menu.badge.font.size | --p-sidebar-menu-badge-font-size | Font size of menu badge |
|
|
1544
|
+
| sidebar.menu.badge.font.weight | --p-sidebar-menu-badge-font-weight | Font weight of menu badge |
|
|
1545
|
+
| sidebar.menu.badge.background | --p-sidebar-menu-badge-background | Background of menu badge |
|
|
1546
|
+
| sidebar.menu.badge.border.color | --p-sidebar-menu-badge-border-color | Border color of menu badge |
|
|
1547
|
+
| sidebar.menu.badge.color | --p-sidebar-menu-badge-color | Color of menu badge |
|
|
1548
|
+
| sidebar.menu.sub.padding.block | --p-sidebar-menu-sub-padding-block | Block padding of menu sub |
|
|
1549
|
+
| sidebar.menu.sub.gap | --p-sidebar-menu-sub-gap | Gap of menu sub |
|
|
1550
|
+
| sidebar.menu.sub.indent.margin | --p-sidebar-menu-sub-indent-margin | Margin of indented (non-collapsible) menu sub |
|
|
1551
|
+
| sidebar.menu.sub.indent.padding | --p-sidebar-menu-sub-indent-padding | Padding of indented (non-collapsible) menu sub |
|
|
1552
|
+
| sidebar.menu.sub.collapsible.indent | --p-sidebar-menu-sub-collapsible-indent | Left indent of collapsible menu sub |
|
|
1553
|
+
| sidebar.menu.sub.collapsible.top.margin | --p-sidebar-menu-sub-collapsible-top-margin | Top margin of collapsible menu sub |
|
|
1554
|
+
| sidebar.menu.sub.collapsible.border.radius | --p-sidebar-menu-sub-collapsible-border-radius | Border radius of collapsible menu sub |
|
|
1555
|
+
| sidebar.menu.sub.button.padding | --p-sidebar-menu-sub-button-padding | Padding of menu sub button |
|
|
1556
|
+
| sidebar.menu.sub.button.gap | --p-sidebar-menu-sub-button-gap | Gap of menu sub button |
|
|
1557
|
+
| sidebar.menu.sub.button.height | --p-sidebar-menu-sub-button-height | Height of menu sub button |
|
|
1558
|
+
| sidebar.menu.sub.button.border.radius | --p-sidebar-menu-sub-button-border-radius | Border radius of menu sub button |
|
|
1559
|
+
| sidebar.menu.sub.button.font.size | --p-sidebar-menu-sub-button-font-size | Font size of menu sub button |
|
|
1560
|
+
| sidebar.menu.sub.button.font.weight | --p-sidebar-menu-sub-button-font-weight | Font weight of menu sub button |
|
|
1561
|
+
| sidebar.menu.sub.button.color | --p-sidebar-menu-sub-button-color | Color of menu sub button |
|
|
1562
|
+
| sidebar.menu.sub.button.focus.background | --p-sidebar-menu-sub-button-focus-background | Focus background of menu sub button |
|
|
1563
|
+
| sidebar.menu.sub.button.focus.color | --p-sidebar-menu-sub-button-focus-color | Focus color of menu sub button |
|
|
1564
|
+
| sidebar.menu.sub.button.active.background | --p-sidebar-menu-sub-button-active-background | Active background of menu sub button |
|
|
1565
|
+
| sidebar.menu.sub.button.active.color | --p-sidebar-menu-sub-button-active-color | Active color of menu sub button |
|
|
1566
|
+
| sidebar.menu.sub.button.icon.color | --p-sidebar-menu-sub-button-icon-color | Icon color of menu sub button |
|
|
1567
|
+
| sidebar.menu.sub.button.icon.focus.color | --p-sidebar-menu-sub-button-icon-focus-color | Icon focus color of menu sub button |
|
|
1568
|
+
| sidebar.menu.sub.button.icon.size | --p-sidebar-menu-sub-button-icon-size | Icon size of menu sub button |
|
|
1569
|
+
| sidebar.main.background | --p-sidebar-main-background | Background of main |
|
|
1570
|
+
| sidebar.main.floating.background | --p-sidebar-main-floating-background | Floating background of main |
|
|
1571
|
+
| sidebar.main.inset.background | --p-sidebar-main-inset-background | Inset background of main |
|
|
1572
|
+
| sidebar.main.margin | --p-sidebar-main-margin | Margin of main |
|
|
1573
|
+
| sidebar.main.border.radius | --p-sidebar-main-border-radius | Border radius of main |
|
|
1574
|
+
| sidebar.main.shadow | --p-sidebar-main-shadow | Shadow of main |
|
|
1575
|
+
|
|
1576
|
+
## Sidebar Layout API
|
|
1577
|
+
|
|
1578
|
+
### Props
|
|
1579
|
+
|
|
1580
|
+
| Name |Type |Default |Description |
|
|
1581
|
+
| --- | --- | --- | --- |
|
|
1582
|
+
| as | string \| object | - | The element or component to render. Defaults to a sensible HTML element. |
|
|
1583
|
+
| asChild | boolean | false | When true, renders the slot content as the root element with merged props. |
|
|
1584
|
+
| dt | any | - | It generates scoped CSS variables using design tokens for the component. |
|
|
1585
|
+
| pt | PassThrough<SidebarLayoutPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
|
|
1586
|
+
| ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
|
|
1587
|
+
| unstyled | boolean | false | When enabled, it removes component related styles in the core. |
|
|
1588
|
+
|
|
1589
|
+
### Pass Through Options
|
|
1590
|
+
|
|
1591
|
+
| Name |Type |Description |
|
|
1592
|
+
| --- | --- | --- |
|
|
1593
|
+
| root | SidebarLayoutPassThroughOptionType | Used to pass attributes to the root's DOM element. |
|
|
1594
|
+
| hooks | any | Used to manage all lifecycle hooks. |
|
|
1595
|
+
|
|
1596
|
+
### Theming
|
|
1597
|
+
|
|
1598
|
+
### CSS Classes
|
|
1599
|
+
|
|
1600
|
+
| Class |Description |
|
|
1601
|
+
| --- | --- |
|
|
1602
|
+
| p-sidebar-layout | Class name of the root element |
|
|
1603
|
+
|
|
1604
|
+
## Sidebar Aside API
|
|
1605
|
+
|
|
1606
|
+
### Props
|
|
1607
|
+
|
|
1608
|
+
| Name |Type |Default |Description |
|
|
1609
|
+
| --- | --- | --- | --- |
|
|
1610
|
+
| as | string \| object | - | The element or component to render. Defaults to a sensible HTML element. |
|
|
1611
|
+
| asChild | boolean | false | When true, renders the slot content as the root element with merged props. |
|
|
1612
|
+
| dt | any | - | It generates scoped CSS variables using design tokens for the component. |
|
|
1613
|
+
| pt | PassThrough<SidebarAsidePassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
|
|
1614
|
+
| ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
|
|
1615
|
+
| unstyled | boolean | false | When enabled, it removes component related styles in the core. |
|
|
1616
|
+
|
|
1617
|
+
### Pass Through Options
|
|
1618
|
+
|
|
1619
|
+
| Name |Type |Description |
|
|
1620
|
+
| --- | --- | --- |
|
|
1621
|
+
| root | SidebarAsidePassThroughOptionType | Used to pass attributes to the root's DOM element. |
|
|
1622
|
+
| hooks | any | Used to manage all lifecycle hooks. |
|
|
1623
|
+
|
|
1624
|
+
### Theming
|
|
1625
|
+
|
|
1626
|
+
### CSS Classes
|
|
1627
|
+
|
|
1628
|
+
| Class |Description |
|
|
1629
|
+
| --- | --- |
|
|
1630
|
+
| p-sidebar-aside | Class name of the root element |
|
|
1631
|
+
|
|
1632
|
+
## Sidebar Panel API
|
|
1633
|
+
|
|
1634
|
+
### Props
|
|
1635
|
+
|
|
1636
|
+
| Name |Type |Default |Description |
|
|
1637
|
+
| --- | --- | --- | --- |
|
|
1638
|
+
| as | string \| object | - | The element or component to render. Defaults to a sensible HTML element. |
|
|
1639
|
+
| asChild | boolean | false | When true, renders the slot content as the root element with merged props. |
|
|
1640
|
+
| dt | any | - | It generates scoped CSS variables using design tokens for the component. |
|
|
1641
|
+
| pt | PassThrough<SidebarPanelPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
|
|
1642
|
+
| ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
|
|
1643
|
+
| unstyled | boolean | false | When enabled, it removes component related styles in the core. |
|
|
1644
|
+
|
|
1645
|
+
### Pass Through Options
|
|
1646
|
+
|
|
1647
|
+
| Name |Type |Description |
|
|
1648
|
+
| --- | --- | --- |
|
|
1649
|
+
| root | SidebarPanelPassThroughOptionType | Used to pass attributes to the root's DOM element. |
|
|
1650
|
+
| hooks | any | Used to manage all lifecycle hooks. |
|
|
1651
|
+
|
|
1652
|
+
### Theming
|
|
1653
|
+
|
|
1654
|
+
### CSS Classes
|
|
1655
|
+
|
|
1656
|
+
| Class |Description |
|
|
1657
|
+
| --- | --- |
|
|
1658
|
+
| p-sidebar-panel | Class name of the root element |
|
|
1659
|
+
|
|
1660
|
+
## Sidebar Header API
|
|
1661
|
+
|
|
1662
|
+
### Props
|
|
1663
|
+
|
|
1664
|
+
| Name |Type |Default |Description |
|
|
1665
|
+
| --- | --- | --- | --- |
|
|
1666
|
+
| as | string \| object | - | The element or component to render. Defaults to a sensible HTML element. |
|
|
1667
|
+
| asChild | boolean | false | When true, renders the slot content as the root element with merged props. |
|
|
1668
|
+
| dt | any | - | It generates scoped CSS variables using design tokens for the component. |
|
|
1669
|
+
| pt | PassThrough<SidebarHeaderPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
|
|
1670
|
+
| ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
|
|
1671
|
+
| unstyled | boolean | false | When enabled, it removes component related styles in the core. |
|
|
1672
|
+
|
|
1673
|
+
### Pass Through Options
|
|
1674
|
+
|
|
1675
|
+
| Name |Type |Description |
|
|
1676
|
+
| --- | --- | --- |
|
|
1677
|
+
| root | SidebarHeaderPassThroughOptionType | Used to pass attributes to the root's DOM element. |
|
|
1678
|
+
| hooks | any | Used to manage all lifecycle hooks. |
|
|
1679
|
+
|
|
1680
|
+
### Theming
|
|
1681
|
+
|
|
1682
|
+
### CSS Classes
|
|
1683
|
+
|
|
1684
|
+
| Class |Description |
|
|
1685
|
+
| --- | --- |
|
|
1686
|
+
| p-sidebar-header | Class name of the root element |
|
|
1687
|
+
|
|
1688
|
+
## Sidebar Content API
|
|
1689
|
+
|
|
1690
|
+
### Props
|
|
1691
|
+
|
|
1692
|
+
| Name |Type |Default |Description |
|
|
1693
|
+
| --- | --- | --- | --- |
|
|
1694
|
+
| as | string \| object | - | The element or component to render. Defaults to a sensible HTML element. |
|
|
1695
|
+
| asChild | boolean | false | When true, renders the slot content as the root element with merged props. |
|
|
1696
|
+
| dt | any | - | It generates scoped CSS variables using design tokens for the component. |
|
|
1697
|
+
| pt | PassThrough<SidebarContentPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
|
|
1698
|
+
| ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
|
|
1699
|
+
| unstyled | boolean | false | When enabled, it removes component related styles in the core. |
|
|
1700
|
+
|
|
1701
|
+
### Pass Through Options
|
|
1702
|
+
|
|
1703
|
+
| Name |Type |Description |
|
|
1704
|
+
| --- | --- | --- |
|
|
1705
|
+
| root | SidebarContentPassThroughOptionType | Used to pass attributes to the root's DOM element. |
|
|
1706
|
+
| hooks | any | Used to manage all lifecycle hooks. |
|
|
1707
|
+
|
|
1708
|
+
### Theming
|
|
1709
|
+
|
|
1710
|
+
### CSS Classes
|
|
1711
|
+
|
|
1712
|
+
| Class |Description |
|
|
1713
|
+
| --- | --- |
|
|
1714
|
+
| p-sidebar-content | Class name of the root element |
|
|
1715
|
+
|
|
1716
|
+
## Sidebar Footer API
|
|
1717
|
+
|
|
1718
|
+
### Props
|
|
1719
|
+
|
|
1720
|
+
| Name |Type |Default |Description |
|
|
1721
|
+
| --- | --- | --- | --- |
|
|
1722
|
+
| as | string \| object | - | The element or component to render. Defaults to a sensible HTML element. |
|
|
1723
|
+
| asChild | boolean | false | When true, renders the slot content as the root element with merged props. |
|
|
1724
|
+
| dt | any | - | It generates scoped CSS variables using design tokens for the component. |
|
|
1725
|
+
| pt | PassThrough<SidebarFooterPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
|
|
1726
|
+
| ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
|
|
1727
|
+
| unstyled | boolean | false | When enabled, it removes component related styles in the core. |
|
|
1728
|
+
|
|
1729
|
+
### Pass Through Options
|
|
1730
|
+
|
|
1731
|
+
| Name |Type |Description |
|
|
1732
|
+
| --- | --- | --- |
|
|
1733
|
+
| root | SidebarFooterPassThroughOptionType | Used to pass attributes to the root's DOM element. |
|
|
1734
|
+
| hooks | any | Used to manage all lifecycle hooks. |
|
|
1735
|
+
|
|
1736
|
+
### Theming
|
|
1737
|
+
|
|
1738
|
+
### CSS Classes
|
|
1739
|
+
|
|
1740
|
+
| Class |Description |
|
|
1741
|
+
| --- | --- |
|
|
1742
|
+
| p-sidebar-footer | Class name of the root element |
|
|
1743
|
+
|
|
1744
|
+
## Sidebar Menu API
|
|
1745
|
+
|
|
1746
|
+
### Props
|
|
1747
|
+
|
|
1748
|
+
| Name |Type |Default |Description |
|
|
1749
|
+
| --- | --- | --- | --- |
|
|
1750
|
+
| as | string \| object | - | The element or component to render. Defaults to a sensible HTML element. |
|
|
1751
|
+
| asChild | boolean | false | When true, renders the slot content as the root element with merged props. |
|
|
1752
|
+
| dt | any | - | It generates scoped CSS variables using design tokens for the component. |
|
|
1753
|
+
| pt | PassThrough<SidebarMenuPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
|
|
1754
|
+
| ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
|
|
1755
|
+
| unstyled | boolean | false | When enabled, it removes component related styles in the core. |
|
|
1756
|
+
|
|
1757
|
+
### Pass Through Options
|
|
1758
|
+
|
|
1759
|
+
| Name |Type |Description |
|
|
1760
|
+
| --- | --- | --- |
|
|
1761
|
+
| root | SidebarMenuPassThroughOptionType | Used to pass attributes to the root's DOM element. |
|
|
1762
|
+
| hooks | any | Used to manage all lifecycle hooks. |
|
|
1763
|
+
|
|
1764
|
+
### Theming
|
|
1765
|
+
|
|
1766
|
+
### CSS Classes
|
|
1767
|
+
|
|
1768
|
+
| Class |Description |
|
|
1769
|
+
| --- | --- |
|
|
1770
|
+
| p-sidebar-menu | Class name of the root element |
|
|
1771
|
+
|
|
1772
|
+
## Sidebar Menu Item API
|
|
1773
|
+
|
|
1774
|
+
### Props
|
|
1775
|
+
|
|
1776
|
+
| Name |Type |Default |Description |
|
|
1777
|
+
| --- | --- | --- | --- |
|
|
1778
|
+
| collapsible | boolean | false | Marks the item as collapsible. |
|
|
1779
|
+
| open | boolean | - | Controlled open state for the collapsible content. |
|
|
1780
|
+
| defaultOpen | boolean | true | Initial open state for uncontrolled usage. |
|
|
1781
|
+
| disabled | boolean | false | Disables the item; toggle is a no-op. |
|
|
1782
|
+
| as | string \| object | - | The element or component to render. Defaults to a sensible HTML element. |
|
|
1783
|
+
| asChild | boolean | false | When true, renders the slot content as the root element with merged props. |
|
|
1784
|
+
| dt | any | - | It generates scoped CSS variables using design tokens for the component. |
|
|
1785
|
+
| pt | PassThrough<SidebarMenuItemPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
|
|
1786
|
+
| ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
|
|
1787
|
+
| unstyled | boolean | false | When enabled, it removes component related styles in the core. |
|
|
1788
|
+
|
|
1789
|
+
### Emits
|
|
1790
|
+
|
|
1791
|
+
| Name |Parameters |Description |
|
|
1792
|
+
| --- | --- | --- |
|
|
1793
|
+
| update:open | Function | |
|
|
1794
|
+
|
|
1795
|
+
### Pass Through Options
|
|
1796
|
+
|
|
1797
|
+
| Name |Type |Description |
|
|
1798
|
+
| --- | --- | --- |
|
|
1799
|
+
| root | SidebarMenuItemPassThroughOptionType | Used to pass attributes to the root's DOM element. |
|
|
1800
|
+
| hooks | any | Used to manage all lifecycle hooks. |
|
|
1801
|
+
|
|
1802
|
+
### Theming
|
|
1803
|
+
|
|
1804
|
+
### CSS Classes
|
|
1805
|
+
|
|
1806
|
+
| Class |Description |
|
|
1807
|
+
| --- | --- |
|
|
1808
|
+
| p-sidebar-menu-item | Class name of the root element |
|
|
1809
|
+
|
|
1810
|
+
## Sidebar Menu Sub API
|
|
1811
|
+
|
|
1812
|
+
### Props
|
|
1813
|
+
|
|
1814
|
+
| Name |Type |Default |Description |
|
|
1815
|
+
| --- | --- | --- | --- |
|
|
1816
|
+
| as | string \| object | - | The element or component to render. Defaults to a sensible HTML element. |
|
|
1817
|
+
| asChild | boolean | false | When true, renders the slot content as the root element with merged props. |
|
|
1818
|
+
| dt | any | - | It generates scoped CSS variables using design tokens for the component. |
|
|
1819
|
+
| pt | PassThrough<SidebarMenuSubPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
|
|
1820
|
+
| ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
|
|
1821
|
+
| unstyled | boolean | false | When enabled, it removes component related styles in the core. |
|
|
1822
|
+
|
|
1823
|
+
### Pass Through Options
|
|
1824
|
+
|
|
1825
|
+
| Name |Type |Description |
|
|
1826
|
+
| --- | --- | --- |
|
|
1827
|
+
| root | SidebarMenuSubPassThroughOptionType | Used to pass attributes to the root's DOM element. |
|
|
1828
|
+
| hooks | any | Used to manage all lifecycle hooks. |
|
|
1829
|
+
|
|
1830
|
+
### Theming
|
|
1831
|
+
|
|
1832
|
+
### CSS Classes
|
|
1833
|
+
|
|
1834
|
+
| Class |Description |
|
|
1835
|
+
| --- | --- |
|
|
1836
|
+
| p-sidebar-menu-sub | Class name of the root element |
|
|
1837
|
+
|
|
1838
|
+
## Sidebar Menu Sub Item API
|
|
1839
|
+
|
|
1840
|
+
### Props
|
|
1841
|
+
|
|
1842
|
+
| Name |Type |Default |Description |
|
|
1843
|
+
| --- | --- | --- | --- |
|
|
1844
|
+
| as | string \| object | - | The element or component to render. Defaults to a sensible HTML element. |
|
|
1845
|
+
| asChild | boolean | false | When true, renders the slot content as the root element with merged props. |
|
|
1846
|
+
| dt | any | - | It generates scoped CSS variables using design tokens for the component. |
|
|
1847
|
+
| pt | PassThrough<SidebarMenuSubItemPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
|
|
1848
|
+
| ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
|
|
1849
|
+
| unstyled | boolean | false | When enabled, it removes component related styles in the core. |
|
|
1850
|
+
|
|
1851
|
+
### Pass Through Options
|
|
1852
|
+
|
|
1853
|
+
| Name |Type |Description |
|
|
1854
|
+
| --- | --- | --- |
|
|
1855
|
+
| root | SidebarMenuSubItemPassThroughOptionType | Used to pass attributes to the root's DOM element. |
|
|
1856
|
+
| hooks | any | Used to manage all lifecycle hooks. |
|
|
1857
|
+
|
|
1858
|
+
### Theming
|
|
1859
|
+
|
|
1860
|
+
### CSS Classes
|
|
1861
|
+
|
|
1862
|
+
| Class |Description |
|
|
1863
|
+
| --- | --- |
|
|
1864
|
+
| p-sidebar-menu-sub-item | Class name of the root element |
|
|
1865
|
+
|
|
1866
|
+
## Sidebar Group API
|
|
1867
|
+
|
|
1868
|
+
### Props
|
|
1869
|
+
|
|
1870
|
+
| Name |Type |Default |Description |
|
|
1871
|
+
| --- | --- | --- | --- |
|
|
1872
|
+
| as | string \| object | - | The element or component to render. Defaults to a sensible HTML element. |
|
|
1873
|
+
| asChild | boolean | false | When true, renders the slot content as the root element with merged props. |
|
|
1874
|
+
| dt | any | - | It generates scoped CSS variables using design tokens for the component. |
|
|
1875
|
+
| pt | PassThrough<SidebarGroupPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
|
|
1876
|
+
| ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
|
|
1877
|
+
| unstyled | boolean | false | When enabled, it removes component related styles in the core. |
|
|
1878
|
+
|
|
1879
|
+
### Pass Through Options
|
|
1880
|
+
|
|
1881
|
+
| Name |Type |Description |
|
|
1882
|
+
| --- | --- | --- |
|
|
1883
|
+
| root | SidebarGroupPassThroughOptionType | Used to pass attributes to the root's DOM element. |
|
|
1884
|
+
| hooks | any | Used to manage all lifecycle hooks. |
|
|
1885
|
+
|
|
1886
|
+
### Theming
|
|
1887
|
+
|
|
1888
|
+
### CSS Classes
|
|
1889
|
+
|
|
1890
|
+
| Class |Description |
|
|
1891
|
+
| --- | --- |
|
|
1892
|
+
| p-sidebar-group | Class name of the root element |
|
|
1893
|
+
|
|
1894
|
+
## Sidebar Group Label API
|
|
1895
|
+
|
|
1896
|
+
### Props
|
|
1897
|
+
|
|
1898
|
+
| Name |Type |Default |Description |
|
|
1899
|
+
| --- | --- | --- | --- |
|
|
1900
|
+
| as | string \| object | - | The element or component to render. Defaults to a sensible HTML element. |
|
|
1901
|
+
| asChild | boolean | false | When true, renders the slot content as the root element with merged props. |
|
|
1902
|
+
| dt | any | - | It generates scoped CSS variables using design tokens for the component. |
|
|
1903
|
+
| pt | PassThrough<SidebarGroupLabelPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
|
|
1904
|
+
| ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
|
|
1905
|
+
| unstyled | boolean | false | When enabled, it removes component related styles in the core. |
|
|
1906
|
+
|
|
1907
|
+
### Pass Through Options
|
|
1908
|
+
|
|
1909
|
+
| Name |Type |Description |
|
|
1910
|
+
| --- | --- | --- |
|
|
1911
|
+
| root | SidebarGroupLabelPassThroughOptionType | Used to pass attributes to the root's DOM element. |
|
|
1912
|
+
| hooks | any | Used to manage all lifecycle hooks. |
|
|
1913
|
+
|
|
1914
|
+
### Theming
|
|
1915
|
+
|
|
1916
|
+
### CSS Classes
|
|
1917
|
+
|
|
1918
|
+
| Class |Description |
|
|
1919
|
+
| --- | --- |
|
|
1920
|
+
| p-sidebar-group-label | Class name of the root element |
|
|
1921
|
+
|
|
1922
|
+
## Sidebar Group Content API
|
|
1923
|
+
|
|
1924
|
+
### Props
|
|
1925
|
+
|
|
1926
|
+
| Name |Type |Default |Description |
|
|
1927
|
+
| --- | --- | --- | --- |
|
|
1928
|
+
| as | string \| object | - | The element or component to render. Defaults to a sensible HTML element. |
|
|
1929
|
+
| asChild | boolean | false | When true, renders the slot content as the root element with merged props. |
|
|
1930
|
+
| dt | any | - | It generates scoped CSS variables using design tokens for the component. |
|
|
1931
|
+
| pt | PassThrough<SidebarGroupContentPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
|
|
1932
|
+
| ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
|
|
1933
|
+
| unstyled | boolean | false | When enabled, it removes component related styles in the core. |
|
|
1934
|
+
|
|
1935
|
+
### Pass Through Options
|
|
1936
|
+
|
|
1937
|
+
| Name |Type |Description |
|
|
1938
|
+
| --- | --- | --- |
|
|
1939
|
+
| root | SidebarGroupContentPassThroughOptionType | Used to pass attributes to the root's DOM element. |
|
|
1940
|
+
| hooks | any | Used to manage all lifecycle hooks. |
|
|
1941
|
+
|
|
1942
|
+
### Theming
|
|
1943
|
+
|
|
1944
|
+
### CSS Classes
|
|
1945
|
+
|
|
1946
|
+
| Class |Description |
|
|
1947
|
+
| --- | --- |
|
|
1948
|
+
| p-sidebar-group-content | Class name of the root element |
|
|
1949
|
+
|
|
1950
|
+
## Sidebar Main API
|
|
1951
|
+
|
|
1952
|
+
### Props
|
|
1953
|
+
|
|
1954
|
+
| Name |Type |Default |Description |
|
|
1955
|
+
| --- | --- | --- | --- |
|
|
1956
|
+
| as | string \| object | - | The element or component to render. Defaults to a sensible HTML element. |
|
|
1957
|
+
| asChild | boolean | false | When true, renders the slot content as the root element with merged props. |
|
|
1958
|
+
| dt | any | - | It generates scoped CSS variables using design tokens for the component. |
|
|
1959
|
+
| pt | PassThrough<SidebarMainPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
|
|
1960
|
+
| ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
|
|
1961
|
+
| unstyled | boolean | false | When enabled, it removes component related styles in the core. |
|
|
1962
|
+
|
|
1963
|
+
### Pass Through Options
|
|
1964
|
+
|
|
1965
|
+
| Name |Type |Description |
|
|
1966
|
+
| --- | --- | --- |
|
|
1967
|
+
| root | SidebarMainPassThroughOptionType | Used to pass attributes to the root's DOM element. |
|
|
1968
|
+
| hooks | any | Used to manage all lifecycle hooks. |
|
|
1969
|
+
|
|
1970
|
+
### Theming
|
|
1971
|
+
|
|
1972
|
+
### CSS Classes
|
|
1973
|
+
|
|
1974
|
+
| Class |Description |
|
|
1975
|
+
| --- | --- |
|
|
1976
|
+
| p-sidebar-main | Class name of the root element |
|
|
1977
|
+
|
|
1978
|
+
## Sidebar Backdrop API
|
|
1979
|
+
|
|
1980
|
+
### Props
|
|
1981
|
+
|
|
1982
|
+
| Name |Type |Default |Description |
|
|
1983
|
+
| --- | --- | --- | --- |
|
|
1984
|
+
| as | string \| object | - | The element or component to render. Defaults to a sensible HTML element. |
|
|
1985
|
+
| asChild | boolean | false | When true, renders the slot content as the root element with merged props. |
|
|
1986
|
+
| dt | any | - | It generates scoped CSS variables using design tokens for the component. |
|
|
1987
|
+
| pt | PassThrough<SidebarBackdropPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
|
|
1988
|
+
| ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
|
|
1989
|
+
| unstyled | boolean | false | When enabled, it removes component related styles in the core. |
|
|
1990
|
+
|
|
1991
|
+
### Pass Through Options
|
|
1992
|
+
|
|
1993
|
+
| Name |Type |Description |
|
|
1994
|
+
| --- | --- | --- |
|
|
1995
|
+
| root | SidebarBackdropPassThroughOptionType | Used to pass attributes to the root's DOM element. |
|
|
1996
|
+
| hooks | any | Used to manage all lifecycle hooks. |
|
|
1997
|
+
|
|
1998
|
+
### Theming
|
|
1999
|
+
|
|
2000
|
+
### CSS Classes
|
|
2001
|
+
|
|
2002
|
+
| Class |Description |
|
|
2003
|
+
| --- | --- |
|
|
2004
|
+
| p-sidebar-backdrop | Class name of the root element |
|
|
2005
|
+
|
|
2006
|
+
## Sidebar Spacer API
|
|
2007
|
+
|
|
2008
|
+
### Props
|
|
2009
|
+
|
|
2010
|
+
| Name |Type |Default |Description |
|
|
2011
|
+
| --- | --- | --- | --- |
|
|
2012
|
+
| as | string \| object | - | The element or component to render. Defaults to a sensible HTML element. |
|
|
2013
|
+
| asChild | boolean | false | When true, renders the slot content as the root element with merged props. |
|
|
2014
|
+
| dt | any | - | It generates scoped CSS variables using design tokens for the component. |
|
|
2015
|
+
| pt | PassThrough<SidebarSpacerPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
|
|
2016
|
+
| ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
|
|
2017
|
+
| unstyled | boolean | false | When enabled, it removes component related styles in the core. |
|
|
2018
|
+
|
|
2019
|
+
### Pass Through Options
|
|
2020
|
+
|
|
2021
|
+
| Name |Type |Description |
|
|
2022
|
+
| --- | --- | --- |
|
|
2023
|
+
| root | SidebarSpacerPassThroughOptionType | Used to pass attributes to the root's DOM element. |
|
|
2024
|
+
| hooks | any | Used to manage all lifecycle hooks. |
|
|
2025
|
+
|
|
2026
|
+
### Theming
|
|
2027
|
+
|
|
2028
|
+
### CSS Classes
|
|
2029
|
+
|
|
2030
|
+
| Class |Description |
|
|
2031
|
+
| --- | --- |
|
|
2032
|
+
| p-sidebar-spacer | Class name of the root element |
|
|
2033
|
+
|
|
2034
|
+
## Sidebar Menu Button API
|
|
2035
|
+
|
|
2036
|
+
### Props
|
|
2037
|
+
|
|
2038
|
+
| Name |Type |Default |Description |
|
|
2039
|
+
| --- | --- | --- | --- |
|
|
2040
|
+
| isActive | boolean | false | Marks the button as the active menu entry. |
|
|
2041
|
+
| as | string \| object | - | The element or component to render. Defaults to a sensible HTML element. |
|
|
2042
|
+
| asChild | boolean | false | When true, renders the slot content as the root element with merged props. |
|
|
2043
|
+
| dt | any | - | It generates scoped CSS variables using design tokens for the component. |
|
|
2044
|
+
| pt | PassThrough<SidebarMenuButtonPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
|
|
2045
|
+
| ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
|
|
2046
|
+
| unstyled | boolean | false | When enabled, it removes component related styles in the core. |
|
|
2047
|
+
|
|
2048
|
+
### Pass Through Options
|
|
2049
|
+
|
|
2050
|
+
| Name |Type |Description |
|
|
2051
|
+
| --- | --- | --- |
|
|
2052
|
+
| root | SidebarMenuButtonPassThroughOptionType | Used to pass attributes to the root's DOM element. |
|
|
2053
|
+
| hooks | any | Used to manage all lifecycle hooks. |
|
|
2054
|
+
|
|
2055
|
+
### Theming
|
|
2056
|
+
|
|
2057
|
+
### CSS Classes
|
|
2058
|
+
|
|
2059
|
+
| Class |Description |
|
|
2060
|
+
| --- | --- |
|
|
2061
|
+
| p-sidebar-menu-button | Class name of the root element |
|
|
2062
|
+
|
|
2063
|
+
## Sidebar Menu Sub Button API
|
|
2064
|
+
|
|
2065
|
+
### Props
|
|
2066
|
+
|
|
2067
|
+
| Name |Type |Default |Description |
|
|
2068
|
+
| --- | --- | --- | --- |
|
|
2069
|
+
| isActive | boolean | false | Marks the sub-button as the active entry. |
|
|
2070
|
+
| as | string \| object | - | The element or component to render. Defaults to a sensible HTML element. |
|
|
2071
|
+
| asChild | boolean | false | When true, renders the slot content as the root element with merged props. |
|
|
2072
|
+
| dt | any | - | It generates scoped CSS variables using design tokens for the component. |
|
|
2073
|
+
| pt | PassThrough<SidebarMenuSubButtonPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
|
|
2074
|
+
| ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
|
|
2075
|
+
| unstyled | boolean | false | When enabled, it removes component related styles in the core. |
|
|
2076
|
+
|
|
2077
|
+
### Pass Through Options
|
|
2078
|
+
|
|
2079
|
+
| Name |Type |Description |
|
|
2080
|
+
| --- | --- | --- |
|
|
2081
|
+
| root | SidebarMenuSubButtonPassThroughOptionType | Used to pass attributes to the root's DOM element. |
|
|
2082
|
+
| hooks | any | Used to manage all lifecycle hooks. |
|
|
2083
|
+
|
|
2084
|
+
### Theming
|
|
2085
|
+
|
|
2086
|
+
### CSS Classes
|
|
2087
|
+
|
|
2088
|
+
| Class |Description |
|
|
2089
|
+
| --- | --- |
|
|
2090
|
+
| p-sidebar-menu-sub-button | Class name of the root element |
|
|
2091
|
+
|
|
2092
|
+
## Sidebar Menu Action API
|
|
2093
|
+
|
|
2094
|
+
### Props
|
|
2095
|
+
|
|
2096
|
+
| Name |Type |Default |Description |
|
|
2097
|
+
| --- | --- | --- | --- |
|
|
2098
|
+
| showOnHover | boolean | false | When true, the action is hidden until the parent menu item is hovered. |
|
|
2099
|
+
| as | string \| object | - | The element or component to render. Defaults to a sensible HTML element. |
|
|
2100
|
+
| asChild | boolean | false | When true, renders the slot content as the root element with merged props. |
|
|
2101
|
+
| dt | any | - | It generates scoped CSS variables using design tokens for the component. |
|
|
2102
|
+
| pt | PassThrough<SidebarMenuActionPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
|
|
2103
|
+
| ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
|
|
2104
|
+
| unstyled | boolean | false | When enabled, it removes component related styles in the core. |
|
|
2105
|
+
|
|
2106
|
+
### Pass Through Options
|
|
2107
|
+
|
|
2108
|
+
| Name |Type |Description |
|
|
2109
|
+
| --- | --- | --- |
|
|
2110
|
+
| root | SidebarMenuActionPassThroughOptionType | Used to pass attributes to the root's DOM element. |
|
|
2111
|
+
| hooks | any | Used to manage all lifecycle hooks. |
|
|
2112
|
+
|
|
2113
|
+
### Theming
|
|
2114
|
+
|
|
2115
|
+
### CSS Classes
|
|
2116
|
+
|
|
2117
|
+
| Class |Description |
|
|
2118
|
+
| --- | --- |
|
|
2119
|
+
| p-sidebar-menu-action | Class name of the root element |
|
|
2120
|
+
|
|
2121
|
+
## Sidebar Menu Badge API
|
|
2122
|
+
|
|
2123
|
+
### Props
|
|
2124
|
+
|
|
2125
|
+
| Name |Type |Default |Description |
|
|
2126
|
+
| --- | --- | --- | --- |
|
|
2127
|
+
| as | string \| object | - | The element or component to render. Defaults to a sensible HTML element. |
|
|
2128
|
+
| asChild | boolean | false | When true, renders the slot content as the root element with merged props. |
|
|
2129
|
+
| dt | any | - | It generates scoped CSS variables using design tokens for the component. |
|
|
2130
|
+
| pt | PassThrough<SidebarMenuBadgePassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
|
|
2131
|
+
| ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
|
|
2132
|
+
| unstyled | boolean | false | When enabled, it removes component related styles in the core. |
|
|
2133
|
+
|
|
2134
|
+
### Pass Through Options
|
|
2135
|
+
|
|
2136
|
+
| Name |Type |Description |
|
|
2137
|
+
| --- | --- | --- |
|
|
2138
|
+
| root | SidebarMenuBadgePassThroughOptionType | Used to pass attributes to the root's DOM element. |
|
|
2139
|
+
| hooks | any | Used to manage all lifecycle hooks. |
|
|
2140
|
+
|
|
2141
|
+
### Theming
|
|
2142
|
+
|
|
2143
|
+
### CSS Classes
|
|
2144
|
+
|
|
2145
|
+
| Class |Description |
|
|
2146
|
+
| --- | --- |
|
|
2147
|
+
| p-sidebar-menu-badge | Class name of the root element |
|
|
2148
|
+
|
|
2149
|
+
## Sidebar Group Action API
|
|
2150
|
+
|
|
2151
|
+
### Props
|
|
2152
|
+
|
|
2153
|
+
| Name |Type |Default |Description |
|
|
2154
|
+
| --- | --- | --- | --- |
|
|
2155
|
+
| as | string \| object | - | The element or component to render. Defaults to a sensible HTML element. |
|
|
2156
|
+
| asChild | boolean | false | When true, renders the slot content as the root element with merged props. |
|
|
2157
|
+
| dt | any | - | It generates scoped CSS variables using design tokens for the component. |
|
|
2158
|
+
| pt | PassThrough<SidebarGroupActionPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
|
|
2159
|
+
| ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
|
|
2160
|
+
| unstyled | boolean | false | When enabled, it removes component related styles in the core. |
|
|
2161
|
+
|
|
2162
|
+
### Pass Through Options
|
|
2163
|
+
|
|
2164
|
+
| Name |Type |Description |
|
|
2165
|
+
| --- | --- | --- |
|
|
2166
|
+
| root | SidebarGroupActionPassThroughOptionType | Used to pass attributes to the root's DOM element. |
|
|
2167
|
+
| hooks | any | Used to manage all lifecycle hooks. |
|
|
2168
|
+
|
|
2169
|
+
### Theming
|
|
2170
|
+
|
|
2171
|
+
### CSS Classes
|
|
2172
|
+
|
|
2173
|
+
| Class |Description |
|
|
2174
|
+
| --- | --- |
|
|
2175
|
+
| p-sidebar-group-action | Class name of the root element |
|
|
2176
|
+
|
|
2177
|
+
## Sidebar Trigger API
|
|
2178
|
+
|
|
2179
|
+
### Props
|
|
2180
|
+
|
|
2181
|
+
| Name |Type |Default |Description |
|
|
2182
|
+
| --- | --- | --- | --- |
|
|
2183
|
+
| target | string | - | Target sidebar id to toggle when nested in SidebarLayout with multiple sidebars. |
|
|
2184
|
+
| as | string \| object \| Function | - | The element or component to render. Defaults to a sensible HTML element. |
|
|
2185
|
+
| asChild | boolean | false | When true, renders the slot content as the root element with merged props. |
|
|
2186
|
+
| dt | any | - | It generates scoped CSS variables using design tokens for the component. |
|
|
2187
|
+
| pt | PassThrough<SidebarTriggerPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
|
|
2188
|
+
| ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
|
|
2189
|
+
| unstyled | boolean | false | When enabled, it removes component related styles in the core. |
|
|
2190
|
+
|
|
2191
|
+
### Pass Through Options
|
|
2192
|
+
|
|
2193
|
+
| Name |Type |Description |
|
|
2194
|
+
| --- | --- | --- |
|
|
2195
|
+
| root | SidebarTriggerPassThroughOptionType | Used to pass attributes to the root's DOM element. |
|
|
2196
|
+
| hooks | any | Used to manage all lifecycle hooks. |
|
|
2197
|
+
|
|
2198
|
+
### Theming
|
|
2199
|
+
|
|
2200
|
+
### CSS Classes
|
|
2201
|
+
|
|
2202
|
+
| Class |Description |
|
|
2203
|
+
| --- | --- |
|
|
2204
|
+
| p-sidebar-trigger | Class name of the root element |
|
|
2205
|
+
|
|
2206
|
+
## Sidebar Rail API
|
|
2207
|
+
|
|
2208
|
+
### Props
|
|
2209
|
+
|
|
2210
|
+
| Name |Type |Default |Description |
|
|
2211
|
+
| --- | --- | --- | --- |
|
|
2212
|
+
| as | string \| object | - | The element or component to render. Defaults to a sensible HTML element. |
|
|
2213
|
+
| asChild | boolean | false | When true, renders the slot content as the root element with merged props. |
|
|
2214
|
+
| dt | any | - | It generates scoped CSS variables using design tokens for the component. |
|
|
2215
|
+
| pt | PassThrough<SidebarRailPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
|
|
2216
|
+
| ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
|
|
2217
|
+
| unstyled | boolean | false | When enabled, it removes component related styles in the core. |
|
|
2218
|
+
|
|
2219
|
+
### Pass Through Options
|
|
2220
|
+
|
|
2221
|
+
| Name |Type |Description |
|
|
2222
|
+
| --- | --- | --- |
|
|
2223
|
+
| root | SidebarRailPassThroughOptionType | Used to pass attributes to the root's DOM element. |
|
|
2224
|
+
| hooks | any | Used to manage all lifecycle hooks. |
|
|
2225
|
+
|
|
2226
|
+
### Theming
|
|
2227
|
+
|
|
2228
|
+
### CSS Classes
|
|
2229
|
+
|
|
2230
|
+
| Class |Description |
|
|
2231
|
+
| --- | --- |
|
|
2232
|
+
| p-sidebar-rail | Class name of the root element |
|