ZevAuth
Sign up

Concepts

Customising the components

Console settings, design tokens, and per-element styling with the appearance prop, from one colour to a component that is entirely yours.

Every ZevAuth component can be made to look like the rest of your product. How far you go is up to you: one colour, a full set of design tokens, or a class on every button and field.

There are four layers, from broadest to narrowest. You can use any mix of them.

LayerWhat it changesReach for it when
themeA whole ready-made lookYou want a good starting point and not a design project
Console fieldsLogo, accent, layout, wordingSomeone should be able to change it without a deploy
variablesDesign tokens: colours, font, size, radius, shadowYou want the components to match your design system
elementsOne part at a time: the card, the primary button, every inputA token cannot say it: a weight, a letter-spacing, a hover state

All of them go in the same appearance object:

<ZevAuthProvider
  publishableKey="pk_live_..."
  appearance={{
    theme: 'soft',                           // a ready-made look
    cardStyle: 'flat',                       // a console field
    variables: { colorPrimary: '#5b3df5' },  // a design token
    elements: { buttonPrimary: 'font-semibold' } // one part
  }}
>
  <App />
</ZevAuthProvider>

Anything you leave out keeps its console value. You can move one setting into your repository without moving the rest.

Where to put it

Put it onIt applies to
The consoleEvery component and every hosted page, with no deploy
<ZevAuthProvider appearance>Every component under that provider
A component’s appearance propThat one component

The narrower setting wins. A component’s appearance beats the provider’s, and the provider’s beats the console.

<ZevAuthProvider publishableKey="pk_live_..." appearance={{ variables: { colorPrimary: '#5b3df5' } }}>
  <SignIn />
  {/* Same colour, but this one screen is flat. */}
  <SignUp appearance={{ cardStyle: 'flat' }} />
</ZevAuthProvider>

Every component takes appearance: <SignIn>, <SignUp>, <SignInWithZevId>, <UserButton>, <UserProfile>, <OrganizationSwitcher> and <OrganizationProfile>.

Merging is deep. A component that sets one variable or one element keeps the provider’s others:

  • Variables merge key by key.
  • Element classes from both layers are applied together.
  • Element styles merge property by property, and the component’s values win.

Themes

A theme is a ready-made look. Pick one by name and override anything you like on top of it:

<ZevAuthProvider publishableKey="pk_live_..." appearance={{ theme: 'soft' }}>
// Soft, but with your own corner radius.
appearance={{ theme: 'soft', variables: { borderRadius: '6px' } }}

No theme sets your brand colour. The accent from the console, or your colorPrimary, still paints the buttons. Every theme works in light and dark. Use the switch on each preview to check.

default

A quiet bordered card. This is what you get with no theme.

Live preview
Northwind

Sign in

Secured by ZevAuth

soft

A raised card with a soft shadow and a little more rounding. The attribution sits in a tinted band along the bottom edge.

Live preview
Northwind

Sign in

Secured by ZevAuth

minimal

Left-aligned and borderless, with filled fields and no card outline. For products whose own interface is typographic rather than boxed.

Live preview
Northwind

Sign in

Secured by ZevAuth

sharp

Square corners and firm outlines in the text colour.

Live preview
Northwind

Sign in

Secured by ZevAuth

contrast

Stronger text, borders and labels, and slightly larger type. Secondary text meets WCAG AA contrast too, not just body text.

Live preview
Northwind

Sign in

Secured by ZevAuth

How themes combine

A theme sits directly beneath the appearance it’s given in. The full order, from weakest to strongest:

  1. The console
  2. The provider’s theme
  3. The rest of the provider’s appearance
  4. A component’s theme
  5. The rest of that component’s appearance

So a component can use a different theme from the rest of your app, and your own values always beat a theme given at the same level:

<ZevAuthProvider publishableKey="pk_live_..." appearance={{ theme: 'soft' }}>
  <SignIn />                                      {/* soft */}
  <UserProfile appearance={{ theme: 'minimal' }} /> {/* minimal */}
</ZevAuthProvider>

