Components
Sidebar
The sidebar is how people get around Dugout, in the chat and the design system.
In use
Anatomy
- Logo and sidebar buttonThe Dugout logo leads to the chat. The button beside it closes the sidebar.
- ChatsOpens the chat last shown.
- Design systemOpens the design system.
- Lower partUnder a divider, the chats titled by their first questions, or the design system's pages in folding groups.
- New chatThe first row of the chats. From the design system, the logo opens Dugout on a new chat.
- Dark modeOne remembered switch for all of Dugout, reading Light mode while the page is dark.
States
When to use it
Every page has it. On a desktop it sits beside the page and stays as it was left. Under 760px, its button sits in a top bar and it slides over the page with a shade behind it.
When not to use it
Don’t put anything in it but the ways around Dugout. It lists only the chats kept in this browser.
Accessibility
The sidebar is a navigation landmark, and the current chat or page is marked for screen readers. Each rail icon has a name. On a phone it opens as a dialog that holds focus, and its own button, Escape or the shade closes it and returns focus to the sidebar button.
Tokens
In code: Sidebar in src/ds/components/Sidebar, with ChatList or the design system’s groups as its lower part
| Token | What it sets |
|---|---|
--ds-page | The sidebar's fill, the same as the page's. |
--ds-border | The thin line between the sidebar and the page. |
--ds-sidebar-width | Its width, open. |
--ds-rail-width | Its width as the rail. |
--ds-brand-soft | The current chat's and the current page's fill. |
--ds-surface | An item under the pointer. |
--ds-duration-slide | How long it takes to open and close. |
--ds-scrim | The shade over the rest of Dugout on a phone. |
--ds-top-bar | The room at the top of the page, which clears the logo while it's the rail and stays the same while it's open. |