Components
Divider

Divider

The Divider component is used to separate content with a horizontal or vertical line. It provides customization options for color, thickness, and alignment.

Props

NameTypeDefaultDescription
childrenstring | React.ReactElement | React.ReactElement[] | React.ReactNodeContent to be displayed alongside the divider.
childrenAlign"start" | "center" | "end""center"Alignment of content with respect to the divider.
childrenGapnumberGap between content and divider.
colorstringColor of the divider line.
indentnumberIndentation of the divider line.
endIndentnumberIndentation of the divider line at the end.
thicknessnumberThickness of the divider line.
orientation"horizontal" | "vertical""horizontal"Orientation of the divider.

Try It

import { Divider } from '@kloktun/uikit'

export default function DividerExample() {
    return (
        <div className="flex flex-col w-full gap-4">
            
            <Divider />

            <Divider indent={100} endIndent={100} />
            
            <Divider>Content Above Divider</Divider>
            
            <Divider color="#00aa00" thickness={2} childrenAlign="start">Content Left of Divider</Divider>

            <Divider childrenGap={60} childrenAlign="end">Content Right of Divider with children Gap</Divider>

            <div className="flex flex-row items-stretch gap-4">
                Text example
                <div>
                    <Divider orientation="vertical" />
                </div>
                Text example
            </div>

        </div>
    );
}