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
| Prop | Type | Default | Description | Required |
|---|---|---|---|---|
url | string | none | Page URL passed to the share links and the native share sheet, and copied by the copy-link button. | Yes |
title | string | none | Share text for the networks that accept one (twitter, reddit, whatsapp) and the native share sheet. | Yes |
channels | SocialShareChannel[] | none | Ordered 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" | inline | article adds a labelled section suited to blog post footers. | No |
showHeading | boolean | false | Shows the heading text above the row in the inline variant; defaults to false. The article variant always shows it. | No |
heading | string | none | Section label and visible heading text; an empty or missing value falls back to the translated shareHeading. | No |
Variants
- Available variants:
inline,article(defaultinline).
Invalid combinations
The contract records no invalid combinations.
Keyboard
| Key | Behaviour |
|---|---|
| Tab | Moves through each channel link then the native-share/copy button. |
| Enter | Activates the focused share link or button. |
Rules
Every item under When not to use is a MUST NOT. MUST and SHOULD follow RFC 2119.
| Level | Rule | How it is checked |
|---|---|---|
| MUST | ARIA: 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. |
| MUST | ARIA: 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. |
| MUST | ARIA: 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. |
| MUST | Required stories produce no axe violations at the configured severity. | Automated by npm run test:stories:matrix:ci. WCAG 2.5.8. |
| MUST | The 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. |
| MUST | The component remains legible and operable under a real browser forced-colors: active pass. | Automated by npm run test:stories:hc. |
| MUST | Every documented keyboard interaction works as specified. | Not yet verified: no evidence record. WCAG 2.1.1, 2.1.2. |
| MUST | A 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.
Links
- Machine-readable contract (Design System Contract 1.0)
- Markdown version of this page
- Component index as JSON
- All components
- Source: The implementation lives in a private repository. This page, its Markdown twin and the contract are generated from it at build time and are the public source of truth.