Separator

Represents a separator component builder. Used to add visual spacing or dividers between components.

Signature

export declare class Separator extends BaseComponentBuilder<APISeparatorComponent>
JSDoc
Examples
// A simple separator for spacing
const spacingSeparator = new Separator().setSpacing(Spacing.Small);

// A separator acting as a visual divider
const dividerSeparator = new Separator().setDivider(true);

Properties

0

No properties.

Methods

4

Methods

setId(id: number): this;

Sets the ID for the separator component.

Parameters
id
The ID to set.
Returns

The updated Separator instance.

setDivider(divider?: boolean): this;

Sets whether this separator should act as a visual divider.

Parameters
divider
Whether to render as a divider (defaults to false).
Returns

The updated Separator instance.

setSpacing(spacing: Spacing): this;

Sets the amount of spacing this separator provides.

Parameters
spacing
The desired spacing level ('None', 'Small', 'Medium', 'Large').
Returns

The updated Separator instance.