Skip to main content

Divider

Used to add visual or semantic separation between content.

github
View source code
import { Divider } from '@uhg-abyss/web/ui/Divider';
    () => {
    return (
    <div style={{ height: '320px' }}>
    <Divider />
    </div>
    );
    };

    Usage

    Orientation

    Use the orientation prop to adjust the orientation to either horizontal or vertical. The default setting is horizontal.

    Width and height

    Use the width and height props to set the desired sizing dimensions.

    When horizontal orientation is selected the settings are applied as follows:

    • width : determines the left-to-right length of the of the divider; default setting is 100%
    • height : determines the thickness of the divider; default setting is 2px

    When vertical orientation is selected the settings are applied as follows:

    • width : determines the thickness of the divider; default setting is 2px
    • height : determines the top-to-bottom length of the of the divider; default setting is 100%

    Color

    Use the color prop to set the color of the Divider. The default value is '$web.semantic.color.border.content.secondary'.

    Divider Props

    NameTypeDefaultRequiredDescription
    color
    string | undefined
    '$web.semantic.color.border.content.secondary'
    -
    The color of the divider
    height
    string | number | undefined
    --
    The height of the divider
    margin
    string | number | undefined
    '$web.semantic.spacing.scale.sm'
    -
    Margin between the divider and surrounding elements
    orientation
    'horizontal' | 'vertical' | undefined
    'horizontal'
    -
    The orientation of the divider
    width
    string | number | undefined
    --
    The width of the divider

    Below are the link(s) to the relevant GitHub type files:

    Abyss.d.ts

    Divider Classes

    Class NameDescription
    .abyss-divider-rootDivider root element
    Table of Contents