## Usage
This component ships a `sidebar()` macro for Jinja and Nunjucks.
```html
```
```html
Content
```
#### HTML structure
```html
```
<aside class="sidebar" aria-hidden="false">
Sidebar root. Supports id, aria-hidden, data-side="left|right", data-initial-open, data-initial-mobile-open, and data-breakpoint.
<nav aria-label="...">
Navigation landmark inside the sidebar.
<section>
Scrollable sidebar content.
<a aria-current="page">
Current-page link. Use data-active="true" for active non-link items.
<details> / <summary>
Native disclosure for submenus.
<main>
Sibling content wrapper. The desktop margin applies to the sibling immediately after the sidebar.
#### Basecoat differences
Basecoat supports fixed left/right sidebars, mobile overlay behavior, grouped navigation, active states, and native `details` submenus. It does not expose shadcn/ui's React provider, rail, inset/floating variants, icon-only collapse mode, menu actions, menu badges, or menu skeleton API.
RTL content is supported through logical spacing and borders. `data-side` remains physical: `left` means the left side of the viewport and `right` means the right side.
### JavaScript API
| API | Type | Description |
| --- | --- | --- |
| `sidebar.open()` | Method | Opens the sidebar. |
| `sidebar.close()` | Method | Closes the sidebar. |
| `sidebar.toggle()` | Method | Toggles the sidebar. |