Building with the SDK
Components
The drop-in UI, and how it picks up your brand.
Every component renders what your environment has enabled. Turn magic links on in the console and they appear; turn passkeys off and they stop being offered. You do not redeploy.
SignIn
<SignIn afterSignInUrl="/dashboard" />
Renders whichever of password, magic link, email code and ZevID your environment accepts. Enable more in the console and they appear here, with no change to your code:
With several enabled that gets long. secondaryMethods="collapsed" folds the
alternatives behind a toggle:
<SignIn secondaryMethods="collapsed" />
Which is right depends on the method you want people to reach for, so it is yours to choose rather than ours to decide.
If none are enabled it says so, rather than rendering an empty box.
Two-step verification. For someone who has set it up, the form gives way
to a code step after the first one. Under a required policy, a sign-in ends
with setup instead, and the component shows it before your children or
afterSignInUrl take over. Neither appears for anyone else. See
Two-step verification.
| Prop | Type | Default | |
|---|---|---|---|
afterSignInUrl | string | Where to go once signed in. Omit it and the component simply stops rendering the form, leaving your router in charge. | |
secondaryMethods | 'inline' | 'collapsed' | 'inline' | Whether the passwordless alternatives are laid out or folded away. |
layout | 'centered' | 'split-left' | 'split-right' | console | Where the form sits. split-left puts the form on the left. |
fullPage | boolean | console | Centre a centered card on the whole screen. Without it, the card sits wherever your own element puts it. Split layouts always fill the screen. Also a console switch: Customisation → Layout → Centre it on the whole page. |
aside | ReactNode | console panel | What fills the other half of a split screen. |
children | ReactNode | Rendered instead of the form once somebody is signed in. | |
appearance | Appearance | This component’s look, merged over the provider’s. See Customising the components. | |
localization | Localization | This component’s words, merged over the provider’s. | |
className | string | Applied to the outer wrapper. |
SignInWithZevId
Just the SSO button, for a sign-in page you built yourself.
<SignInWithZevId />
No card, no identity block, no attribution: it is a control inside your layout
rather than a screen of ours. You do not have to adopt <SignIn> to offer
ZevID.
| Prop | Type | Default | |
|---|---|---|---|
redirectUrl | string | current page | Where to return after signing in. |
label | string | 'Continue with ZevID' | Overrides localization.common.continueWithZevId for this button. |
variant | 'primary' | 'secondary' | 'secondary' | secondary suits a row of provider buttons. |
shape | 'default' | 'pill' | 'square' | 'default' | default follows your radius. |
appearance | Appearance | This component’s look, merged over the provider’s. See Customising the components. | |
localization | Localization | This component’s words, merged over the provider’s. | |
className | string |
Leave afterSignInUrl off and the component simply stops rendering the form
once somebody signs in, so your own router decides what happens next.
SignUp
<SignUp afterSignUpUrl="/welcome" />
If your environment requires email confirmation, this shows the “check your email” state instead of signing the person in.
The first and last name fields follow the console, under Authentication → Personal information: each is off, optional or required. Change it there and the form changes without a deploy.
| Prop | Type | Default | |
|---|---|---|---|
afterSignUpUrl | string | Where to go once the account exists and a session started. | |
requireConfirmPassword | boolean | true | Ask for the password twice. |
layout | 'centered' | 'split-left' | 'split-right' | console | As on <SignIn>. |
fullPage | boolean | console | As on <SignIn>. |
aside | ReactNode | console panel | As on <SignIn>. |
children | ReactNode | Rendered instead of the form once signed in. | |
appearance | Appearance | This component’s look, merged over the provider’s. See Customising the components. | |
localization | Localization | This component’s words, merged over the provider’s. | |
className | string |
UserButton
<UserButton afterSignOutUrl="/" />
An avatar and a menu. Renders nothing when nobody is signed in, so it can sit beside a sign-in button in your header without the two fighting.
| Prop | Type | Default | |
|---|---|---|---|
afterSignOutUrl | string | Where to go after signing out. | |
userProfileMode | 'none' | 'modal' | 'navigation' | 'none' | Adds Manage account to the menu. modal opens <UserProfile> in a dialog; navigation goes to userProfileUrl. |
userProfileUrl | string | Where Manage account goes with userProfileMode="navigation". | |
userProfileProps | UserProfileProps | { variant: 'sidebar' } | Passed to the profile in the dialog, e.g. { showSessions: true }. |
appearance | Appearance | This component’s look, merged over the provider’s. See Customising the components. | |
localization | Localization | This component’s words, merged over the provider’s. | |
className | string |
Add Manage account to open the profile in a dialog, without building a settings page:
<UserButton userProfileMode="modal" userProfileProps={{ showSessions: true }} />
The dialog moves focus into itself and back to the button when it closes, keeps Tab inside, and closes on Escape or a click outside.
TaskSetupMfa
The setup screen for an app that requires two-step verification: scan a QR code, enter the first code, save the recovery codes.
<TaskSetupMfa afterSetupUrl="/dashboard" />
Set up two-step verification
This app asks for a code from an authenticator app when you sign in.
Secured by ZevAuthIt renders nothing unless the session has setup still to do, so it can sit
on a page unconditionally. <SignIn> shows it by itself after a sign-in;
place it yourself to catch someone who arrives another way, such as a page
reload with a restored session.
| Prop | Type | Default | |
|---|---|---|---|
afterSetupUrl | string | Where to go once it’s set up and the codes are saved. | |
onComplete | () => void | Called at the same moment. | |
appearance | Appearance | This component’s look, merged over the provider’s. | |
localization | Localization | This component’s words, merged over the provider’s. Its strings are in the mfa group. | |
className | string |
UserAvatar
The signed-in person’s picture, or their initials, without the menu. For a comment box, a “signed in as” line, or a header that has its own menu.
<UserAvatar size={40} />
Renders nothing when nobody is signed in.
| Prop | Type | Default | |
|---|---|---|---|
size | number | 28 | Width and height in pixels. |
appearance | Appearance | This component’s look, merged over the provider’s. See Customising the components. | |
className | string |
UserProfile
<UserProfile />
Your profile
Picture, name and password, for a settings page. The email is shown but not editable: changing an address has to be proved before it takes effect, so it is a flow of its own rather than a text input.
The picture saves on its own rather than waiting for the form’s button. By the time it appears on screen it has already been uploaded, and a Save that seemed to be needed afterwards would ask for a second commitment to something already done.
The password fields start closed. Most visits to a profile page are to change a name, and two empty password boxes on arrival invite a password manager to fill them and a person to wonder what is wrong.
Render one half at a time if your settings area has its own navigation:
<UserProfile section="security" />
| Prop | Type | Default | |
|---|---|---|---|
section | 'all' | 'profile' | 'security' | 'all' | Render both, or one, so they can live on separate pages. |
defaultPasswordOpen | boolean | false | Whether the password fields start open. |
variant | 'stacked' | 'sidebar' | 'stacked' | sidebar puts Profile and Security in a navigation column. |
showMfa | boolean | auto | Two-step verification under Security: set it up, new recovery codes, turn it off. Left out, it appears only when your app requires it or this person has it. true always shows it; false never does. |
showSessions | boolean | false | List the devices this person is signed in on, under Security, with a way to sign each out. IP addresses appear only if you allow them in the console, under Authentication → Sessions. |
appearance | Appearance | This component’s look, merged over the provider’s. See Customising the components. | |
localization | Localization | This component’s words, merged over the provider’s. | |
className | string |
Sidebar layout and active devices
For a settings page or a dialog with room for it, variant="sidebar" puts the two sections in a navigation column. showSessions adds Active devices under Security: each device someone is signed in on, which one they’re using now, and a way to sign the others out.
<UserProfile variant="sidebar" showSessions />
Profile
Both are opt-in, so an existing <UserProfile /> looks exactly as it did.
OrganizationSwitcher
<OrganizationSwitcher />
Hides itself for somebody who belongs to no organizations, because a switcher with one option cannot do anything.
| Prop | Type | Default | |
|---|---|---|---|
allowPersonal | boolean | true | Offer a way back to personal scope. |
createOrganizationMode | 'none' | 'inline' | string | 'none' | Adds Create organization to the menu. inline opens the form in a dialog; a string is a URL. With either, the switcher also shows for people in no organization yet. Not shown when creating organizations is turned off in the console. |
afterCreateOrganizationUrl | string | Where to go after creating one from the dialog. | |
appearance | Appearance | This component’s look, merged over the provider’s. See Customising the components. | |
localization | Localization | This component’s words, merged over the provider’s. | |
className | string |
OrganizationList
Choose an account: a full screen for picking which organization, or the personal account, to continue as. Use it right after sign-in in a product where most things happen inside an organization. <OrganizationSwitcher> is the same choice as a compact control for a header.
<OrganizationList afterSelectOrganizationUrl="/dashboard" createOrganization="inline" />
| Prop | Type | Default | |
|---|---|---|---|
allowPersonal | boolean | true | Offer the personal account as a choice. |
createOrganization | 'inline' | string | Adds Create organization. inline swaps the list for the create form; a string is a URL. No create row without it, or when creation is turned off in the console. | |
afterSelectOrganizationUrl | string | Where to go once the session has switched. | |
onSelect | (organization | null) => void | Called after switching. null is the personal account. | |
appearance | Appearance | This component’s look, merged over the provider’s. See Customising the components. | |
localization | Localization | This component’s words, merged over the provider’s. | |
className | string |
CreateOrganization
A form that creates an organization and makes it the active one. A second, skippable step offers a logo, because a picture can only be uploaded once the organization exists.
<CreateOrganization afterCreateOrganizationUrl="/dashboard" />
Create organization
Refusals are explained in plain words: creation turned off in the console, the per-person limit reached, a slug already taken. Change any of them with localization.createOrganization, or by error code with localization.errors.
Whether people may create organizations, and how many, is set in the console under Organizations.
| Prop | Type | Default | |
|---|---|---|---|
afterCreateOrganizationUrl | string | Where to go once it exists. | |
onCreated | (organization) => void | Called with the new organization, already active. | |
showSlug | boolean | console setting | Ask for a slug too. Follows the console’s slug setting when left out; set it to force the field on or off. |
showLogoStep | boolean | true | Offer a logo upload after creating. It can always be skipped. |
onCancel | () => void | Shows a Cancel button that calls this. | |
appearance | Appearance | This component’s look, merged over the provider’s. See Customising the components. | |
localization | Localization | This component’s words, merged over the provider’s. | |
className | string |
OrganizationProfile
<OrganizationProfile />
Northwind
Lists members and, for anybody with org:members:manage, offers the controls
to change them. The organization’s picture appears above them for anybody with
org:manage, which is a separate permission on purpose: inviting a colleague
and renaming the company are not the same authority.
| Prop | Type | Default | |
|---|---|---|---|
variant | 'stacked' | 'sidebar' | 'stacked' | sidebar puts General and Members in a navigation column. |
showLeave | boolean | false | Offer Leave organization, with a confirmation. |
showDelete | boolean | false | Offer Delete organization to people with org:delete, when deleting from the app is allowed in the console. The name has to be typed to confirm. |
afterLeaveOrganizationUrl | string | Where to go after leaving or deleting. | |
appearance | Appearance | This component’s look, merged over the provider’s. See Customising the components. | |
localization | Localization | This component’s words, merged over the provider’s. | |
className | string |
Sidebar layout, leaving and deleting
<OrganizationProfile variant="sidebar" showLeave showDelete />
General
Leaving and deleting are off unless you turn them on, so an existing <OrganizationProfile /> is unchanged. The last owner can’t leave: the component says to make someone else an owner first, or to delete the organization instead. Deleting removes every membership. The members’ accounts are kept.
ImageField
The picture control from <UserProfile> and <OrganizationProfile>, exported
on its own so a custom settings screen gets the same behaviour rather than
reimplementing the upload-then-save sequence around uploadAvatar.
<ImageField
label="Photo"
value={user.imageUrl}
upload={(file, onProgress) => client.me.uploadAvatar({ file, onProgress })}
onSave={(imageUrl) => client.me.update({ imageUrl })}
/>
upload and onSave are separate so you decide what the URL is saved to. That
is what lets the same control serve a user’s avatar and an organization’s
image without knowing which it is looking at.
| Prop | Type | Default | |
|---|---|---|---|
label | string | ||
value | string | null | The picture now, or null. | |
upload | (file, onProgress) => Promise<string> | Resolves to the URL to save. | |
onSave | (url: string | null) => Promise<unknown> | Called with null on removal. | |
shape | 'circle' | 'square' | 'circle' | Round for a person, square for an organization. |
isDisabled | boolean | false |
Styling
The components bring their own CSS, injected once on first render, so
there is no stylesheet to import. Every class is prefixed zv- and
nothing styles bare elements: our styles can’t reach your markup, and
your global styles don’t leak into ours.
Your console branding arrives from the API: the accent, logo, radius and font. Here is the same component with a developer’s own colour:
From code, appearance goes much further, in three layers:
- Console fields: the same settings as the console, overridden from your repository.
variables: design tokens for colour, font, size, radius, shadow and card width. Each colour takes a value per scheme.elements: a class name or a style object for any of 50+ named parts, fromcardtobuttonPrimarytomenuItem.
<SignIn
appearance={{
variables: { colorPrimary: '#0f766e', fontSize: '14px', borderRadius: '6px' },
elements: { buttonPrimary: 'font-semibold' },
}}
/>
Every option, the full element list, Tailwind and cascade layers, and recipes are in Customising the components.
The ZevAuth badge
“Secured by ZevAuth” appears under the card. Whether it can be removed is decided by your plan, on the server. A client cannot turn it off. Development always shows it, so you never design against a screen production will not give you.
Updated at, Tuesday, November 24, 2026