Separator
Basic
The Separator component allows you to visually separate sections of a page with customizable styles, gradients, orientation, and depth.
The basic usage of the Separator component involves specifying the desired contentPosition, gradient, depth, and orientation (vertical) props for customization.
Orientation
The vertical prop determines the orientation of the separator.
Content Alignment
The contentPosition prop specifies the alignment of the separator’s content. It can be one of the following values:
"center"(default): Content is centered."left": Content is aligned to the left."right": Content is aligned to the right."full": Full-width separator with no content.
Gradient
The gradient prop applies a gradient to the separator. It accepts the following values:
- A single
Gradientvalue (e.g.,20). - A tuple
[Gradient, GradientLength](e.g.,[20, 30]). true(default): Enables gradient with default values.false: Disables the gradient.
The Gradient and GradientLength values can range from 0 to 100.
Depth
The depth prop specifies the thickness of the separator. It can range from 0 to 7.
- Default:
1.
Custom CSS Classes
The class prop allows you to set a custom CSS class on the separator container.
classBodyLine: Sets a custom class on the separator’s body line.classLine: Sets a custom class on the individual line elements.classBodyLineLeft: Sets a custom class on the left body line.classLineLeft: Sets a custom class on the left line.classBodyLineRight: Sets a custom class on the right body line.classLineRight: Sets a custom class on the right line.
Slots
Default Slot
The default slot can be used to provide custom content inside the separator.