Starting from a theme in code

The themes are exported as plain Appearance objects, so you can read one, extend it, or show the list in your own settings screen:

import { themes, type Appearance } from '@zevauth/react';

const ours: Appearance = {
  theme: themes.soft,              // or 'soft'
  elements: { title: { letterSpacing: '-0.02em' } },
};

theme also accepts any Appearance of your own. That’s how a team shares one house style across several apps.

Console fields

These are the settings under Customisation in the console. In appearance they have the same names, so a value can move between the two without changing.

The brand

FieldValuesWhat it does
accentColorany hexButtons, focus rings, the progress bar
colorScheme'system' 'light' 'dark'Follows the device, or forces one
borderRadius'none' 'small' 'medium' 'large' 'pill'Corners on every control
fontFamily'system' 'sans' 'serif' 'mono'The component font
logoUrla URLAbove the form, and in every auth email

For any font or radius not in these lists, use variables.fontFamily or variables.borderRadius. They take any CSS value, including 'inherit' to use your page’s font.

The form

FieldValuesWhat it does
cardStyle'card' 'flat''flat' removes the border, background, shadow and padding
contentAlign'center' 'top'Where the form sits vertically in its space
showIdentitytrue falseWhether your logo and name appear above the form
showAppNametrue falseWhether your name prints under your logo

If your page already has its own panel, our card is a box inside a box. cardStyle: 'flat' and showIdentity: false remove ours:

<SignIn appearance={{ cardStyle: 'flat', showIdentity: false }} />

If your app has a fixed header, a centred form can collide with it. Start the form at the top instead:

<SignIn appearance={{ contentAlign: 'top' }} />

The words

FieldValuesWhat it does
signInTitletext, or nullnull prints no heading at all
signInSubtitletext, or nullEmpty by default
signUpTitletext, or null
signUpSubtitletext, or null
<SignIn appearance={{ signInTitle: 'Welcome back', signInSubtitle: 'Sign in to continue.' }} />
<SignIn appearance={{ signInTitle: null }} />   {/* no heading */}

The layout

FieldValuesWhat it does
signInLayout'centered' 'split_left' 'split_right'Where the form sits on the page
signInFullPagebooleanA centered card takes the whole screen and sits in the middle
asideStyle'gradient' 'solid' 'image'What the panel beside it is made of
asideColor / asideColorDarkany hexThe panel colour, in light and dark
asideImageUrl / asideImageUrlDarka URLThe panel image, in light and dark
asideHeadingtextOn the panel
asideTexttextUnder the heading

As a component prop the layout is spelled with a hyphen, like other React props: <SignIn layout="split-right" />. The prop wins over the field.

The behaviour

FieldValuesWhat it does
passwordResetMode'dedicated' 'inline'Whether the password reset gets its own screen

Variables

Variables are the design tokens every component is drawn with. Each one is a CSS custom property on the component’s root element. Changing one repaints every part that uses it, including hover, focus and disabled states that an inline style can’t reach.

Start with variables. Use elements only for what they can’t express.

appearance={{
  variables: {
    colorPrimary: '#0f766e',
    colorText: '#0f172a',
    colorTextSecondary: '#64748b',
    colorBorder: '#e2e8f0',
    fontFamily: 'inherit',
    fontSize: '14px',
    borderRadius: '6px',
  },
}}
Live preview
Northwind

Sign in

Secured by ZevAuth
VariableDefault (light / dark)Paints
colorPrimaryyour console accentPrimary buttons, focus rings, the progress bar, avatars, the split panel
colorTextOnPrimaryworked out from colorPrimaryText and icons on primary buttons and avatars
colorBackground#ffffff / #18181bThe card and menus
colorText#18181b / #fafafaHeadings, labels, menu items
colorTextSecondary#71717a / #a1a1aaSubtitles, hints, dividers, link buttons
colorBorder#e4e4e7 / #333338Fields, the card, dividers, secondary buttons
colorInputBackground#ffffff / #0f0f11Text fields
colorInputTextsame as colorTextWhat people type
colorInputBordersame as colorBorderText field outlines. Focus and error states still repaint them
colorDanger#b91c1c / #f87171Errors, invalid fields, field messages
fontFamilyyour console fontAny CSS font-family, e.g. 'inherit'
fontSize13.5pxField and button text. Every other size scales from it
borderRadiusyour console radius (8px for medium)Fields and buttons. Cards use 1.5× and menus 1.25×
cardShadownoneThe card’s box-shadow
cardWidth380px (460px on profile screens)The card’s width. It still never grows wider than its container

