Skip to content

Function: shield()

Call Signature

ts
function shield(content: ShieldContent): ContainerElement;

Defined in: src/UI/blocks/shield.tsx:36

Shield component providing protective overlay for UI elements. Blocks user interaction with underlying content.

Parameters

ParameterTypeDescription
contentShieldContentContent to display when first parameter is options object

Returns

ContainerElement

Example

Basic usage with overlay

shield(
  {overlay: true},
  [
    headerBar({title: 'Protected Content'}),
    group([
      text({text: 'This content is protected by a shield'}),
    ]),
  ]
);

Remarks

The default width is the same as bubble container (350px).

Call Signature

ts
function shield(options: ShieldOptions, content: ShieldContent): ContainerElement;

Defined in: src/UI/blocks/shield.tsx:37

Shield component providing protective overlay for UI elements. Blocks user interaction with underlying content.

Parameters

ParameterTypeDescription
optionsShieldOptions-
contentShieldContentContent to display when first parameter is options object

Returns

ContainerElement

Example

Basic usage with overlay

shield(
  {overlay: true},
  [
    headerBar({title: 'Protected Content'}),
    group([
      text({text: 'This content is protected by a shield'}),
    ]),
  ]
);

Remarks

The default width is the same as bubble container (350px).

Matterway Assistant SDK Documentation