Skip to content

Function: Horizontal()

Call Signature

ts
function Horizontal(content: ChildBlock[]): Block;

Defined in: src/renderer/blocks/index.ts:391

Horizontal layout — arranges content in a row.

Parameters

ParameterType
contentChildBlock[]

Returns

Block

Examples

ts
Horizontal([
  InputField({name: 'firstName', label: 'First name'}),
  InputField({name: 'lastName', label: 'Last name'}),
]);
ts
Horizontal(
  {gap: 8, align: 'center', justify: 'space-between', padding: 16},
  [
    InputField({name: 'email', label: 'Email', type: 'email'}),
    InputField({name: 'phone', label: 'Phone', type: 'tel'}),
  ],
);

Call Signature

ts
function Horizontal(options: HorizontalProps, content: ChildBlock[]): Block;

Defined in: src/renderer/blocks/index.ts:392

Horizontal layout — arranges content in a row.

Parameters

ParameterType
optionsHorizontalProps
contentChildBlock[]

Returns

Block

Examples

ts
Horizontal([
  InputField({name: 'firstName', label: 'First name'}),
  InputField({name: 'lastName', label: 'Last name'}),
]);
ts
Horizontal(
  {gap: 8, align: 'center', justify: 'space-between', padding: 16},
  [
    InputField({name: 'email', label: 'Email', type: 'email'}),
    InputField({name: 'phone', label: 'Phone', type: 'tel'}),
  ],
);

Matterway Assistant SDK Documentation