Skip to content
Calm motion: animations on this site only fade, with no movement

Share access ​

The people who can open a file, their access level, and the access for a link

Controls who can see and change a shared file. Put it in a modal behind a Share button. To send a link through the apps of the device, use the share bar.

Basic
  • Ana PutriOwner
  • Budi Santoso
  • Sari Wulandari
Only the people above can open it.
  • v-model:people is the list of people. Each person has an id, a name, an optional email, and a role.
  • The role is view, comment, or edit. The role owner shows as text, and the owner cannot be changed or removed.
  • The form on top checks the email address with the browser. Invite emits invite with the address and the role. You add the person to the list.
  • v-model:link-access is restricted or a role. If it is restricted, only the people on the list can open the file. Otherwise, anyone with the link gets that role. A line under the menus says the result in words.
  • If you set link, a button copies it, and a status line says so.
  • Change the words with labels or a label pack. The API table lists the keys.

Usage ​

ts
import { BlessShareAccess } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
linkstring—the link to the file, for the copy button
labelsPartial<Record<BlessAccessRole | "owner", string> & { email: string; newRole: string; invite: string; people: string; remove: string; roleFor: (name: string) => string; removeFor: (name: string) => string; general: string; restricted: string; anyone: string; restrictedHint: string; anyoneHint: (role: string) => string; copy: string; copied: string; }>—
peopleBlessSharePerson[][]
linkAccess"restricted" | BlessAccessRole"restricted"who can open the link: only the people on the list, or anyone with the link at this role

Events

NamePayloadDescription
update:people[value: BlessSharePerson[]]
update:linkAccess[value: "restricted" | BlessAccessRole]
invite[email: string, role: BlessAccessRole]

Released under the MIT License. Character names and artwork belong to their owners.