clerk-custom-auth-ui-nextjs
1
总安装量
1
周安装量
#47654
全站排名
安装命令
npx skills add https://github.com/nicolas-angelo/custom-skills --skill clerk-custom-auth-ui-nextjs
Agent 安装分布
amp
1
opencode
1
kimi-cli
1
github-copilot
1
claude-code
1
Skill 文档
Sign-In-Or-Up with Intercepting Route Modals
One <SignIn withSignUp /> component handles both sign-in and sign-up. No dedicated sign-up page required.
References
| Reference | What it covers |
|---|---|
references/sign-in-or-up-flow.md |
CRITICAL – withSignUp prop, SignInCard component, env vars |
references/auth-modal.md |
HIGH – Intercepting route modal pattern, parallel routes, fallback page |
Mental Model
User clicks "Sign In" link
âââ Soft navigation â intercepting route â modal overlay
âââ Hard navigation (direct URL) â dedicated (auth) page
Both render the same <SignInCard /> component. The modal wraps it in a <Dialog>. The dedicated page centers it on screen. One component, two contexts.
Key Decisions
withSignUpon<SignIn>eliminates the need for a separate/sign-uproute entirely- Intercepting routes
(.)show sign-in as a modal on soft nav while preserving the background page @modalparallel route in root layout renders alongsidechildrenâ both are always present<Show when="signed-out">gate prevents the modal from rendering when already authenticated
File Tree
app/
âââ layout.tsx # Accepts { children, modal } â renders both
âââ @modal/
â âââ default.tsx # Returns null (required for parallel routes)
â âââ (.)sign-in/
â âââ [[...sign-in]]/
â âââ page.tsx # Wraps SignInCard in <Show> + <Modal>
â âââ modal.tsx # Dialog component with router.back() on close
âââ (auth)/
âââ layout.tsx # Centered container layout
âââ sign-in/
âââ [[...sign-in]]/
âââ page.tsx # Renders <SignInCard /> directly
components/
âââ sign-in-card.tsx # Single source of truth for <SignIn> config