UI & Theming
Learn how to customize Capsule to match your brand
The Capsule modal provides an easy integration path with built-in session management and cookie logic for account creation, login, and management. This guide will walk you through the various ways you can customize the appearance and behavior of the Capsule modal to match your application’s needs.
Modal Configuration
Required Props
The following props are required for the Capsule modal:
Authentication Options
Specify OAuth methods to display. The order of methods in the array determines their display order in the modal.
Disable email login if set to true
Disable phone login if set to true
Security Features
Enable two-factor authentication steps
Show wallet recovery option to users
Toggling these options will add or remove the corresponding steps from the modal UI. Enabling these security features can significantly enhance the protection of user accounts.
External Wallets
Specify external wallets to support. The order of wallets in the array determines their display order.
For more details on external wallet integration, please refer to our External Wallets documentation.
Auth Layout
Configure the layout of auth components
The authLayout
prop can expand or collapse the view of OAuth methods and external wallets. Only one of Auth:
or
External:
can be passed into the array, either CONDENSED
or FULL
UI versions of each.
Use our
Modal Designerto visualize different layout configurations before implementing them in your project.
Theming
Basic Theme Configuration
You can customize the overall look of the Capsule modal by providing a theme object with the following properties:
It’s crucial to set the mode
correctly based on your background color to ensure all components remain visible.
You can use custom fonts by importing them in your global CSS and specifying the font face in the font
variable of
the theme.
Advanced Theme Customization
For more granular control, use the customPalette
property within the theme object:
The customPalette
object allows you to customize colors for various components such as inputs, buttons, alerts, and
more. Refer to our API documentation for a full list of customizable properties.
By leveraging these theming options, you can ensure that the Capsule modal seamlessly integrates with your application’s design language, providing a cohesive user experience.
Was this page helpful?