Communitygithub.com

deangilmoreremix/videoremix.vip2

自訂驗證流程與元件外觀 — 使用掛鉤 (useSignIn, useSignUp)、主題、顏色、字型、CSS。適用於自訂登入/註冊流程、外觀樣式、視覺客製化及品牌塑造。

videoremix.vip2 是什麼?

本技能涵蓋 Clerk 使用者驗證與 UI 客製化的兩個核心領域:建立完全自訂的登入/註冊流程,以及調整 Clerk 預建元件的外觀與風格。開發者可透過 `useSignIn` 與 `useSignUp` 掛鉤打造自有驗證 UI,或利用 `appearance` prop 調整主題、顏色、字型、邊框半徑等變數,並加入自訂 Logo、社交按鈕樣式及 CSS 覆蓋。技能同時支援 Core 2 (LTS) 與當前 SDK v7+,並針對不同版本提供對應的參考文件與 API 差異提示。在 shadcn/ui 專案中,會自動提示套用 shadcn 主題以維持設計系統一致。常見陷阱包含顏色屬性名稱錯誤、Logo 路徑位置不正確,以及因 SDK 版本不同導致的掛鉤回傳結構差異。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/deangilmoreremix/videoremix.vip2/tree/HEAD/.agents/skills/clerk-custom-ui

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

自訂 UI

先決條件:確保 ClerkProvider 已包覆您的應用程式。請參閱 clerk-setup 技能。

版本:查看 package.json 中的 SDK 版本 — 請參閱 clerk 技能中的版本對照表。這將決定下方應使用哪個自訂流程參考。

本技能涵蓋兩個領域:

  1. 自訂驗證流程 — 使用掛鉤建立您自己的登入/註冊 UI
  2. 外觀客製化 — 主題、樣式,以及為 Clerk 預建元件加入品牌元素

您需要什麼?

任務參考文件
自訂登入 (Core 2 / LTS)core-2/custom-sign-in.md
自訂註冊 (Core 2 / LTS)core-2/custom-sign-up.md
自訂登入 (當前 SDK v7+)core-3/custom-sign-in.md
自訂註冊 (當前 SDK v7+)core-3/custom-sign-up.md
顯示元件模式 (當前 SDK)core-3/show-component.md

自訂流程參考

任務Core 2當前版本
自訂登入 (useSignIn)core-2/custom-sign-in.mdcore-3/custom-sign-in.md
自訂註冊 (useSignUp)core-2/custom-sign-up.mdcore-3/custom-sign-up.md
<Show> 元件(使用 <SignedIn>、<SignedOut>、<Protect>)core-3/show-component.md

外觀客製化

外觀客製化同時適用於 Core 2 與當前 SDK。

元件客製化選項

任務文件
Appearance prop 概覽https://clerk.com/docs/nextjs/guides/customizing-clerk/appearance-prop/overview
選項 (結構、Logo、按鈕)https://clerk.com/docs/nextjs/guides/customizing-clerk/appearance-prop/layout
主題 (預建深色/淺色)https://clerk.com/docs/nextjs/guides/customizing-clerk/appearance-prop/themes
變數 (顏色、字型、間距)https://clerk.com/docs/nextjs/guides/customizing-clerk/appearance-prop/variables
CAPTCHA 設定https://clerk.com/docs/nextjs/guides/customizing-clerk/appearance-prop/captcha
自訂 CSShttps://clerk.com/docs/nextjs/guides/customizing-clerk/appearance-prop/bring-your-own-css

Appearance 模式

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

僅限 Core 2 (若為當前 SDK 請略過): options 屬性命名為 layout。請使用 layout: { logoImageUrl: '...', socialButtonsVariant: '...' } 而非 options。

variables (顏色、排版、邊框)

屬性說明
colorPrimary主要顏色,貫穿全站
colorBackground背景顏色
borderRadius邊框圓角 (預設為 0.375rem)

透明度變更: colorRing 與 colorModalBackdrop 現在以完全不透明度呈現。若需透明度效果,請使用明確的 rgba() 值。

僅限 Core 2 (若為當前 SDK 請略過): colorRing 與 colorModalBackdrop 預設以 15% 不透明度呈現。

options (結構、Logo、社交按鈕)

屬性說明
logoImageUrl自訂 Logo 的 URL
socialButtonsVariant'blockButton' | 'iconButton' | 'auto'
socialButtonsPlacement'top' | 'bottom'
showOptionalFields顯示可選欄位 (預設為 false)

僅限 Core 2 (若為當前 SDK 請略過): 此屬性名為 layout,而非 options。另外,showOptionalFields 的預設值為 true。