fontSize sets the base size. Headings, labels, hints and the badge are all multiples of it, so changing one value keeps the whole component in proportion.

colorTextOnPrimary is chosen for legibility when you leave it out: near black on a light primary, white on a dark one. Set it yourself if your primary isn’t a six-digit hex value, for example oklch(…) or var(--brand).

Light and dark

Any colour variable can be one value or a { light, dark } pair.

variables: {
  colorPrimary: '#5b3df5',                                   // both schemes
  colorBackground: { light: '#ffffff', dark: '#0b0b10' },     // one each
  colorText: { light: '#111111', dark: '#f4f4f5' },
}

A single value applies in both schemes. That suits an accent, but rarely a surface: a white card inside a dark page is the clash colorScheme: 'system' exists to prevent. If you set surface or text colours, either give pairs or force one scheme with colorScheme.

Using your own CSS variables

Values go straight into CSS, so they can refer to your design system’s variables. The components then follow your theme switch with no extra code:

variables: {
  colorPrimary: 'var(--brand-600)',
  colorTextOnPrimary: 'white',
  colorBackground: 'var(--surface)',
  colorText: 'var(--text)',
  colorBorder: 'var(--border)',
  fontFamily: 'var(--font-sans)',
  borderRadius: 'var(--radius)',
}

colorTextOnPrimary is set here because the component can’t work out legibility from a var().

Elements

elements styles one part of a component. Each key takes a class name or a style object:

appearance={{
  elements: {
    label: 'auth-label',                 // a class name
    buttonPrimary: { fontWeight: 600 },  // a style object
    zevIdButton: { fontWeight: 600 },
    divider: { textTransform: 'uppercase', letterSpacing: '0.08em' },
  },
}}

Elements are for details like these, the ones a token can’t express. Colour, font, size and radius belong in variables, where one value repaints every part consistently.

Live preview
Northwind

Sign in

or
or
Secured by ZevAuth

A style object is applied inline, so it always beats our stylesheet. It can’t express :hover, :focus or a media query.

A class name can express all of those, but it has to win against our stylesheet. See Making class names win.

Every element

