Clerk Custom UI

VerifiedSafe

Custom authentication flows and component appearance using hooks (useSignIn, useSignUp), themes, colors, fonts, and CSS. Use for custom sign-in/sign-up flows, appearance styling, and branding.

Sby Skills Guide Bot
DevelopmentIntermediate
7/26/2026
Claude CodeCursorCodex
#clerk#authentication#ui-customization#react-hooks#theming

Recommended for

Automated summary

Reference guide for building custom Clerk sign-in and sign-up flows with the useSignIn/useSignUp hooks and for restyling Clerk's prebuilt components via themes, variables, and options.

Strengths

  • Cleanly separates Core 2 (LTS) and Core 3 (SDK v7+) references for custom flows
  • Calls out version-specific gotchas such as `layout` being renamed to `options` and the opacity change for `colorRing`/`colorModalBackdrop`
  • Gives a concrete `appearance` prop example with variables and options plus theme installation through `@clerk/ui`
  • Covers both bespoke authentication flows and visual branding of existing components

Limitations

  • The file is truncated: the theme example cuts off mid-import of `dark`
  • The appearance section defers to external Clerk docs through WebFetch instead of inlining the content
  • Assumes `ClerkProvider` is already set up and does not address session security or backend concerns
When to use it

Use it when replacing Clerk's default screens with a custom UI built on useSignIn/useSignUp, or when applying your own branding to Clerk components.

When not to use it

Skip it if you are not using Clerk, only need the initial setup (see clerk-setup), or need the full API details without network access for WebFetch.

Security analysis

Safe
Quality score86/100

The skill only uses WebFetch to retrieve Clerk documentation and provides UI/authentication guidance. It contains no destructive commands, credential/token exfiltration, obfuscated payloads, or attempts to disable safety controls.

No concerns found

How this analysis is made

Examples

Custom sign-in form
Build a custom sign-in form using Clerk's useSignIn hook for the current SDK v7+, and wire up error handling for wrong passwords.
Brand the SignIn component
Customize Clerk's SignIn component with our brand color #0000ff, a rounded 0.5rem border radius, our logo at /logo.png, and icon-style social buttons.
Apply a dark theme
Install @clerk/ui and apply the dark theme to ClerkProvider in my Next.js app, then override the primary color.

name: clerk-custom-ui description: Custom authentication flows and component appearance - hooks (useSignIn, useSignUp), themes, colors, fonts, CSS. Use for custom sign-in/sign-up flows, appearance styling, visual customization, branding. allowed-tools: WebFetch license: MIT metadata: author: clerk version: 2.3.0

Custom UI

Prerequisite: Ensure ClerkProvider wraps your app. See clerk-setup skill.

Version: Check package.json for the SDK version — see clerk skill for the version table. This determines which custom flow references to use below.

This skill covers two areas:

  1. Custom authentication flows — build your own sign-in/sign-up UI with hooks
  2. Appearance customization — theme, style, and brand Clerk's pre-built components

What Do You Need?

| Task | Reference | |------|-----------| | Custom sign-in (Core 2 / LTS) | core-2/custom-sign-in.md | | Custom sign-up (Core 2 / LTS) | core-2/custom-sign-up.md | | Custom sign-in (Current SDK v7+) | core-3/custom-sign-in.md | | Custom sign-up (Current SDK v7+) | core-3/custom-sign-up.md | | Show component pattern (Current SDK) | core-3/show-component.md |

Custom Flow References

| Task | Core 2 | Current | |------|--------|---------| | Custom sign-in (useSignIn) | core-2/custom-sign-in.md | core-3/custom-sign-in.md | | Custom sign-up (useSignUp) | core-2/custom-sign-up.md | core-3/custom-sign-up.md | | <Show> component | (use <SignedIn>, <SignedOut>, <Protect>) | core-3/show-component.md |


Appearance Customization

Appearance customization applies to both Core 2 and the current SDK.

Component Customization Options

| Task | Documentation | |------|---------------| | Appearance prop overview | https://clerk.com/docs/nextjs/guides/customizing-clerk/appearance-prop/overview | | Options (structure, logo, buttons) | https://clerk.com/docs/nextjs/guides/customizing-clerk/appearance-prop/layout | | Themes (pre-built dark/light) | https://clerk.com/docs/nextjs/guides/customizing-clerk/appearance-prop/themes | | Variables (colors, fonts, spacing) | https://clerk.com/docs/nextjs/guides/customizing-clerk/appearance-prop/variables | | CAPTCHA configuration | https://clerk.com/docs/nextjs/guides/customizing-clerk/appearance-prop/captcha | | Bring your own CSS | https://clerk.com/docs/nextjs/guides/customizing-clerk/appearance-prop/bring-your-own-css |

Appearance Pattern

<SignIn
  appearance={{
    variables: {
      colorPrimary: '#0000ff',
      borderRadius: '0.5rem',
    },
    options: {
      logoImageUrl: '/logo.png',
      socialButtonsVariant: 'iconButton',
    },
  }}
/>

