Skip to the page

Components

Sidebar

The sidebar is how people get around Dugout, in the chat and the design system.

In use

Open on the chat, with New chat above two chats.
Closed on a desktop, it's the rail, and the logo moves to the page's top left.

Anatomy

  1. Logo and sidebar buttonThe Dugout logo leads to the chat. The button beside it closes the sidebar.
  2. ChatsOpens the chat last shown.
  3. Design systemOpens the design system.
  4. Lower partUnder a divider, the chats titled by their first questions, or the design system's pages in folding groups.
  5. New chatThe first row of the chats. From the design system, the logo opens Dugout on a new chat.
  6. Dark modeOne remembered switch for all of Dugout, reading Light mode while the page is dark.

States

OpenThe current chat or page has the soft Dugout green fill and a medium-weight label. An item under the pointer gets the surface colour.
Rest
RailThe lower part is hidden and New chat's icon moves under Chats. Each icon's name shows on hover and focus.
Rest

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

Tokens
TokenWhat it sets
--ds-pageThe sidebar's fill, the same as the page's.
--ds-borderThe thin line between the sidebar and the page.
--ds-sidebar-widthIts width, open.
--ds-rail-widthIts width as the rail.
--ds-brand-softThe current chat's and the current page's fill.
--ds-surfaceAn item under the pointer.
--ds-duration-slideHow long it takes to open and close.
--ds-scrimThe shade over the rest of Dugout on a phone.
--ds-top-barThe room at the top of the page, which clears the logo while it's the rail and stays the same while it's open.