Preview of the Domain Table component
Setup Requirements
Auth0 Configuration Required - Ensure your tenant is configured with the
My Organization API. View setup guide
→
Installation
Running the shadcn command also installs the @auth0/universal-components-core
dependency for shared utilities and Auth0 integration.
Quick Start
Full integration example
Full integration example
While this example uses a React SPA, the prop configurations (schema, customMessages, styling, etc.) apply equally to Next.js and shadcn setups.
Props
Display Props
Display props control how the component renders without affecting its behavior. Use these to hide sections or enable read-only mode.| Prop | Type | Description |
|---|---|---|
readOnly | boolean | Disable all domain operations. Default: false |
hideHeader | boolean | Hide the header section. Default: false |
Action Props
Action props handle user interactions and define what happens when users perform domain operations. Use lifecycle hooks (onBefore, onAfter) to integrate with your application’s routing and analytics.
| Prop | Type | Description |
|---|---|---|
createAction | ComponentAction<Domain> | Create domain action. Details |
verifyAction | ComponentAction<Domain> | Verify domain action. Details |
deleteAction | ComponentAction<Domain> | Delete domain action. Details |
associateToProviderAction | ComponentAction<Domain, IdentityProvider> | Associate domain to provider. Details |
deleteFromProviderAction | ComponentAction<Domain, IdentityProvider> | Remove domain from provider. Details |
onOpenProvider | (provider: IdentityProvider) => void | Navigate to provider from configure modal. Details |
onCreateProvider | () => void | Navigate to create provider flow. Details |
createAction
Type:ComponentAction<Domain>
Controls the domain creation flow. Use onAfter to track when new domains are added.
Properties:
disabled- Disable the “Add Domain” buttononBefore(domain)- Called before creation. Returnfalseto cancel. Use for validation.onAfter(domain)- Called after successful creation. Use for analytics or notifications.
verifyAction
Type:ComponentAction<Domain>
Controls the domain verification flow. Domain verification proves ownership via DNS TXT record.
Properties:
disabled- Disable the verify buttononBefore(domain)- Called before verification attempt. Returnfalseto cancel.onAfter(domain)- Called after successful verification.
deleteAction
Type:ComponentAction<Domain>
Controls domain deletion. Recommended to use onBefore for confirmation since this is destructive.
Properties:
disabled- Disable the delete buttononBefore(domain)- Called before deletion. Returnfalseto cancel.onAfter(domain)- Called after successful deletion.
associateToProviderAction
Type:ComponentAction<Domain, IdentityProvider>
Controls associating a verified domain with an SSO provider. Only verified domains can be associated.
Properties:
disabled- Disable the associate actiononBefore(domain, provider)- Called before association. Returnfalseto cancel.onAfter(domain, provider)- Called after successful association.
deleteFromProviderAction
Type:ComponentAction<Domain, IdentityProvider>
Controls removing a domain’s association with an SSO provider.
Properties:
disabled- Disable the disassociate actiononBefore(domain, provider)- Called before removal. Returnfalseto cancel.onAfter(domain, provider)- Called after successful removal.
onOpenProvider / onCreateProvider
Type:(provider: IdentityProvider) => void / () => void
Navigation handlers for the domain configuration modal. When users configure a domain’s provider associations:
onOpenProvider- Called when user clicks on an existing provider to view/edit itonCreateProvider- Called when user clicks to create a new provider
Customization Props
Customization props let you adapt the component to your brand, locale, and validation requirements without modifying source code.schema
Set custom validation rules for domain URL input.Available Schema Fields
Available Schema Fields
create.domainUrl - Domain URL validation -
regex - Custom regex patternerrorMessage- Custom error message
customMessages
Customize all text and translations. All fields are optional and use defaults if not provided.Available Messages
Available Messages
header - Component header
title,description,create_button_text
empty_messagecolumns.domain,columns.statusactions.configure_button_text,actions.verify_button_text,actions.delete_button_text
titlefield.label,field.placeholder,field.erroractions.cancel_button_text,actions.create_button_text
titletxt_record_name.label,txt_record_content.label,verification_status.labelactions.verify_button_text,actions.done_button_text
titledescription.pending,description.verifiedactions.cancel_button_text,actions.create_button_text
title,descriptiontable.empty_message,table.columns.nameactions.close_button_text
domain_create_success,domain_create_errordomain_verify_success,domain_delete_success
styling
Customize appearance with CSS variables and class overrides. Supports theme-aware styling.Available Styling Options
Available Styling Options
Variables - CSS custom properties
common- Applied to all themeslight- Light theme onlydark- Dark theme only
DomainTable-headerDomainTable-tableDomainTable-createModalDomainTable-configureModalDomainTable-deleteModal
Advanced Customization
TheDomainTable component is composed of smaller subcomponents and hooks. You can import them individually to build custom domain workflows if you use shadcn.
Available Subcomponents
For advanced use cases, you can import individual subcomponents to build custom domain management interfaces. This is useful when you need to embed specific modals in different contexts or customize the table layout beyond what props allow.| Component | Description |
|---|---|
DomainCreateModal | Modal for creating a domain |
DomainVerifyModal | Modal for verification flow |
DomainDeleteModal | Confirmation modal for deletion |
DomainConfigureProvidersModal | Manage provider associations |
DomainTableActionsColumn | Action buttons renderer per domain row |
Available Hooks
These hooks provide the underlying logic without any UI. Use them to build completely custom interfaces while leveraging the Auth0 API integration.| Hook | Description |
|---|---|
useDomainTable | Data + API layer (fetch, create, verify, delete, associate) |
useDomainTableLogic | UI interaction state + handlers (modals, notifications) |