Content switcher

The content switcher is a layout-level component that helps differentiate and group similar or identical types of records and allows users to switch between them within itself.

Design

Web component

Is documented

Status

Healthy

Figma component

Storybook

Principles

Use when

  1. Categorize subtypes belonging to the record type depending on a record type.

Don't use when

  1. grouping the record types that define the relevant main record on show pages or report pages. Use tab instead.

Structure

contentswitcher-structure
  1. Selected button (section)
  2. Unselected button (section)

Properties

Variants

Storybook failed to load. Please connect to the VPN to access.

Solid

Solid buttons are unselected when they are of the secondary button type (with a filled background) and are primarily used on index pages.

Outline

Outline represents unselected buttons in an outline style and is primarily used on report pages.

Size

Storybook failed to load. Please connect to the VPN to access.

Default

Default should be used if the content switcher wanted to display on index pages.

Small

Small should be placed where data types need to be grouped on report pages.

Behavior

Interaction

The content switcher separates different states or types based on the type of record to be conveyed throughout an index page or a report page. In the content switcher bar on each page, when the page is loaded, the first item in the content switcher's array is selected by default.

The types or data types to be included in the content switcher are determined based on the desired most frequently used ones or the order of action types a data type will receive.

Item count

The maximum number of item for a content switcher can accommodate is limited to 4, and the minimum required is 2. When using 4 or more, resizing according to the general layout of the interface may be problematic. The positioning of the content switcher alongside other components and the desired content should be determined with consideration for this.

Figma source