Widgets
Note
Currently only the User Profile Widget is optimized to also work on mobile devices. The other widgets are designed to work on desktop browsers only.
Descope Widgets are embeddable components designed to facilitate the delegation of operations to your application's users. Through the console, you can fully customize the display and functionality of your widgets according to your user's needs.
These widgets can be utilized in both B2B and B2C contexts, allowing your users and admins to perform various role, user, and project level management from within your application.
Creating A Widget
You can create a widget from the widgets page of your Descope console, starting from one of our widget templates or by importing one from a JSON file.
From the widget template library, you can filter widgets based on whether they are for end users or admins and based on use case. You can also preview what the template looks like from the library before creating the widget.
![]()
After you create a widget, you can edit its design and logic. You can add/remove/alter buttons and text within the widget, as well as modify the design of the widget container and the components within. Within the User Profile widget,
you can include custom attributes, and mark fields as Read-only and/or Mandatory.
To edit a specific part of the widget, simply click on it and utilize the Design & Behaviors toolbar on the right:
![]()
Inside preview mode you can see how the widget will look like on the client side, including actions and light/dark mode:
![]()
Read more about each user widgets here and admin widgets here.
Flows within Widgets
Descope Widgets are powered by Flows running underneath each component. This means you have full control over the logic and user experience for every widget action.
Customizing Widget Behavior
Each widget component has associated flows that handle the underlying operations. You can modify these flows to customize the logic for actions like:
- Email Updates: Control the verification process when users update their email, including how verification codes are sent and validated
- Passkey Management: Customize the logic for adding or removing passkeys, including any additional security checks
- Password Changes: Add custom validation rules, strength requirements, or notification logic when users reset their passwords
- Profile Updates: Add custom validation or approval workflows for profile changes
- User Creation/Management: Customize approval processes, notification logic, or validation rules for admin widgets
![]()
Configuring Component Flows
Every widget consists of components that have associated flows you can modify. There are several ways to configure and customize these flows:
-
Component Flows: Each widget component has flows that handle its operations. You can modify these flows directly to customize the behavior, such as changing how email verification works or how profile updates are processed.
-
Custom Button Actions: Some widgets (like the User Management Widget) allow you to add custom buttons. When you add a button, it comes with an empty flow that you can fully customize to implement any logic you need.
-
Behavior Settings: You can enable additional built-in capabilities from the Behavior tab in the widget settings. For example, in the User Profile Widget, you can enable the ability to remove passkeys, which activates a flow that you can then modify to customize the removal process.
To edit a flow, click on the component or button you want to customize, navigate to the Behavior tab in the settings panel on the right, and click Edit next to the relevant flow to open the flow editor.
![]()
Customizing a Widget
You can customize the Widget Component by passing in the following props. These customizations can be applied to any of the available widgets:
theme: theme can be "light", "dark" or "os", which auto selects a theme based on the OS theme. Default is "light"styleId: style Id can be the id of the style you wish to run your widget withdebug: debug can be set to true to enable debug mode
For example, this is how you would customize the User Management Widget:
Disabling and Activating Widgets
When you are not actively using a widget, you can disable it from the Descope Console. This can be done by selecting the widget(s) using the checkboxes on the left, then clicking the Disable button at the top of the table, or by clicking the three dots on the right and selecting Disable from the dropdown menu. To re-enable the widget(s), follow the same steps but select Activate instead.
![]()
Exporting a Widget
Widgets can be exported from the Descope Console as a JSON file.
This file will include the the design of the widget along with the actions of each button included in the widget. Each button's action is designed as a flow that runs using information from the widget. All of these flows being used by the widget are also exported in the file.
The widget's JSON data can be imported to another Descope project's widgets to copy a custom widget.
Show Code
Within the Widgets page of the Descope Console, you can generate a frontend code snippet by clicking the three dots at the right of the widget and selecting the Show Code option.
You can select between various frontend frameworks to integrate the selected widget into your app.
SDKs
You can use the below SDKs to implement widgets in your app.
| Language | GitHub Location |
|---|---|
| React | Click Here |
| Angular | Click Here |
| Nextjs | Click Here |
| Vue.js | Click Here |