CSS: drawer-layout.tray
.tray — The side panel beside main content, with optional overlay and tray-like surface modifiers.
Positioning uses inset-inline-start/inset-inline (never left/right), so -placement-end docks to the true trailing edge in both LTR and RTL.
Accessibility
If used as navigation, wrap links in a semantic <nav> and provide an accessible name.
Usage
css
@import "@pantoken/components/components.css";
@import "@pantoken/components/drawer-layout.tray.css";Examples
html
<div class="instui-drawer-layout" open>
<aside class="tray" aria-label="Course navigation">
<a class="instui-link" href="#">Modules</a>
</aside>
<main class="content" role="region">Main content</main>
</div>Structure
text
@scope (@component drawer-layout)
.tray
‹content›flowchart TD
subgraph sg0 ["@scope (@component drawer-layout)"]
n1(".tray"):::cssdoc-part
n2[/"‹content›"/]:::cssdoc-slot
end
n1 --> n2
classDef cssdoc-root stroke-width:1px;
classDef cssdoc-part stroke-width:1px;
classDef cssdoc-slot stroke-width:1px;
classDef cssdoc-component stroke-width:1px;
Modifiers
| Modifier | Description |
|---|---|
.-placement-end | Dock this tray to inline-end when overlay mode is active. |
.-without-border | Remove the panel edge border. |
.-without-shadow | Remove elevation when overlay mode is active. |
Conditions
| Type | Query | Description |
|---|---|---|
| container | pantoken-drawer-layout (max-width: 46em) | — |
Tokens consumed
| Token | Type | Value |
|---|---|---|
--drawer-layout-tray-width | — | — |
--instui-border-width-sm | <length> | 0.0625rem |
--instui-color-background-elevated-surface-base | <color> | LightDarklight-dark(#ffffff, #171B21) |
--instui-color-stroke-base | <color> | LightDarklight-dark(#8D959F, #6A7883) |
--instui-component-tray-width-xs | <length> | 16em |
--instui-component-tray-z-index | <integer> | 9999 |
--instui-elevation-topmost | none | <shadow># | — |
Related
- drawer-layout.content — The primary pane that flexes alongside this member.