Components
Preview Card
A hover card that previews what a link points at.
Usage
Basic
Blockstudio
The WordPress block framework for developers.
HTML
<bs:bsui-preview-card openDelay="200">
<bs:bsui-preview-card-trigger label="Blockstudio" />
<bs:bsui-preview-card-popup>
<bs:bsui-text content="The WordPress block framework for developers." variant="muted" />
</bs:bsui-preview-card-popup>
</bs:bsui-preview-card>Profile preview
The popup takes any blocks, so a mention can expand into an avatar, a bio and a badge.
Ada Lovelace
Ada Lovelace
Maintains the analytical engine bindings and reviews most pull requests.
Core teamHTML
<bs:bsui-preview-card openDelay="150">
<bs:bsui-preview-card-trigger label="Ada Lovelace" />
<bs:bsui-preview-card-popup>
<bs:bsui-stack direction="row" gap="3" align="start">
<bs:bsui-avatar fallback="AL" alt="Ada Lovelace" />
<bs:bsui-stack direction="column" gap="1" align="start">
<bs:bsui-text content="Ada Lovelace" variant="title" tag="h4" />
<bs:bsui-text content="Maintains the analytical engine bindings and reviews most pull requests." variant="muted" />
<bs:bsui-badge label="Core team" variant="secondary" />
</bs:bsui-stack>
</bs:bsui-stack>
</bs:bsui-preview-card-popup>
</bs:bsui-preview-card>No delay
Both delays at zero, so the card appears and leaves with the pointer.
Release 2.4.0
Release 2.4.0
Fourteen commits, two of them touching the public API.
Stable
12 March
HTML
<bs:bsui-preview-card openDelay="0" closeDelay="0">
<bs:bsui-preview-card-trigger label="Release 2.4.0" />
<bs:bsui-preview-card-popup>
<bs:bsui-stack direction="column" gap="2" align="start">
<bs:bsui-text content="Release 2.4.0" variant="title" tag="h4" />
<bs:bsui-text content="Fourteen commits, two of them touching the public API." variant="muted" />
<bs:bsui-stack direction="row" gap="2">
<bs:bsui-badge label="Stable" variant="success" />
<bs:bsui-badge label="12 March" variant="secondary" />
</bs:bsui-stack>
</bs:bsui-stack>
</bs:bsui-preview-card-popup>
</bs:bsui-preview-card>Anatomy
Preview Card is composed of the blocks below. Each one is a separate block that only renders inside its parent.
bsui/preview-cardbsui/preview-card-popupbsui/preview-card-trigger
Attributes
| Attribute | Type | Default |
|---|---|---|
openDelay | number | 600 |
closeDelay | number | 300 |
bsui/preview-card-popup
This block takes no attributes.
bsui/preview-card-trigger
| Attribute | Type | Default |
|---|---|---|
label | richtext | — |