shadcn.io is not affiliated with official shadcn/ui
Integrations Settings Block for React
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.
Installation
Overview
Let people see exactly what an installed app can do and take some of it back, with this integrations settings block for React with Base UI. A panel lists five installed apps as radio rows: a two-letter tile, the name, a sentence of what the app can do now ("Can read tasks, write comments, and read people"), the day it was last used and, once it has gone 90 days unused as of a fixed day, a flag. The header's Button, Review Tasklamp, opens a Sheet from the side the page reads from: each permission the app asks for is a Switch with what it allows in a sentence and the day it was granted, with Pause (the app keeps its permissions and cannot use them) and Disconnect, which opens an Alert Dialog on Keep connected. Save review, the one Shine Button, applies the switches and the pause to the row, whose sentence and flags follow; disconnecting removes the app, and Undo in the foot brings it back. The sheet is shown open in place for the preview, over the list, and the trigger opens the real one. It's built from Sheet, Switch, Alert Dialog, Badge, Button, Shine Button and Guides, with a CSS entrance only. For a workspace admin, a developer platform or any product with third-party apps.
FAQ
How do I add an app or a permission?
Add a permission to PERMISSIONS with its label and a sentence of what it allows, and an app to APPS with its two-letter mark, the day it was last used, the permissions it asks for in the order the sheet lists them and the ones it has now with the day each was granted. The rows, the sentence on each row, the 90-day flag (UNUSED_DAYS, counted from AS_OF, never from the clock) and the sheet all read from those lists.
Why is the sheet open on load, and which part is the preview's?
So the block shows what the feature is, not a lone button. On load a non-modal copy of the sheet is drawn in place over the list, with the same content and state as the real one. Press its Close or Cancel, or Escape while focus is inside it, and it is gone until a reload; the header's button then opens the real sheet with its focus trap, Escape and focus return. In your app keep the Sheet and drop the in-place copy.
Which side does the sheet open from, and what happens in a right-to-left page?
The side is read from the page's direction when the button is pressed: from the end of the layout, so the right in a left-to-right page and the left in a right-to-left one. The in-place copy uses logical positions, so it follows the direction by itself.
What stays local, and how do I make it real?
Everything. Save review changes this page's state, nothing is granted, revoked, paused or disconnected anywhere, and the apps, dates and permissions are fictional sample data. To make it real, back each switch with a call that revokes the scope or grant at your authorization server, store a paused flag your API checks on every request and revoke the app's tokens on disconnect. Disconnect asks first and Undo here only restores the row in the page.
Is it accessible, and how does it look on a phone?
The list is a group of radio buttons, so the arrow keys move the choice and the button in the header names the app it will review. The sheet traps focus, closes on Escape and returns focus to the button; each switch says which permission and app it is for, the dialog can't be dismissed by clicking outside it and the foot's status line, which says what was saved or disconnected, is a polite live region. On a phone the in-place sheet docks to the bottom of the stage with its footer pinned, and each row puts its date and flags under the sentence.
Related
- Pro
Connected Accounts Settings
Fields and formsA profile fields table where each field picks its source (by hand, Google, GitHub or Strava), and the accounts below it, which can't be disconnected while they still supply a field.
- Pro
OAuth Apps Settings
API and webhooksAn 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
A Slack notification settings panel: a table of events with a channel, a mention and a switch each, beside a drawn message from the bot that follows the chosen row and a bot name with its own check.
- Pro
Webhook Endpoints Settings
API and webhooksA webhook endpoint settings sheet open over the endpoint list: an https URL, an event tree with mixed-state group checkboxes, a signing secret with Roll secret, and recent deliveries where a failed one can be resent with its signature worked out in the browser.
- Pro
Slack Detail Integration
Scopes and stepsAn 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.
- Pro
Access Token Hygiene Settings
Sign-in and securityAn access token settings panel that flags risky tokens (no end date, unused for 90 days, the admin scope, ending soon), gives a token an end date from a menu, and revokes the ticked ones after an alert dialog lists them.