CSC Design System v4.0.1
VueFlavour Vue React Angular TypeScript
Flavour Vue React Angular TypeScript
PrimaryCSC UI Colors Primary Secondary AccentCustom Colors Red Orange Green Blue Purple Pink
CSC UI Colors Primary Secondary AccentCustom Colors Red Orange Green Blue Purple Pink
Guides Getting started Customization Data visualization Migration guide Componentsc-accordionc-alertc-autocompletec-badgec-breadcrumbc-buttonc-button-groupc-cardc-checkboxc-color-pickerc-csc-logoc-data-tablec-date-pickerc-dividerc-file-uploadc-iconc-icon-buttonc-linkc-listc-loaderc-login-buttonsc-login-cardc-mainc-menuc-messagec-modalc-navigation-buttonc-number-fieldc-otp-inputc-pagec-paginationc-popoverc-progress-barc-progress-circlec-radio-groupc-selectc-side-navigationc-sliderc-spinnerc-statusc-stepsc-switchc-tablec-tabsc-tagsc-text-fieldc-time-pickerc-toastsc-toolbarc-tooltipc-tree-select

<c-toolbar>

The app-wide bar at the top of the dashboard layout: the logo, the service name and global actions such as the user menu or log out. It is pinned to the top of the viewport by default and stays there while the page scrolls; `static` keeps it in the page flow so it scrolls away with the content.

Usage

Pinned or static

Pinned is the default: the bar sticks to the top edge of its scroll container — the document in the dashboard layout — as soon as the page scrolls past it. Set static to leave the bar in flow instead; it then scrolls away with the page and returns when the user scrolls back to the top. The 3.x class="relative" switch is gone; static replaces it.

Inside c-main

In c-main's dashboard layout the toolbar spans both columns above the side navigation and the page, below an optional banner. c-main follows the toolbar's mode: the desktop side navigation is pinned beneath a pinned toolbar, or to the top edge once a static toolbar has scrolled away. No extra markup is needed.

Content

The bar is a horizontal flex row with a small gap. Push trailing actions to the right with margin-inline-start: auto on the first of them.

Customization

Structural styling via ::part(root). The height is the library's layout value shared with c-main, so changing it on the part does not move the pinned side navigation.

Examples

Basic
Vue React Angular TypeScript
<template>
  <div>
    <!-- static keeps the toolbar in the page flow; by default it is pinned to the top of its scroll container -->
    <c-toolbar static>
      <c-csc-logo />

      <span>My Service</span>

      <c-button appearance="text" style="margin-inline-start: auto">
        Log out
      </c-button>
    </c-toolbar>
  </div>
</template>

API reference

<c-toolbar>

The app-wide bar at the top of the dashboard layout: the logo, the service name and global actions such as the user menu or log out. It is pinned to the top of the viewport by default and stays there while the page scrolls; `static` keeps it in the page flow so it scrolls away with the content.

Properties

PropertyAttributeTypeDefaultDescription
staticstaticbooleanfalse Keep the toolbar in the page flow so it scrolls away with the content instead of staying pinned to the top of its scroll container

Slots

SlotDescription
defaultThe bar's content: the logo, the service name and global actions

CSS parts

Style from outside with c-toolbar::part(name) — parts are the library's only styling customization API.

PartDescription
rootThe toolbar bar itself: pinned to the top of its scroll container by default, in flow when `static`