SidebarDetails.vue component creates an expandable/collapsible sidebar section. It accepts a title prop for the section title and a default slot for customizable content. This component is ideal for grouping related sidebar links or actions under a common title.
Features
Expandable Sidebar Section
Users can expand or collapse the section to view or hide its content, providing better space management.
Customizable Content
Use the default slot to insert any content, such as links, icons, or buttons, allowing flexible customization.
Dynamic Title
Accepts a
title prop to dynamically set the section’s heading.Usage
Basic Example
Props
The
<details> is open or closed by default.The title displayed in the summary of the details element.
Slots
Content to display inside the collapsible section.
<template #default></template>Events
This component does not emit any custom events.Example Use Cases
Sidebar Section for Links
Open Details
Notes
- This component uses the
<details>and<summary>HTML elements, which provide native expand/collapse functionality. - The content inside the component is fully customizable through the default slot.
- Ensure to import related components, such as
SidebarLinkandIconDownload, as needed in your application.