KeyThe partClass
rootThe outer wrapper of every componentzv-root
cardThe box around a form or profilezv-card
identityYour logo and name, above the formzv-identity
logoYour logo imagezv-logo
appNameYour name, under the logozv-appname
titleThe headingzv-title
subtitleThe line under the headingzv-subtitle
fieldsA group of fields, or a formzv-fields
fieldOne label, input and hint togetherzv-field
labelA field labelzv-label
inputA text fieldzv-input
hintHelp text under a fieldzv-hint
fieldErrorAn error under one fieldzv-fielderror
buttonEvery buttonzv-button
buttonPrimaryThe main action: Continue, Create account, Savezv-button[data-variant='primary']
buttonSecondaryAlternatives: email me a link, send a code, Removezv-button[data-variant='secondary']
buttonLinkText buttons: Forgot your password?, Backzv-button[data-variant='ghost']
zevIdButtonContinue with ZevID, in <SignIn> and <SignInWithZevId>
moreToggle“More ways to sign in” and other expanderszv-more
dividerThe “or” between methodszv-divider
sectionDividerThe rule between profile sectionszv-section-divider
alertAn error message for the whole formzv-alert
noticeAn informational messagezv-notice
footer“Don’t have an account? Sign up”zv-footer
poweredBy“Secured by ZevAuth”zv-poweredby
testModeBadgeThe test mode badgezv-testmode
spinnerA loading spinnerzv-spinner
splitLayoutA split screen’s gridzv-split
formPaneThe half of a split screen holding the formzv-formpane
asideThe other halfzv-aside
asideHeadingThe panel headingzv-aside-heading
asideTextThe panel textzv-aside-text
menuTriggerThe button that opens <UserButton> or <OrganizationSwitcher>zv-trigger
menuThe menu that openszv-menu
menuHeaderThe signed-in person at the top of the menuzv-menu-header
menuItemOne item in the menuzv-menu-item
menuLabelA small heading inside the menuzv-menu-label
avatarA picture, or the initials standing in for onezv-avatar
memberListThe members in <OrganizationProfile>zv-member-list
memberRowOne memberzv-member
imageFieldThe picture control in the profileszv-image-field
imagePreviewThe picture itselfzv-image-preview
progressThe upload progress barzv-progress
buttonDangerLeave, delete, sign out of other deviceszv-button[data-variant='danger']
navigationThe section list in a sidebar profilezv-nav
navigationItemOne section in itzv-nav-item
panelThe content beside the navigationzv-panel
sectionTitleA heading inside a profile: General, Active deviceszv-section-title
badgeA small label, such as “This device”zv-badge
sessionListThe active devices in <UserProfile showSessions>zv-session-list
sessionRowOne devicezv-session
listThe choices in <OrganizationList>zv-list
listItemOne choicezv-list-item
modalA dialog opened from a menuzv-modal
modalBackdropThe dimmed page behind itzv-modal-backdrop
userAvatarThe picture in <UserAvatar> only (adds to avatar)

Keys add to each other from broad to narrow. The primary button gets button, then buttonPrimary. The ZevID button gets button, then buttonSecondary, then zevIdButton. Where two style objects set the same property, the narrower key wins.

<UserButton> and <OrganizationSwitcher> share the menu keys. To style one without the other, pass appearance to that component instead of the provider:

<UserButton appearance={{ elements: { avatar: 'ring-2 ring-white' } }} />

Making class names win

Our stylesheet is written so that ordinary rules on your page can’t reach into the components by accident. For example, a global h1 { color: white } doesn’t turn our heading white. The same strength means a plain utility class in elements can lose to our rule for the same property.

There are three ways to make your classes win. They are listed from most to least recommended.

1. Put our stylesheet in a cascade layer. Unlayered CSS beats layered CSS whatever its specificity. With cssLayerName, our rules sit in a layer that you place before your own:

<ZevAuthProvider publishableKey="pk_live_..." appearance={{ cssLayerName: 'zevauth' }}>

Then declare the order once in your CSS. For Tailwind v4, whose utilities live in a layer of their own:

@layer theme, base, zevauth, components, utilities;
@import 'tailwindcss';

Now elements: { buttonPrimary: 'bg-indigo-600 hover:bg-indigo-500' } wins with no !important. Set cssLayerName on the provider. The stylesheet is shared by every component on the page, so it is read once, when the first component renders.

2. Use !important. Tailwind’s ! prefix does it per class, and it works in any setup, including Tailwind v3:

elements: { buttonPrimary: '!bg-indigo-600 hover:!bg-indigo-500' }

3. Use a style object for anything that doesn’t need a state or a breakpoint. Inline styles always win.

Styling from a stylesheet

Every class in the table above is part of the public API. It won’t be renamed in a minor release. You can style the components from your own CSS without touching appearance at all:

.zv-root .zv-card { border-width: 2px; }
.zv-root .zv-button[data-variant='primary']:hover { filter: brightness(1.1); }

Prefix your selectors with .zv-root so they match the strength of ours. The state is exposed as attributes, so you can target it without adding classes:

AttributeOnValues
data-themezv-rootlight dark: the scheme being painted
data-variantzv-buttonprimary secondary ghost danger
data-chromezv-cardcard flat
data-layoutzv-cardsidebar on sidebar profiles
data-sizezv-cardwide on the profile screens
data-formzv-splitleft right: which side the form is on
data-alignzv-formpanecenter top
aria-invalidzv-inputtrue when the field has an error
aria-expandedzv-more, zv-triggertrue while open
disabledbuttons and inputswhile a request is in flight

