You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
collapsible could also mean y-order expanding/collapsing.
sidebar.collapsed collapsed or collapsible prop is a common to control the whole sider
the y-order is control by sidebar.path.collapsible
comment if there is a better naming
// currentinterfaceSidebarGroup{text: string;link?: string;items: SidebarItem[];// whether to be collapsiblecollapsible?: boolean;// Whether to be collapsed by defaultcollapsed?: boolean;// svg tag string or image URL(optional)tag?: string;}exportinterfaceSidebar{[path: string]: (|SidebarGroup|SidebarItem|SidebarDivider|SidebarSectionHeader)[];}// afterexportinterfaceSidebarBase{collapsible?: boolean;}exporttypeSidebar=SidebarBase&{[path: string]: (|SidebarGroup|SidebarItem|SidebarDivider|SidebarSectionHeader)[];};
then user config could be
constsidebar: Sidebar={collapsible: true,"/docs": [collapsible:true,{type: "sectionHeader",title: "Introduction"},{type: "item",text: "Getting Started",link: "/start"},{type: "divider"},// ... more items],"/api": [// different configuration for API section]};
What problem does this feature solve?
I want a shortcut to toggle sidebar visibility
I know we can use search query
sidebar=0
to toggleA short cut could provides a better user experience
I did some prototype in #2142 but still have a lot detail to discuss
What does the proposed API look like?
lucide:panel-left-close
andlucide:panel-left-open
as toggle logo (if any logo prefer I will replace them)https://github.com/user-attachments/assets/6dd06fad-429f-4ff7-8695-3d4feee2d8f9
The text was updated successfully, but these errors were encountered: