0.11.0 • Published 6 months ago
@open-pioneer/experimental-layout-sidebar v0.11.0
@open-pioneer/experimental-layout-sidebar
This package provides a sidebar component. This sidebar consists of a main section (with menu entries) and a content section, which is show, when some of the menu entries are selected.
Integration
Currently the sidebar will be positioned absolute in the provided container. The following properties are provided:
- It could be set with boolean (
defaultExpanded) for default expension. - An event
expandedChangedis triggered when the main section is expanded/collapsed. sidebarWidthChangedinforms about the current width of the sidebar. So the wrapping component can react on this width.- the
itemsdefine the visible menu entries and their corresponding content.
See this sample for integration:
<div style={{ position: "relative" }}>
<Sidebar
defaultExpanded={isExpanded}
expandedChanged={(expanded) => setExpanded(expanded)}
sidebarWidthChanged={(width) => setSidebarWidth()}
items={items}
/>
</div>Example for an items array:
const items: SidebarItem[] = [
{
id: "sandbox",
icon: <SomeIcon />,
label: "Sandbox",
content: <div>Content goes here...</div>
}
];License
Apache-2.0 (see LICENSE file)
0.10.1-dev-chakra-v3.20250512110627
7 months ago
0.9.0-dev.20250220091855
9 months ago
0.10.0
7 months ago
0.9.0-dev.20250217152428
9 months ago
0.10.0-dev.20250324141112
8 months ago
0.0.0-dev-20241120114910
1 year ago
0.9.0-dev.20250224083536
9 months ago
0.11.0-dev.20250515143825
7 months ago
0.11.0
6 months ago
0.9.0
9 months ago
0.8.0
12 months ago
0.8.0-dev.20241120115147
1 year ago
0.7.0
1 year ago
0.2.3
1 year ago
0.2.4
1 year ago
0.2.2
1 year ago
0.2.1
2 years ago
0.2.0
2 years ago
0.1.3
2 years ago
0.1.2
2 years ago
0.1.1
2 years ago
0.1.0
2 years ago