---
title: Embedded UI overview
description: >-
  Add account and access-management components to your app, including API key
  settings.
canonical_url: 'https://saaslayer.com/docs/embedded-ui/overview/'
last_updated: '2026-10-27T19:26:49-07:00'
---
# Embedded UI overview

*Who this is for: teams adding account and access-management screens to their app.*

The UI components are **Preview**. You can choose individual widgets for your
app's settings screens rather than adopting an entire console.

## Admin Console

The Admin Console is a separate administration surface for managing a deployment's
members, roles, assignments, API keys, audit and access requests.

## Embedded Widgets

Themeable components mounted inside your product. The Preview components
include an organization switcher, member and role management, API keys, access
requests and effective-permission views. Use the pieces your app needs.

## API key management

The API key widget gives your users a settings screen for creating and managing
their own integration keys. In React it is `<ApiKeys />`; the web component is
`<sl-api-keys>`.

With your widget loader and signed-in SaaSLayer context already configured, place
the web component in your app's developer or account settings:

```html
<sl-api-keys></sl-api-keys>
```

The tag alone does not configure authentication. If your app keeps another sign-in
provider, use the [backend integration pattern](https://saaslayer.com/docs/permissions/permission-checks#keep-your-existing-sign-in)
and establish a compatible widget session before adopting this UI.

### Your user's flow

1. Select the organization or workspace the key will act in.
2. Give the key a name and choose permissions from the access they already hold.
3. Choose an explicit expiry, such as one hour, one day or 30 days.
4. Create the key and copy the secret while it is shown. It can be dismissed and
   cannot be recovered from the list later.
5. Review the key's organization, permissions, expiry and status, or revoke an
   active key when it is no longer needed.

Keys follow the selected workspace when one is active, otherwise the selected
organization. With neither selected, creation is disabled. The current widget
does not provide an in-place rotation control; [rotation and replacement](https://saaslayer.com/docs/permissions/api-keys#rotate-or-revoke-a-key)
are available through the API.

### Your backend's job

After creating a key, the integration calls your API. Your backend must verify
the key and enforce its permission decision before serving a protected request.
See [Accept API keys in your own API](https://saaslayer.com/docs/permissions/api-keys#accept-api-keys-in-your-own-api)
for the request flow, returned permissions and a backend code example.

The widget manages credentials; it does not add enforcement to your application's
API routes.

## How it's built

Everything sits on a **headless SDK**: the data and state layer with no
rendering opinion. Widgets use a vanilla imperative mount API — the rendering
stack lives inside the widget and never leaks styles onto your page:

```js
import { mountOrgSwitcher } from '@saaslayer/embed'

mountOrgSwitcher(document.getElementById('org'), {
  apiBase,
  token,
  colorScheme: 'auto',
})
```

Theming is tiered: sensible defaults, token overrides, or full CSS control.
The components use the Permissions API for access-management behavior. Your own
backend uses that API for enforcement, independently of how you build the UI.