Core 2 ONLY (skip if current SDK): The options property was named layout. Use layout: { logoImageUrl: '...', socialButtonsVariant: '...' } instead of options.

variables (colors, typography, borders)

| Property | Description | |----------|-------------| | colorPrimary | Primary color throughout | | colorBackground | Background color | | borderRadius | Border radius (default: 0.375rem) |

Opacity change: colorRing and colorModalBackdrop now render at full opacity. Use explicit rgba() values if you need transparency.

Core 2 ONLY (skip if current SDK): colorRing and colorModalBackdrop rendered at 15% opacity by default.

options (structure, logo, social buttons)

| Property | Description | |----------|-------------| | logoImageUrl | URL to custom logo | | socialButtonsVariant | 'blockButton' | 'iconButton' | 'auto' | | socialButtonsPlacement | 'top' | 'bottom' | | showOptionalFields | Show optional fields (default: false) |

Core 2 ONLY (skip if current SDK): This property is called layout, not options. Also, showOptionalFields defaulted to true.

Themes

Install themes from @clerk/ui:

npm install @clerk/ui
import { dark } from '@clerk/ui/themes'

<ClerkProvider appearance={{ theme: dark }} />

Core 2 ONLY (skip if current SDK): Themes are imported from @clerk/themes (install @clerk/themes instead of @clerk/ui). Example: import { dark } from '@clerk/themes'.

Theme stacking — pass an array where the last theme takes precedence:

import { dark, neobrutalism } from '@clerk/ui/themes'

<ClerkProvider appearance={{ theme: [dark, neobrutalism] }} />

CSS color-scheme support — the default theme respects the CSS color-scheme property for automatic light/dark mode toggling.

Available themes: dark, neobrutalism, shadcn, simple

shadcn Theme

IMPORTANT: If the project has components.json (shadcn/ui installed), ALWAYS apply the shadcn theme as the FIRST customization step. This ensures Clerk components visually match the existing shadcn design system. Skip this only if the user explicitly requests a different theme.

If the project uses shadcn/ui (check for components.json in the project root), always use the shadcn theme:

import { shadcn } from '@clerk/ui/themes'

<ClerkProvider appearance={{ theme: shadcn }} />

Also import shadcn CSS in your global styles:

@import 'tailwindcss';
@import '@clerk/ui/themes/shadcn.css';

Core 2 ONLY (skip if current SDK): Import from @clerk/themes and @clerk/themes/shadcn.css:

import { shadcn } from '@clerk/themes'
@import '@clerk/themes/shadcn.css';

Workflow

  1. Identify customization needs (custom flow or appearance)
  2. For custom flows: check SDK version → read appropriate core-2/ or core-3/ reference
  3. For appearance: WebFetch the appropriate documentation from table above
  4. Apply appearance prop to your Clerk components or build custom flow with hooks

Common Pitfalls

| Issue | Solution | |-------|----------| | Colors not applying | Use colorPrimary not primaryColor | | Logo not showing | Put logoImageUrl inside options: {} (or layout: {} in Core 2) | | Social buttons wrong | Add socialButtonsVariant: 'iconButton' in options (or layout in Core 2) | | Styling not working | Use appearance prop, not direct CSS (unless with bring-your-own-css) | | Hook returns different shape | Check SDK version — Core 2 and current have completely different useSignIn/useSignUp APIs |

See Also

  • clerk-setup - Initial Clerk install
  • clerk-nextjs-patterns - Next.js patterns
  • clerk-orgs - B2B organizations

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/clerk-custom-ui-ms1aw4a5/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/clerk-custom-ui-ms1aw4a5' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/clerk-custom-ui-ms1aw4a5/download' --output '.skill-downloads/clerk-custom-ui-ms1aw4a5/SKILL.md.part' && mv '.skill-downloads/clerk-custom-ui-ms1aw4a5/SKILL.md.part' '.skill-downloads/clerk-custom-ui-ms1aw4a5/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Tools declared by the author (check availability in your agent): WebFetch

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/clerk-custom-ui-ms1aw4a5/SKILL.md' && test -s '.skill-downloads/clerk-custom-ui-ms1aw4a5/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/clerk-custom-ui' && cp -R '.skill-downloads/clerk-custom-ui-ms1aw4a5' '.claude/skills/clerk-custom-ui'

Cursor
test -f '.skill-downloads/clerk-custom-ui-ms1aw4a5/SKILL.md' && test -s '.skill-downloads/clerk-custom-ui-ms1aw4a5/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/clerk-custom-ui' && cp -R '.skill-downloads/clerk-custom-ui-ms1aw4a5' '.cursor/skills/clerk-custom-ui'

Codex
test -f '.skill-downloads/clerk-custom-ui-ms1aw4a5/SKILL.md' && test -s '.skill-downloads/clerk-custom-ui-ms1aw4a5/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/clerk-custom-ui' && cp -R '.skill-downloads/clerk-custom-ui-ms1aw4a5' '.agents/skills/clerk-custom-ui'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/clerk-custom-ui-ms1aw4a5'

openskills read 'clerk-custom-ui-ms1aw4a5'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/clerk-custom-ui-ms1aw4a5/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills