Choosing Components
When to use headless SDK components vs the styled UI library
Wocha offers two component layers that work together. Choose based on your needs:
Quick Decision
| Need | Use | Package |
|---|---|---|
| Fast start, no custom design | Styled components | @wocha/ui |
| Custom design, full control | Headless components | @wocha/react or @wocha/nextjs |
| Styled with customisation | Styled + appearance API | @wocha/ui with WochaThemeProvider |
Headless Components (@wocha/react)
The React SDK includes headless components that handle auth logic without any styling. They render nothing visible by default — you provide all the UI:
SignIn/SignUp— render props with auth state and handlersAuthenticated/Unauthenticated— conditional rendering wrappersProtect— permission-gated renderingOrgSwitcher— org selection logic
Use these when you want complete design control and already have a design system.
Styled Components (@wocha/ui)
The UI package provides ready-to-use, themed components built on top of the headless layer:
SignIn/SignUp— complete forms with social login, email/password, passkeysUserButton— avatar dropdown with profile, org switching, sign outOrgSwitcher— styled organisation selectorUserProfile/UserPortal— account management pagesAuthCard— branded container for auth flows
Theming
Customise via WochaThemeProvider:
Use the Theme Editor to preview and generate theme configuration.
Next.js Client Components
@wocha/nextjs/client exports the same headless components as @wocha/react,
plus Next.js-specific hooks. If you are using Next.js, import from @wocha/nextjs/client
rather than installing @wocha/react separately.
Combining Layers
You can mix headless and styled components in the same app: