The collapse layout is a sidebar layout that can be collapsed or expanded. It is useful for applications that need to display a lot of information in a small space.
<template>
<TairoCollapseLayout>
<TairoCollapseSidebar>
<TairoCollapseSidebarHeader />
<TairoCollapseSidebarClose />
<TairoCollapseSidebarLinks>
<TairoCollapseSidebarLink />
<TairoCollapseCollapsible>
<template #trigger>
<TairoCollapseCollapsibleTrigger />
</template>
<TairoCollapseCollapsibleLink />
</TairoCollapseCollapsible>
</TairoCollapseSidebarLinks>
</TairoCollapseSidebar>
<TairoCollapseContent>
<slot />
</TairoCollapseContent>
</TairoCollapseLayout>
</template>
@theme {
--tairo-collapse-width-open: 17rem;
--tairo-collapse-width-collapsed: 5rem;
}
| Prop | Type |
|---|---|
classdefault: - | unknown |
keydefault: - | PropertyKey |
refdefault: - | VNodeRef |
ref-fordefault: - | boolean |
ref-keydefault: - | string |
styledefault: - | unknown |
| Slot | Type |
|---|---|
#default | { isCollapsed: any; isMobileOpen: any; toggleMobileNav: any; } |
| Prop | Type |
|---|---|
classdefault: - | unknown |
keydefault: - | PropertyKey |
refdefault: - | VNodeRef |
ref-fordefault: - | boolean |
ref-keydefault: - | string |
styledefault: - | unknown |
| Slot | Type |
|---|---|
#default | {} |
| Prop | Type |
|---|---|
classdefault: - | unknown |
keydefault: - | PropertyKey |
refdefault: - | VNodeRef |
ref-fordefault: - | boolean |
ref-keydefault: - | string |
styledefault: - | unknown |
| Slot | Type |
|---|---|
#default | {} |
| Prop | Type |
|---|---|
classdefault: - | unknown |
keydefault: - | PropertyKey |
refdefault: - | VNodeRef |
ref-fordefault: - | boolean |
ref-keydefault: - | string |
styledefault: - | unknown |
| Slot | Type |
|---|---|
#default | {} |
| Prop | Type |
|---|---|
classdefault: - | unknown |
keydefault: - | PropertyKey |
refdefault: - | VNodeRef |
ref-fordefault: - | boolean |
ref-keydefault: - | string |
styledefault: - | unknown |
| Slot | Type |
|---|---|
#default | {} |
| Prop | Type |
|---|---|
classdefault: - | unknown |
icondefault: - | string |
keydefault: - | PropertyKey |
labeldefault: - | string |
refdefault: - | VNodeRef |
ref-fordefault: - | boolean |
ref-keydefault: - | string |
styledefault: - | unknown |
todefault: - | any |
| Slot | Type |
|---|---|
#default | {} |
| Prop | Type |
|---|---|
asdefault: - | AsTag | ComponentThe element or component this component should render as. Can be overwritten by `asChild`. |
as-childdefault: - | booleanChange the default rendered element for the one passed as a child, merging their props and behavior. Read our [Composition](https://www.reka-ui.com/docs/guides/composition) guide for more details. |
classdefault: - | unknown |
default-opendefault: - | booleanThe open state of the collapsible when it is initially rendered. Use when you do not need to control its open state. |
disableddefault: - | booleanWhen `true`, prevents the user from interacting with the collapsible. |
keydefault: - | PropertyKey |
opendefault: - | booleanThe controlled open state of the collapsible. Can be binded with `v-model`. |
refdefault: - | VNodeRef |
ref-fordefault: - | boolean |
ref-keydefault: - | string |
styledefault: - | unknown |
unmount-on-hidedefault: - | booleanWhen `true`, the element will be unmounted on closed state. |
| Event | Emitted Value Type |
|---|---|
update:open | [value: boolean] |
| Slot | Type |
|---|---|
#trigger | {} |
#default | {} |
| Prop | Type |
|---|---|
classdefault: - | unknown |
icondefault: - | string |
keydefault: - | PropertyKey |
labeldefault: - | string |
refdefault: - | VNodeRef |
ref-fordefault: - | boolean |
ref-keydefault: - | string |
styledefault: - | unknown |
| Slot | Type |
|---|---|
#default | {} |
| Prop | Type |
|---|---|
classdefault: - | unknown |
keydefault: - | PropertyKey |
labeldefault: - | string |
refdefault: - | VNodeRef |
ref-fordefault: - | boolean |
ref-keydefault: - | string |
styledefault: - | unknown |
todefault: - | any |
| Slot | Type |
|---|---|
#default | {} |
| Prop | Type |
|---|---|
classdefault: - | unknown |
keydefault: - | PropertyKey |
refdefault: - | VNodeRef |
ref-fordefault: - | boolean |
ref-keydefault: - | string |
styledefault: - | unknown |
| Slot | Type |
|---|---|
#default | {} |