Skip to main content

Spacer class

📖 Description

The Spacer class defines a spacer control for the Tripetto builder. It is derived from the Control class. It is used to add some whitespace between two controls.


🆕 constructor

Creates a new Spacer instance.

Signature

constructor(  type?: "large" | "small", style?: ISpacerStyle): Spacer

Parameters

NameTypeOptionalDescription
type"large" | "small"YesSpecifies the spacer type.
styleISpacerStyleYesSpecifies the spacer style (when omitted the default global style will be used).

Return value

Returns a reference to the new Spacer instance.

📌 Statics


🏷️ style

Contains the global default style for the spacer control.

Type

ISpacerStyle

🗃️ Fields


🏷️ isVisible

Sets or retrieves the visibility of the control.

Type

boolean


🏷️ style

Contains the spacer control style.

Type

ISpacerStyle

▶️ Methods


🔧 hide

Hides the control.

Signature

hide(): this

Return value

Returns a reference to the Dropdown instance to allow chaining.


🔧 show

Shows the control.

Signature

show(): this

Return value

Returns a reference to the Dropdown instance to allow chaining.


🔧 visible

Specifies the visibility of the control.

Signature

visible(visible?: boolean): this

Parameters

NameTypeOptionalDescription
visiblebooleanYesSpecifies if the control is visible (default is true).

Return value

Returns a reference to the Dropdown instance to allow chaining.

⛓️ Interfaces


🔗 ISpacerStyle

Describes the interface for the spacer styles.

Type declaration

interface ISpacerStyle {
/* Specifies the height of the large spacer. */
large: number;

/* Specifies the height of the small spacer. */
small: number;
}