Navigation

App sidebar

The main navigation of the product, expanded or collapsed to icons.

Live React portVue source: WildAppSidebar.vueStorybook story: Navigation/App SidebarReact component: WildAppSidebar

Try it

Click a destination, open Sites or Operations, and hover the rail to find the collapse button on its edge.

Current page
Collapsed
Account
const [active, setActive] = useState('Inventory');
const [collapsed, setCollapsed] = useState(false);

<WildAppSidebar
  active={active}
  collapsed={collapsed}
  user={user}
  onNavigate={setActive}
  onCollapsedChange={setCollapsed}
  onLogout={logOut}
/>
Collapsed, a row shows its name beside the rail on hover and on keyboard focus.

When to use

  • Use it on every signed-in screen, as the frame for the top-level destinations.
  • Let people collapse it to 56px when they need the width, and keep their choice from screen to screen.
Don’t use it
  • For the pages inside one area, listed beside its content. Use Sidebar nav.
  • To switch between views of one subject on a page. Use Tabs.

Anatomy

From the top: the logo, seven destinations, Settings in a group of its own, and the account, with an avatar, a name and Log out. A chevron marks a destination whose pages open in a flyout, and the collapse button shows on the right edge on hover.

States

Expanded is 232px and collapsed is 56px. Collapsing keeps every icon in the same place, so a destination stays where people learned it.

Collapsed hides the labels, chevrons, name and Log out. The current row keeps its grey fill and blue icon.

Content

  • Show the person’s full name. A long one ends in an ellipsis.
  • Use two initials in the avatar, from the first and last name.

Accessibility

The rail is a navigation landmark named “Application navigation”. The logo reads as “Wildeye”, the collapse button as “Collapse sidebar” or “Expand sidebar”, collapsed rows keep their names, and the current page carries aria-current="page".

KeyWhat it does
TabMoves to the collapse button, each destination and an open flyout’s pages, then Log out while expanded.
Enter / SpaceOpens the destination or its flyout, collapses or expands the rail, or logs out.
EscapeCloses the flyout and returns focus to its row.

Props

Each handler makes its part of the rail interactive. Without them the rail is static and has no tab stops.

PropTypeDefaultDescription
activestring—Label of the current destination or flyout page.
collapsedbooleanfalseShows the 56px icon rail.
user{ initials: string; name: string } | nulla sample userThe account at the base. null hides it.
onNavigate(label: string) => void—Called with the destination or flyout page that was chosen.
onCollapsedChange(collapsed: boolean) => void—Called with the next value when the collapse button is pressed.
onLogout() => void—Called when Log out is pressed.

Tokens

TokenValueWhere it lands
--color-grey-50#FDFDFDRail surface.
--color-white#FFFFFFCollapse button and flyout ground.
--color-grey-300#ECECEDRight edge, current fill, collapse and flyout borders.
--color-grey-200#F1F1F1Dividers, and row, page and Log out hover.
--color-grey-100#F5F5F5Collapse button hover.
--color-grey-900#4F4D55Rows and flyout pages at rest.
--color-grey-800#7F7D83Flyout page icons.
--color-text-primary#0A090BCurrent and hovered labels, name, hovered button icons.
--global-blue-1000#1877F2Current icons, 3.59:1 on the current fill.
--global-blue-1100#0C296AAvatar initials, 12.75:1 on the avatar ground.
--color-primary-light#EBFAFFAvatar ground.
(no token)#4F4D55Log out and collapse icons at rest.
--color-primary-active#1877F2Keyboard focus ring.
(no token)0 1px 3px rgba(10,9,11,.1)Collapse button lift.
--shadow-dropdown0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04)Flyout lift.
--radius-lg8pxRow and flyout corners.
--radius-md6pxLog out and flyout page corners.
--radius-full9999pxAvatar and collapse button.

Breadcrumbs

Shows where a page sits in the hierarchy, and links back up it.

Live React portVue source: WildBreadcrumbs.vueStorybook story: Navigation/Breadcrumbs

Menu

A list of actions for a row or item, opened from a trigger.

Live React portVue source: WildMenu.vueStorybook story: Navigation/MenuReact component: WMenu

Collapsible section

Hides and reveals one part of a long settings page.

Refined portVue source: WildCollapsibleSection.vueStorybook story: Layout/CollapsibleSectionReact component: WCollapsibleSection

Try it

Open and close the sections, then switch to Disclosure for the lighter inline toggle.

Variant
Badge
Header right
Starts open
<WildCollapsibleSection
  v-model="triggerOpen"
  label="Trigger"
>
  …
</WildCollapsibleSection>
<WildCollapsibleSection
  v-model="notifyOpen"
  label="Notify"
  icon="bell"
  badge="3"
>
  …
</WildCollapsibleSection>
Badge and header right belong to the section variant. Disclosure shows neither.

When to use

  • Use it to break a long settings form into named groups, such as an alarm’s Trigger and Notify.
  • Use the section variant for the main groups of a form.
  • Use the disclosure variant to tuck a few advanced options inside a group.
