Skip to content

Function: shield()

Call Signature

ts
function shield(content: ShieldContent): ContainerElement;

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

Parameters

ParameterTypeDescription
contentShieldContentContent to display when first parameter is options object

Returns

ContainerElement

Deprecated

Use the equivalent block from @matterway/sdk/UI instead. This block targets the old showUI path and will be removed when src/UI/ is dropped.

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

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:39

Parameters

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

Returns

ContainerElement

Deprecated

Use the equivalent block from @matterway/sdk/UI instead. This block targets the old showUI path and will be removed when src/UI/ is dropped.

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

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