Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Workspace Invite Notification Block for React

Two pending workspace invitations with who invited you, the role as a glyph and a word and the time, each answered in place without moving: Accept leaves a receipt with Undo and Switch workspace, Decline asks first, and the count follows.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

Let someone say yes or no where they read the invitation, with this invite notification for React with Base UI. It is Gatenook, a workspace app, in a framed panel with a plus mark on each corner: two pending invitations, each with an Avatar of who invited you, the workspace, the role as a Badge with a glyph and a word, the member count and the time. "Accept" (the one Shine Button, on the first) turns that row's controls into "Joined Tarrow Court as Editor." with an Undo and a "Switch workspace" that makes it the workspace shown under the list; "Decline" first asks "Decline the invite?" in the same place, then leaves a receipt with an Undo. The count in the band follows every answer and a Guides rule closes each band. For workspace apps, team tools and any product people are invited into.

FAQ

How do I use my own invitations?

Edit INVITES: each has an id, the inviter and their initials, the workspace, the role (Editor or Viewer), the members count and an ISO at in UTC. HOME is the workspace you are in before you switch, and AS_OF is the page's fixed now, so a time reads "08:40 UTC" or "Yesterday 15:12 UTC".

What stays local, and how do I make it real?

All of it. Accept, Decline, Undo and Switch workspace change this page's state and say so ("Joined Tarrow Court as Editor in this demo"); no invitation is accepted, no request is sent and there is no mail link. In your app call your accept and decline endpoints from accept and decline, keep the two-step decline and keep Undo as a way back for as long as your endpoint allows it.

Why does a row never change height?

Each row has one cell holding the three states, the question, the decline confirmation and the receipt, stacked so the cell is as tall as the tallest and the inactive ones are unseen and out of the tab order. Answering swaps what shows without moving the next invitation, and focus moves to the control that took the place of the one you pressed.

Why does Decline ask first?

Declining may be hard to take back in a real product, so the row asks "Decline the invite to this workspace?" in the same place, with "Keep it" first in the order. Pressing Decline invite leaves a receipt and an Undo; Keep it puts the question back. Nobody is told in this demo.

How does it look on a phone?

Each row stacks: the avatar and the sentence, the role and the facts under it, then the buttons. The question and the receipt sit above their buttons instead of beside them, and the status line is the same one line at the foot.

Is it accessible?

Buttons name their workspace ("Accept Tarrow Court"), Undo says what it undoes, the role is a glyph and a word, and the one polite status line reports each answer and the count. Hidden states are inert, so only the visible controls are in the tab order.

  • Pro

    Invite Members Dialog

    Share and invite

    A household calendar's Members page with its invite dialog shown open: one email field that knows the household's domain, so an outside address joins as a guest, the people who already have access, and a Send invite button that adds a pending row.

  • Pro

    Team Invite Acceptance Login

    Workspaces and roles

    An invitation page for a shared team calendar: the workspace tile, Maya invited you to Hollin Row Studio, the Editor role and three members as initials with 9 more beside a form with the invited address locked, a name and a new password, or just the password for an existing account.

  • Pro

    Invite Accepted Roster Success

    People and approvals

    A confirmation page for a teammate joining: who invited them and when, how many seats are used, and a roster where the new member's row is marked Joined and holds a role select that changes the role sentence below.

  • Pro

    Join rules for a workspace: a domain rules table with a role menu and approval switch, a form that checks a domain before adding it, a field that tries an email address against the rules, and a queue of join requests to approve or decline.

  • Pro

    A role change from Viewer to Editor with who made it and when, the change as a You can now and a You can no longer cell with plus and minus marks and words, two tabs of facts and abilities at one height, and a local acknowledgement with Undo.

  • Pro

    A task assigned to you: its facts in a quiet start column, and in a framed panel a priority from three cells, a due day that must come after now, then Accept task or Reassign, each ending in a sentence with a permanent Undo.