Skip to content

feat(share): add Share component with social sharing functionality - #523

Merged
garronej merged 2 commits into
codegouvfr:mainfrom
habbichelotfi:feat/share-component
Sep 10, 2026
Merged

garronej merged 2 commits into
codegouvfr:mainfrom
habbichelotfi:feat/share-component

Conversation

@habbichelotfi

Copy link
Copy Markdown

Closes #522

This pull request introduces a new reusable Share component that implements the DSFR share block, allowing users to share content via social networks, email, or copy to clipboard. The component is fully documented, includes internationalization support, and is integrated into both Storybook and the project's integration tests.

New Share component and supporting changes:

  • Added a new Share component in src/Share.tsx with support for multiple share button types (Facebook, Twitter/X, LinkedIn, Mail, Copy), customizable labels, accessibility features, and i18n support for French and English.
  • Created Storybook stories in stories/Share.stories.tsx to demonstrate the Share component, including default usage, disabled social buttons, and custom titles, with links to DSFR documentation and demos.

Integration and testing:

  • Imported the new Share component in the integration test home page (test/integration/vite/src/Home.tsx).
  • Added a ShareExample to the integration test home page to showcase the component with all button types and clipboard functionality. [1] [2]

@garronej

Copy link
Copy Markdown
Collaborator

Thank you!

@garronej
garronej merged commit 11a3ac0 into codegouvfr:main Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Share component

2 participants