Share Sheet
A share card: copy the link with a tick, pick access (anyone / team / invite-only), and share targets as a row of icons.
$
View as Markdownnpx shadcn@latest add https://sundaeui.dev/r/share-sheet.jsonOverview
The link sits in a field with a copy button that confirms in place. Access is a small select that rewrites the hint under it.
Targets (email, message, X, LinkedIn) are monochrome glyph buttons; on devices with the Web Share API, a More button opens the native sheet.
When to use
- Docs, boards, files, referral links.
When not to use
- Sharing private data publicly by default: start at invite-only.
Installation
$
pnpm dlx shadcn@latest add https://sundaeui.dev/r/share-sheet.json$
npx shadcn@latest add https://sundaeui.dev/r/share-sheet.json$
yarn dlx shadcn@latest add https://sundaeui.dev/r/share-sheet.json$
bunx --bun shadcn@latest add https://sundaeui.dev/r/share-sheet.jsonWorks in any React project. Files are written to components/sundae/. Read the source in the stage’s Code view.
- No dependencies beyond React 18 or later.
- Copy share-sheet.tsx and share-sheet.css into components/sundae/.
- The CSS file is imported by the component, so no extra configuration is needed.
- Import the component and use it as shown below.
Usage
import { ShareSheet } from '@/components/sundae/share-sheet'
<ShareSheet />Props
| Prop | Type | Default |
|---|---|---|
url*Link to share. | string | — |
titleWhat is being shared. | string | — |
onAccessChangeCalled when access changes. | (a: "anyone" | "team" | "invite") => void | — |
fillSurface: dark or light. | 'dark' | 'light' | 'dark' |
Accessibility
- Copy announces “Link copied”; access is a native select with a described hint.
- Every target is a labelled link or button.
- Reduced motion removes the movement and keeps every state change.
Customization
- Colours are CSS custom properties on .sd-shs; override them in your own stylesheet.
- fill="light" switches the built-in light palette.
FAQ
- Is Share Sheet free?
- Yes. Share Sheet is free for personal and commercial projects, with full source on this page.
- How do I install Share Sheet?
- Run npx shadcn@latest add https://sundaeui.dev/r/share-sheet.json. The files are written to components/sundae/. It has no dependencies beyond React 18 or later.
- Does Share Sheet support keyboard and screen readers?
- Copy announces “Link copied”; access is a native select with a described hint. Every target is a labelled link or button.
- Does Share Sheet respect reduced motion?
- Reduced motion removes the movement and keeps every state change.
More like this
All components →Referral Progress
Components · Refined- Pro
Team Members
Components · Understated Follow Button
Components · RefinedVote Arrows
Components · RefinedPoll Card
Components · RefinedMessage Thread
Components · Refined