Skip to content

divider — Divider

A horizontal rule with a configurable style and color.

A horizontal separator between content. The line style (solid/dashed/dotted) and its color (from the palette) are configurable.

When to use

Visual breaks between content groups within a column.

Configuration

Configure under content_blocks_kit.blocks.divider (see Configuring blocks for how the levers combine).

Choice fields

Selectable values. Restrict or reorder them per host with choices: (the default is shown in bold).

FieldValues
stylesolid, dashed, dotted

Default data

Initial values for a new block. Override per host with defaults:.

FieldDefault
stylesolid
color''

Example

yaml
# config/packages/content_blocks_kit.yaml
content_blocks_kit:
    blocks:
        divider:
            choices: { style: [solid, dashed] }   # restrict / reorder the picker
            defaults: { style: solid }

Front-end

Rendered markup: .cb-kit-divider Style it by overriding the --cb-kit-* custom properties (see the kit stylesheet).

Notes

  • color draws from content_blocks.palette.

The configuration tables above are generated from content-blocks-kit:blocks --format=json, read straight from the block's code — they never go stale.

Released under the MIT License.