Don’t use it
  • For settings everyone needs. Leave them on the page.
  • To switch between views. Use Segmented.
  • For steps done in order. Use Progress tracker.

Variants

Section has a full-width header and a white panel. Disclosure is an inline text toggle with an indent.

Trigger when the value is above 100 m³/hr for 15 minutes.

section
disclosure
<WildCollapsibleSection v-model="open" label="Trigger" />
<WildCollapsibleSection v-model="open" label="Advanced options" variant="disclosure" />

Header

An icon sits before the label and a badge after it. Header-right holds a summary or a small action, beside the chevron.

<WildCollapsibleSection v-model="open" label="Recipients" icon="user-solid" badge="5" />
<WildCollapsibleSection v-model="open" label="Advanced options">
  <template #header-right>
    <WildButton variant="borders" size="2xs" @click.stop>Reset</WildButton>
  </template>
</WildCollapsibleSection>
Use the badge for a count of what’s inside, so the closed section still says something.

Content

  • Name the group with a short noun: Trigger, Notify, Recipients.
  • Use sentence case, and keep the label to one to three words.
  • Keep the badge to a number. Put a status in header-right.

Accessibility

The header is a button that announces whether it’s expanded. Where the browser supports it, find in page matches text in a closed section, such as a field label, and opens it.

KeyWhat it does
TabMoves to the header, then any header-right action, then into the open content.
Enter / SpaceOpens or closes the section.

Props

PropTypeDefaultDescription
labelstring—Header text.
modelValuebooleantrueOpen state, with v-model.
variant'section' | 'disclosure''section'Full-width header with panel, or inline toggle.
iconstring—Icon name, shown before the label.
badgestring—Count shown after the label.
#header-rightslot—Summary or action beside the chevron. Section only.
#defaultslot—The content that opens and closes.

Tokens

TokenValueWhere it lands
--global-neutral-grey-1200#1D1C20Disclosure label on hover.
--global-neutral-grey-1100#2D2B32Section label.
--global-neutral-grey-1000#4F4D55Chevron, badge, header-right and disclosure text.
--global-neutral-grey-900#7F7D83Header icon and disclosure triangle.
--global-neutral-grey-200#F5F5F5Header hover and badge fill.
--global-base-white#FFFFFFContent panel and focus ring gap.
--color-primary-active#1877F2Keyboard focus ring.
--radius-lg8pxContent panel corners.
--radius-md6pxHeader hover ground corners.
--duration-moderate200msChevron turn.

Step header

The title row for one stage of a flow, carrying the step count and the way back out.

Refined portVue source: WildStepHeader.vueReact component: WStepHeader, StepHeaderLevel

Try it

Step through with Next and the back arrow, with or without a tracker above.

Step 2 of 4, Add the logger

Count
Back
Tracker
<WildStepHeader
  :step="2"
  :total="4"
  backLabel="Back to Site"
  @back="goBack"
>
  Add the logger
</WildStepHeader>

When to use

  • Use it at the top of each stage of a flow, such as adding a site.
  • Show the count when people need to know how much is left.
  • Pair it with a progress tracker when the stages have names worth showing.
Don’t use it
  • For a page title outside a flow. Use a plain heading.
  • To show every step at once. Use Progress tracker.

Variants

Step 2 of 4, Add the logger

count and back

Step 1 of 4, Name the site

first step

Choose the inputs

title only
Leave out the back arrow on the first step, where there’s nowhere to go back to.

Content

  • Title each stage with what it asks for, in sentence case: Add the logger.
  • Name the step it returns to in the back label: Back to Site.
  • Match the count to the tracker’s steps, so the two never disagree.

Accessibility

The count is read as part of the heading: “Step 2 of 4, Add the logger”. When the step number changes, focus moves to the new title.

KeyWhat it does
TabMoves to the back button.
Shift + TabReaches the back button after a step change.
Enter / SpaceGoes back one step.

Props

PropTypeDefaultDescription
#defaultslot—The stage title.
stepnumber—1-based, as printed. Omit for no count.
totalnumber—Step count, printed after the step.
hideCountbooleanfalseHides the count line; focus still follows the step.
@back() => void—Adds the back button.
backLabelstring'Back'Names the back button for screen readers.
backDisabledbooleanfalseDisables the back button.
as'h1' | 'h2' | 'h3''h2'Heading level.
idstring—Heading id, for the form’s aria-labelledby.
focusOnChangebooleantrueFocuses the title when the step number changes.

Tokens

TokenValueWhere it lands
--global-neutral-grey-1300#0A090BTitle.
--global-neutral-grey-1000#4F4D55Step count.
--global-neutral-grey-900#7F7D83Back arrow at rest.
--global-neutral-grey-1200#1D1C20Back arrow on hover and press.
--global-neutral-grey-300#F1F1F1Back button hover fill.
--global-neutral-grey-400#ECECEDBack button press fill.
--global-neutral-grey-800#ADACB0Back arrow when disabled.
--global-blue-1000#1877F2Back button focus ring.