Divider. Overview

Preview.

Horizontal
Vertical

What does the component do?

A divider is a dividing line. It visually separates content or sections. It can be horizontal or vertical.

When should the component be used?

  • To separate logically distinct content or groups of elements.
  • When spacing alone is not enough to clarify the structure.
Usage

Rules.

  • A divider is discreet and does not disrupt reading. Use it sparingly.
  • It has sufficient distance from the surrounding elements.
  • On dark backgrounds, use the negative variant.
  • A divider is purely visual. The structure of the page comes from headings and sections.

Specification.

Examples Divider Horizontal.
Divider Vertical.
Divider Negative.
Copy HTML to clipboard.
Implementation

Web Components.

The web component is in the package @sbb-esta/lyne-elements.

Storybook with live examples Source code on GitHub

Documentation.

The <sbb-divider> is used to visually divide sections.

Style.

Based on the orientation property, the <sbb-divider> can be displayed vertically or horizontally.

It's also possible to display the component in negative variant using the self-named property.

<sbb-divider orientation="vertical"></sbb-divider>

<sbb-divider negative></sbb-divider>

Angular.

This component is also available for Angular in the package @sbb-esta/lyne-angular.

Angular overview Angular API Angular examples
API

class: SbbDividerElement, sbb-divider.

Properties.

Name Attribute Privacy Type Default Description
negative negative public boolean false Negative coloring variant flag.
orientation orientation public 'horizontal' | 'vertical' 'horizontal' Orientation property with possible values 'horizontal' | 'vertical'. Defaults to horizontal.