Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Integrations Account Block for React

Who can reach which of your data: one set of grants shown by data or by app, each as a removable chip with the access in words, a revoke that can be undone, and counts worked out from the grants.

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

Show people which connected apps can reach which of their data, with this grants panel for React with Base UI. A compact header holds the title and one sentence. Inside a hairline frame with a plus mark on each corner, a Segment Group flips one set of grants between By data and By app, with a count worked out from the grants ("10 grants from 5 apps"). By data, each row is a kind of data (calendar, contacts, files, mail, location) with a neutral icon tile and the apps that can reach it as chips, each naming the access in words and with an icon ("Zoom can read and write"); by app, each row is an app, shown with a two-letter lettermark tile, and the chips name the data. The cross on a chip revokes that one grant. A row with nothing in it says so, the status line at the foot reports each change, and a quiet Button undoes the last one. The two views share a grid cell, so flipping them never moves the page. It's built from Segment Group, Button and Guides, with a CSS entrance only. For a privacy settings page, a connected apps screen or any product that integrates with other services.

FAQ

How do I fill it with my own data and apps?

Edit DATA (the kinds of data a person has, each with an id, a name and a short hint), APPS (an id, a name, a one-line hint and a two-letter mark for the neutral tile) and GRANTS, a flat list of { data, app, access } where access is read or write. Both views, the chips, the counts and the empty-row lines are worked out from that one list, and the order of rows and chips follows the order of DATA and APPS. The icon for each kind of data is picked in DataIcon; the tiles for apps are placeholders you replace with logos you have the rights to use.

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

Revoking and Undo change this page's state and say so ("Revoked Zoom access to calendar in this demo."): nothing is revoked at any app and no token is touched. To wire it, call your server in remove to revoke that one grant (usually a scope on an access token, or a deletion of the app's permission for that data), and load the real grants into GRANTS. Undo would then need to ask the app to grant it again, so most products drop it or send people to reconnect the app.

How can one list be shown two ways without moving the page?

Both views are always in the markup, stacked in one grid cell: the one you are not looking at is invisible, inert and hidden from assistive technology, so the cell is as tall as the taller of the two and flipping never changes the page's height. Because both read the same grants, a chip removed in one view is gone in the other, and the counts agree. The segment control is a single choice and keeps focus when you press it.

How do Undo and focus work?

Revoking pushes the grant onto a small stack and moves focus to the next chip in the same row, or to the previous one, or to the row itself when it was the last. Undo restores the most recent one, says so, and moves focus to its chip. With nothing to undo the button stays in place and answers "Nothing to undo."

Is it accessible?

Each view is a real list named for what it holds, every row is a list of chips, and every cross is a button that names both sides ("Revoke Slack access to mail"). Access is said in words and with an icon, never by colour. The segment control is a group with one value at a time, the hidden view cannot be reached by keyboard or screen reader, and one polite status line reports each revoke, undo and empty press.

How does it look on a phone?

The segment control fills the width with its count under it. Each row stacks its name and hint over its chips, which wrap onto as many lines as they need. The status line sits above a full-size Undo.

  • Pro

    OAuth grants as a table: each app with its access level, grant date and last use, unused apps pinned to the top, scopes in plain words, a Revoke that can be undone and a bulk revoke that asks first.

  • Pro

    The sign-in providers linked to an account: each with its address, link date and use history, an Unlink that asks first and refuses on the only way in, an Undo line and quiet buttons to link more.

  • Pro

    When a provider's email is not yours: a table of what each provider returned, a choice under each mismatch to add it as a second email or keep it separate, and a count of sign-ins that would make a new account.

  • Pro

    A connected apps settings panel with a permission review sheet: each app asks for permissions shown as switches with what they allow, a pause, and a disconnect that confirms first.

  • Pro

    OAuth Apps Settings

    API and webhooks

    An OAuth apps settings window with a list of registered apps beside the chosen app's client ID, a masked secret with a confirmed Roll secret, redirect URIs that are checked when added, and grouped scopes with the consent sentence they produce.

  • Pro

    Slack Detail Integration

    Scopes and steps

    An integration detail section for a spend tool connecting to Slack: a header with the mark pair and Add to Slack, then what it does, the Slack scopes it reads and writes, three steps to install and the listing's facts.