Auth0 Universal Components for iOS use a design token model. Visual properties such as colors, typography, spacing, corner radii, and component sizes are each expressed as a token that you can override without changes to your layouts. Universal Components ship with a default Auth0 theme. You can provide your own theme to match your brand.Documentation Index
Fetch the complete documentation index at: https://docs-staging.auth0-mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
How theming works
Universal Components for iOS use a SwiftUI@Environment property wrapper theme. Apply the .auth0Theme(_:) modifier to any SwiftUI view. Every child component renders the injected Auth0Theme automatically.
Zero configuration
If you do not configure a theme, Universal Components for iOS render the Auth0 default theme. The following example displays theMyAccountAuthMethodsView component without any customization:
No additional setup is required to load the Auth0 default theme. Universal Components apply it automatically when no custom theme is provided.
Override a subset of tokens
You can override specific tokens while Universal Components for iOS render every other token using the Auth0 default theme. The following example overrides only the primary background and text colors:Configure a full brand theme
Provide your own branding theme that implements the three color category properties, then wire them into anAuth0ColorTokens container:
Read the theme in your own views
Access the@Environment(\.auth0Theme) property wrapper to apply the same tokens in any Swift view:
Token reference
Colors — Auth0ColorTokens
Colors — Auth0ColorTokens
Colors are split across three focused protocols:
Background layers
Background feedback
Text content
Text on color surfaces
Border
Auth0BackgroundColorTokens, Auth0TextColorTokens, and Auth0BorderColorTokens. These are aggregated into the Auth0ColorTokens protocol.All color assets are adaptive. The asset catalog handles light and dark mode automatically.Background primary| Token | Usage |
|---|---|
background.primary | CTA button background, primary borders |
background.primarySubtle | Low-emphasis primary background |
background.inverse | Contrast-flipped background |
background.accent | Branded or featured UI highlight |
| Token | Usage |
|---|---|
background.layerTop | Overlays and modals |
background.layerMedium | Cards and raised containers |
background.layerBase | Main app background |
| Token | Usage |
|---|---|
background.error | Error state container |
background.errorSubtle | Subtle error banner |
background.success | Success state container |
background.successSubtle | Subtle success banner |
| Token | Usage |
|---|---|
text.bold | Headings and primary body text |
text.regular | Secondary copy, descriptions, captions |
text.disabled | Disabled and placeholder text |
| Token | Usage |
|---|---|
text.onPrimary | Text and icons on background.primary |
text.onSuccess | Text and icons on background.success |
text.onError | Text and icons on background.error, validation messages |
| Token | Usage |
|---|---|
border.bold | High-contrast or selected borders |
border.regular | Input field and card borders |
border.subtle | Delicate dividers |
border.shadow | Elevation shadow border |
Typography — Auth0TypographyTokens
Typography — Auth0TypographyTokens
Each token is an
Auth0TextStyle bundling font, tracking, and lineSpacing. Apply them using the .auth0TextStyle(_:) view modifier.| Token | Typeface | Size | Weight | Line height | Tracking | Usage |
|---|---|---|---|---|---|---|
displayLarge | Inter | 34 pt | SemiBold | 41 pt | −0.20 pt | Hero headings, passkey enrollment |
displayMedium | Inter | 28 pt | SemiBold | 34 pt | −0.10 pt | Major screen titles, error headings |
display | Inter | 22 pt | SemiBold | 28 pt | −0.05 pt | Section-level headings |
titleLarge | Inter | 20 pt | SemiBold | 25 pt | 0 pt | Screen titles, subheading cards |
title | Inter | 17 pt | SemiBold | 24 pt | 0 pt | In-content titles |
body | Inter | 17 pt | Regular | 24 pt | 0 pt | Descriptions, body copy |
bodySmall | Inter | 15 pt | Regular | 20 pt | +0.10 pt | Secondary body copy, footnotes |
label | Inter | 16 pt | Medium | 21 pt | +0.10 pt | Button labels, form field labels |
helper | Inter | 13 pt | Regular | 18 pt | +0.20 pt | Captions, helper text |
overline | Inter | 11 pt | Regular | 16 pt | +0.77 pt | Overline and category labels |
If typeface
Inter is not bundled in the host application, SwiftUI uses the SF Pro typeface automatically.Spacing — Auth0SpacingTokens
Spacing — Auth0SpacingTokens
Spacing defaults to a
4 pt grid. Use the token name in design handoffs to customize spacing, not the raw pixel value.| Token | Default | Description |
|---|---|---|
xxs | 4 pt | Minimal gap between tightly coupled elements |
xs | 8 pt | Small gap between grouped elements |
sm | 12 pt | Medium internal padding |
md | 16 pt | Standard component and container padding |
lg | 24 pt | Larger padding for major sections |
xl | 32 pt | Extra-large padding |
xxl | 48 pt | Double-extra-large padding |
xxxl | 56 pt | Triple-extra-large padding |
Radius — Auth0RadiusTokens
Radius — Auth0RadiusTokens
| Token | Default | Usage |
|---|---|---|
small | 8 pt | Single character-input cells (OTP, PIN digits) |
medium | 12 pt | Banner and feedback cards |
inputField | 14 pt | Text inputs, code display containers |
button | 16 pt | CTA buttons, auth-method cards |
pill | 24 pt | Pill-shaped outline buttons |
Sizes — Auth0SizeTokens
Sizes — Auth0SizeTokens
| Token | Default | Usage |
|---|---|---|
buttonHeight | 48 pt | All primary and secondary action buttons |
inputHeight | 60 pt | Text and phone-number input fields |
size4xlDimen | 48 pt | Width of a single character-input cell |
size5xlDimen | 56 pt | Height of a single character-input cell |
containerSizeLargeDimen | 52 pt | Height of a read-only code display container |
iconSmall | 16 pt | Small icons—chevrons, info indicators, checkmarks |
iconMedium | 24 pt | Standard icons—authentication-method images |
iconLarge | 28 pt | Large icons—three-dots menu |
Learn more
Install the iOS SDK
Platform prerequisites and installation for iOS.
Build a Self-Service Account Security Interface
Initialize the SDK and wire the token provider to your Auth0 tenant.