Skip to content
Block Kit for React
Esc
↑↓navigate↵open⌘Jpreview
On this page

Contact card

A person's name and avatar, resolved from a Slack user id.

contact_card shows the name for a Slack user id, resolved the same way a mention is. It doesn’t appear in the public @slack/types package, so treat this page’s field list as the reference.

Your AppAPP
Ada LovelaceContact

Fields

PropType
typestring

Always `contact_card`.

Typestring
contact_user_id?string

A Slack user id to resolve to a name, the same way `<@U0ADA>` resolves inside mrkdwn.

Typestring

Examples

Resolved user

The preview above resolves U0ADA to Ada Lovelace using the preview’s sample directory. In your own app, wire up a resolver backed by the Slack Web API so real user ids resolve to real names.

Unresolved user

Your AppAPP
Contact

When a user id can’t be resolved (no resolver configured, or the resolver doesn’t know that id), the card shows a placeholder skeleton in place of the name, the same way Slack’s own Builder does for an id it can’t look up.

Inside a container

Your AppAPP
Team
This content could not be displayed.

Was this page helpful?