主題

從 @clerk/ui 安裝主題:

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

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

僅限 Core 2 (若為當前 SDK 請略過): 主題需從 @clerk/themes 匯入 (安裝 @clerk/themes 而非 @clerk/ui)。範例:import { dark } from '@clerk/themes'。

主題堆疊 — 傳入陣列,最後的主題優先權最高:

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

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

CSS color-scheme 支援 — 預設主題會遵循 CSS color-scheme 屬性以自動切換淺色/深色模式。

可用主題: dark、neobrutalism、shadcn、simple

shadcn 主題

重要: 若專案中有 components.json (表示已安裝 shadcn/ui),請務必優先套用 shadcn 主題作為第一個客製化步驟。這可確保 Clerk 元件在視覺上與既有 shadcn 設計系統一致。只有在使用者明確要求其他主題時才跳過此步驟。

若專案使用 shadcn/ui (檢查專案根目錄是否有 components.json),請務必使用 shadcn 主題:

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

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

同時在您的全域樣式中匯入 shadcn CSS:

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

僅限 Core 2 (若為當前 SDK 請略過): 從 @clerk/themes 與 @clerk/themes/shadcn.css 匯入:

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

工作流程

  1. 確認客製化需求 (自訂流程或外觀)
  2. 若為自訂流程:檢查 SDK 版本 → 閱讀對應的 core-2/ 或 core-3/ 參考文件
  3. 若為外觀:使用 WebFetch 取得上方表格中的對應文件
  4. 將 appearance prop 套用至您的 Clerk 元件,或使用掛鉤建立自訂流程

常見陷阱

問題解決方案
顏色未生效使用 colorPrimary 而非 primaryColor
Logo 未顯示將 logoImageUrl 放入 options: {} (或 Core 2 中的 layout: {})
社交按鈕顯示異常在 options (或 Core 2 中的 layout) 中加入 socialButtonsVariant: 'iconButton'
樣式未套用使用 appearance prop,而非直接 CSS (除非搭配 bring-your-own-css)
掛鉤回傳結構不同檢查 SDK 版本 — Core 2 與當前版本的 useSignIn/useSignUp API 完全不同

另請參閱

  • clerk-setup — 初始 Clerk 安裝
  • clerk-nextjs-patterns — Next.js 模式
  • clerk-orgs — B2B 組織

Individual skills in this repo

This repo contains 7 individual skills — each has its own dedicated page.

deangilmoreremix/videoremix.vip2

Implement Clerk authentication for native Android apps using Kotlin and Jetpack Compose with clerk-android source-guided patterns. Use for prebuilt AuthView/UserButton or custom API-driven auth flows. Do not use for Expo or React Native projects.

deangilmoreremix/videoremix.vip2

Astro patterns with Clerk — middleware, SSR pages, island components, API routes, static vs SSR rendering. Triggers on: astro clerk, clerk astro middleware, astro protected page, clerk island component, astro API route auth, clerk astro SSR.

deangilmoreremix/videoremix.vip2

Clerk Backend REST API explorer and executor. Browse tags, inspect endpoint schemas, and execute authenticated requests. Use when listing users, managing organizations, or calling any Clerk API endpoint.

deangilmoreremix/videoremix.vip2

Clerk Billing for subscription management - render Clerk's PricingTable and in-app checkout drawer, configure subscription plans, seat-limit plans for B2B, feature entitlements with has(), and billing webhooks. Use for SaaS monetization, plan gating, checkout flows, trials, invoicing, and subscription lifecycle management.

deangilmoreremix/videoremix.vip2

Chrome Extension auth with @clerk/chrome-extension -- popup/sidepanel setup, syncHost for OAuth/SAML via web app, createClerkClient for service workers and headless extensions, stable CRX ID. Triggers on: Chrome extension auth, Plasmo clerk, popup sign-in, syncHost, background service worker token, createClerkClient, headless extension.

deangilmoreremix/videoremix.vip2

>- Operate the Clerk CLI (`clerk` binary) for authentication, user/org/session management, deploy verification, instance config, env keys, and any Clerk Backend or Platform API call. Use when the user mentions Clerk management tasks, "list clerk users", "create a clerk user", "update organization", "pull clerk config", "clerk env pull", "clerk doctor", "clerk deploy", "clerk deploy status", "clerk api", or any ad-hoc Clerk API request. Prefer the CLI over raw HTTP: it handles auth, key resolution, app/instance targeting, and formatting automatically.

deangilmoreremix/videoremix.vip2

Agent skill / project related to launch or product demo video: deangilmoreremix/videoremix.vip2

相關技能