Skip to main content

Design system components

SocialShare

Row of social share targets: per-network share deep links plus a native-share or copy-link button, with an optional labelled article-footer variant. The opt-in instagram channel is not a share target: it links to the Digitaltableteur Instagram profile and is named "Instagram profile" (contactInstagramLabel).

Status: stable. Group: structure. Markdown version: /design-system/components/social-share.md

When to use

Row of share targets with accessible labels; order and subset configurable. Composed by ArticleShareSection.

When not to use

  • Do not label channels by icon alone; each share link needs an aria-label naming the network.
  • Do not drop the copy-link fallback on browsers without the native share API; the component already handles both paths.

Look-alikes

The contract names no look-alike with a deciding condition.

Props

SocialShare props
PropTypeDefaultDescriptionRequired
urlstringnonePage URL passed to the share links and the native share sheet, and copied by the copy-link button.Yes
titlestringnoneShare text for the networks that accept one (twitter, reddit, whatsapp) and the native share sheet.Yes
channelsSocialShareChannel[]noneOrdered list of network share targets. Defaults to linkedin, twitter, facebook, reddit and whatsapp; instagram is opt-in because it links to the Digitaltableteur profile instead of sharing the page.No
variant"article" | "inline"inlinearticle adds a labelled section suited to blog post footers.No
showHeadingbooleanfalseShows the heading text above the row in the inline variant; defaults to false. The article variant always shows it.No
headingstringnoneSection label and visible heading text; an empty or missing value falls back to the translated shareHeading.No

Variants

  • Available variants: inline, article (default inline).

Invalid combinations

The contract records no invalid combinations.

Keyboard

SocialShare keyboard behaviour
KeyBehaviour
TabMoves through each channel link then the native-share/copy button.
EnterActivates the focused share link or button.

Rules

Every item under When not to use is a MUST NOT. MUST and SHOULD follow RFC 2119.

SocialShare rules
LevelRuleHow it is checked
MUSTARIA: Root is a labelled <section aria-label>; the action row is a role=group with its own label.Not yet verified: no evidence record. WCAG 4.1.2.
MUSTARIA: Each channel is a real <a target=_blank rel=noopener> with an aria-label naming the network (the instagram profile link is named "Instagram profile"). The Icon inside is decorative (aria-hidden), so the name is not repeated as a role=img; the share and copy button icons are decorative too.Not yet verified: no evidence record. WCAG 4.1.2.
MUSTARIA: Copy-link confirmation is announced by a Toast (role=status) mounted inside the component, not the shared useToast stack. Cancelling the native share sheet (AbortError) does nothing; only a genuine share failure falls back to copying the link and showing that toast.Not yet verified: no evidence record. WCAG 4.1.2.
MUSTRequired stories produce no axe violations at the configured severity.Automated by npm run test:stories:matrix:ci. WCAG 2.5.8.
MUSTThe accessibility tree (role, name, state) matches the committed snapshot for every required story.Automated by npm run test:stories:matrix:ci. WCAG 1.3.1, 4.1.2.
MUSTThe component remains legible and operable under a real browser forced-colors: active pass.Automated by npm run test:stories:hc.
MUSTEvery documented keyboard interaction works as specified.Not yet verified: no evidence record. WCAG 2.1.1, 2.1.2.
MUSTA human completed an end-to-end accessibility review of this component.Manual review, last on 2026-11-04.

Install and import

  • In-repo only. SocialShare is not exported from @digitaltableteur/react, so there is no public import path.