One theme, shared

Appearance is exported, so a theme can live in its own file and be type-checked:

// auth-theme.ts
import type { Appearance } from '@zevauth/react';

export const authTheme: Appearance = {
  theme: 'soft',
  cssLayerName: 'zevauth',
  variables: {
    colorPrimary: 'var(--brand-600)',
    colorTextOnPrimary: 'white',
    fontFamily: 'inherit',
    borderRadius: '10px',
  },
  elements: {
    buttonPrimary: 'font-semibold hover:bg-[var(--brand-700)]',
    input: 'focus:ring-2 focus:ring-[var(--brand-200)]',
  },
};
<ZevAuthProvider publishableKey="pk_live_..." appearance={authTheme}>

AppearanceVariables, AppearanceElements, AppearanceElementKey and ThemedColor are exported too, for building a theme up from parts.

Recipes

Blend into a page you already designed

Remove our chrome and take your page’s font and colours. What’s left is the fields and buttons:

<SignIn
  appearance={{
    cardStyle: 'flat',
    showIdentity: false,
    variables: { fontFamily: 'inherit', colorText: 'inherit' },
  }}
/>

Larger, for a touch-first product

Raise the base size and everything follows it: headings, labels, hints and the badge.

appearance={{ variables: { fontSize: '16px', cardWidth: '420px' } }}

A dark brand, only in dark mode

appearance={{
  variables: {
    colorPrimary: { light: '#4f46e5', dark: '#a5b4fc' },
    colorBackground: { light: '#ffffff', dark: '#0c0a1d' },
    colorBorder: { light: '#e5e7eb', dark: '#27224a' },
  },
}}

Split screens and your own panel

The panel beside a split form has its own dark variants, because a colour or photo chosen for a light page is often wrong on a dark one:

appearance={{
  asideStyle: 'gradient',
  asideColor: '#5b3df5',       // light mode
  asideColorDark: '#1a1440',   // dark mode
}}

aside takes any JSX and replaces the console’s panel. useZevTheme() tells your panel which scheme is painting, resolved the same way the components resolve it:

import { SignIn, useZevTheme } from '@zevauth/react';

function Panel() {
  const isDark = useZevTheme();
  return <img src={isDark ? '/hero-dark.jpg' : '/hero-light.jpg'} alt="" />;
}

<SignIn layout="split-right" aside={<Panel />} appearance={{ elements: { aside: 'p-0' } }} />

Server rendering

The components add their stylesheet to the page when they first render. A server-rendered page needs it in the HTML instead, or the form flashes unstyled until hydration. Render it once in your document head. With cssLayerName, use getComponentStyles so the server sends the same layered CSS:

// Next.js: '@zevauth/nextjs/server'. Any other React app: '@zevauth/react/styles'.
import { componentStyleId, getComponentStyles } from '@zevauth/nextjs/server';

<style
  id={componentStyleId}
  dangerouslySetInnerHTML={{ __html: getComponentStyles({ cssLayerName: 'zevauth' }) }}
/>

componentStyles is the same CSS without a layer.

Beyond appearance

When you need different markup, not just a different look, build the screen yourself. The hooks and the client expose everything the components use: useAuth, useUser, client.signIn and client.signUp in the JavaScript SDK. You can also keep our pieces inside your own layout: <SignInWithZevId> is the SSO button alone, and <ImageField> is the profile picture control alone.

One thing you cannot set

showPoweredBy is not part of appearance. Whether “Secured by ZevAuth” appears is decided on the server from your plan. Any attempt to set it in code is dropped, including from plain JavaScript where no types stop it. Hiding the poweredBy element with CSS breaches the terms of the plans that include it.

Removing the badge is a paid feature. Once your plan includes it, turn it off under Customisation → Badge in the console. Development environments always show it, so you never design against a screen that production won’t give you.

Updated at, Tuesday, November 24, 2026