import { KbqDividerModule } from '@koobiq/components/divider';

KbqDivider

componentCopy link to KbqDivider

A themed line separator.

Horizontal by default and vertical with vertical; length gives the line a size of its own where the surrounding layout does not supply one.

The divider carries role="separator" so the boundary it draws is also exposed programmatically. A divider that only repeats a boundary already conveyed by the layout should set decorative.

@Component({ selector: 'kbq-divider' })
class KbqDivider {
    readonly vertical = input<boolean>(false);
    readonly paddings = input<boolean>(true);
    readonly decorative = input<boolean>(false);
    readonly length = input<number | null>(null);
}
verticalinputCopy link to verticalboolean

Whether the divider is vertically oriented. Defaults to false, a horizontal divider.

paddingsinputCopy link to paddingsboolean

Whether the divider spaces itself from the content around it. Defaults to true, which emits margins (not padding) along the divider's cross axis.

decorativeinputCopy link to decorativeboolean

Whether the divider is purely decorative. A decorative divider is hidden from assistive technology, for boundaries that a heading, a group or the layout itself already conveys. Defaults to false.

lengthinputCopy link to lengthnumber | null

Length of the line in pixels — its height when vertical, its width otherwise. null, the default, leaves the length to the layout the divider sits in, which is what a divider spanning a container wants. Set it for a divider that has to be shorter than its surroundings, such as one between the buttons of a toolbar, instead of reaching for a height of your own in CSS.

Suggestions for improvement
If you found a mistake or want to improve the article, create an issue on GitHub.