Share Dialog
Invite by email, set what each person can do, and decide whether the link works for anyone at all — with wording that says what the choice actually does.
Installation
How you get it
One command. The CLI writes the file into components/ui/ and installs what it needs.
npx shadcn@latest add https://layropro.com/r/share-dialogAPI
“Copy prompt” above puts a full brief on your clipboard — install command, dependencies, props, and the mistakes an assistant usually makes with this component.
Props
Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.
| Prop | Type | Notes |
|---|---|---|
title | string | Panel heading. |
fileName | string | Shown under the heading — usually the file being shared. |
people | Collaborator[] | The people who already have access. |
linkAccess | LinkAccess | Who the link works for. |
linkRole | Exclude<AccessRole, "owner"> | What link holders may do, when the link is open. |
shareUrl | string | The link itself, copied to the clipboard. |
searchThreshold | number | Show the filter field once the list is longer than this. |
onInvite | (emails: string[], role: Exclude<AccessRole, "owner">) => void | — |
onRoleChange | (id: string, role: AccessRole) => void | — |
onRemove | (id: string) => void | — |
onLinkAccessChange | (access: LinkAccess, role: Exclude<AccessRole, "owner">) => void | — |
onCopyLink | (url: string) => void | — |
onClose | () => void | — |
modal | boolean | Whether the panel is being shown as a modal — over a scrim, with the page behind it inert. The panel does not render its own scrim, so it cannot know this on its own. Set it and the panel traps Tab, takes focus on open, returns focus to the trigger on close, and closes on Escape. Left off, it is an ordinary region on the page and none of that would be correct. |
Dependencies
npm packages
clsxframer-motionlucide-reacttailwind-mergeLayro foundations, installed alongside it
layro-themeLifetime access
Every component, and everything we ship next.
- All 65 components, source included
- The template, and everything released after you buy
- shadcn CLI or download — React 18/19, Tailwind v4
- One payment. No subscription.
More in Documents
Document Viewer
PaidPages, zoom, thumbnails and a comment mode. You supply the renderer.
Included with lifetime access
Annotation Pins
PaidPins on the page and a searchable panel — one set of threads, two views.
Included with lifetime access
Signer Flow
PaidWho it is waiting on, how long, and what you can do about it.
Included with lifetime access