Skip to main content

Element reference

Every element, what it renders, and what it accepts. Your deployment serves the same information as JSON at /embed/v1/manifest.json, which is the runtime source of truth: read that rather than this page when you need to know what a particular deployment supports.

init() options​

Call it once per page, however many elements you place.

OptionRequiredMeaning
deploymentUrlyesBase URL of the deployment serving the bundle, and the API origin.
tenantIdyesThe tenant the elements operate in.
serverIdyesThe workspace (authorization server) the person belongs to.
tokenProvideryes() => string | Promise<string>. Called once and cached, then again after a 401.
variantnoThe id of a variant stored in your workspace, whose sections and style to apply. An id the workspace does not have applies nothing.
themeno{ mode?, branding?, style? }. See Appearance and sections.
sectionsnoHide parts of an element, keyed by tag then section id. Wins over the variant.
styleNoncenoCSP nonce applied to every style tag the embed injects.
previewnoFixture responses, for building a preview. See Previewing.

Each layer overrides the one before it, so the order, lowest to highest, is: built-in defaults, the stored variant, then init() options. See Appearance and sections.

init() throws synchronously when a required field is missing, so a misconfiguration surfaces at your call site rather than as a spinner that never resolves. Calling it again replaces the configuration: caches are cleared and mounted elements re-render.

Elements​

Attributes are live. Setting one re-renders the element in place rather than remounting it.

sa-self-service​

The composite. All four panes, with its own tab navigation.

Attributesview: profile, security, privacy, or applications.
Eventssa-ready, sa-error, sa-view-changed
Sectionsprofile, security, privacy, applications

Its sections are its tabs. Hiding one drops that pane from the navigation and makes its route unreachable, and the composite falls back to the first tab still showing.

sa-self-service-profile​

Personal details, contact details, and preferred language.

Attributesnone
Eventssa-ready, sa-error
Sectionsheader, personal-information, contact-information, preferred-language
The profile pane on its own inside a host application, showing the identity header and the personal and contact information cardsThe profile pane on its own inside a host application, showing the identity header and the personal and contact information cards

sa-self-service-security​

Sign-in methods, and the sessions the person has open.

Attributesnone
Eventssa-ready, sa-error
Sectionsheader, sign-in-methods, sessions
The security pane on its own inside a host application, listing sign-in methods and the sessions the person has openThe security pane on its own inside a host application, listing sign-in methods and the sessions the person has open

sa-self-service-privacy​

The applications that hold access to the account, and the ability to withdraw it.

Attributesnone
Eventssa-ready, sa-error
Sectionsheader
The privacy pane on its own inside a host application, listing the applications that have access to the accountThe privacy pane on its own inside a host application, listing the applications that have access to the account

Only the identity header can be hidden here. Hiding the pane's single card would leave an empty element, which is a decision not to mount it rather than a configuration.

sa-self-service-applications​

The applications available to the person.

Attributesnone
Eventssa-ready, sa-error
Sectionsheader
The applications pane on its own inside a host application, listing the applications available to the personThe applications pane on its own inside a host application, listing the applications available to the person

Events​

EventDetail
sa-readynone
sa-error{ type: "unauthorized" | "forbidden" | "error" | "reauthentication_required", message?, gating? }
sa-view-changed{ view }

All three bubble and cross the shadow boundary, so you can listen on the element or on document. See Layout and events.

Feature detection​

/embed/v1 is the compatibility contract, and changes within it are additive. Detect against the manifest rather than against a product version:

const manifest = await fetch(`${deploymentUrl}/embed/v1/manifest.json`).then(r => r.json());
const views = new Set(manifest.views.map(v => v.tag));

if (views.has("sa-self-service-applications")) {
// this deployment serves the applications pane
}

The manifest lists every element with its description, attributes, events, and sections, so it answers "does this deployment have it" without any version comparison.

Previewing​

The panes render the signed-in person's own data, so there is no token that shows a meaningful preview to someone who is not that person. preview answers every request from fixtures instead:

init({
// ...
preview: {
user: {
payload: { given_name: "Alex" },
payload_schema: { /* ... */ },
},
sessions: [],
},
});

Supplying data is what enables it: there is no flag to set by mistake, and passing no fixtures keeps the elements talking to the real APIs. A request whose path has no fixture fails rather than falling through to the network, so a preview cannot reach the API with whatever token the page happens to hold.

This exists for building previews of the elements. It is not a production mode.

See also​