Skip to main content

Theming & Customization

Kryptos Connect exposes --kc-* CSS custom properties that control every visual aspect of the connect UI. Pass them via the cssVars option in KryptosConnect.init.

KryptosConnect.init({
clientId: "your-client-id",
appName: "My App",
cssVars: {
"--kc-primary": "#6366f1",
"--kc-primary-hover": "#4f46e5",
"--kc-primary-text": "#ffffff",
},
});

Brand variables

The most commonly customized variables.

VariableLightDarkDescription
--kc-primary#00c693#00c693Primary accent — button fill, links, icons
--kc-primary-hover#007558#42ffd0Hover / pressed state
--kc-primary-light#42ffd0#42ffd0Light tint for selected states
--kc-primary-text#ffffff#ffffffText on primary-colored fills
--kc-primary-rgb0, 198, 1470, 198, 147RGB triplet for rgba() tints

Background variables

VariableLightDarkDescription
--kc-bg-primary#ffffff#0a0a0aModal and panel background
--kc-bg-secondary#f9fafb#1a1a1dSubtle section backgrounds
--kc-bg-tertiary#e5e7eb#030405Deepest background layer
--kc-bg-hover#f3f4f6#2e2e2eRow / item hover background

Text variables

VariableLightDarkDescription
--kc-text-primary#1f2937#f6f6f8Main body text
--kc-text-secondary#4b5563#e5e7ebSubdued / helper text
--kc-text-tertiary#9ca3af#9ca3afPlaceholder and disabled text
--kc-text-inverse#ffffff#1f2937Text on inverted fills

Border variables

VariableLightDarkDescription
--kc-border#e5e7eb#334155Default dividers and outlines
--kc-border-focus#00c693#42ffd0Ring color on focused inputs

Secondary variables

VariableLightDarkDescription
--kc-secondary#4b5563#4b5563Secondary button fill
--kc-secondary-hover#1f2937#9ca3afSecondary button hover fill

Semantic / status variables

These control success, error, and warning states inside the connect UI.

VariableDefaultDescription
--kc-success#22c55eSuccess indicator
--kc-success-light#86efacSuccess background tint
--kc-success-dark#15803dSuccess dark variant
--kc-error#ef4444Error / destructive
--kc-error-light#fca5a5Error background tint
--kc-error-dark#b91c1cError dark variant
--kc-warning#f59e0bWarning
--kc-warning-light#fcd34dWarning background tint
--kc-warning-dark#d97706Warning dark variant

Shadow variables

VariableLightDark
--kc-shadow-sm0 1px 2px 0 rgba(0,0,0,0.05)0 1px 2px 0 rgba(0,0,0,0.3)
--kc-shadow-md0 4px 6px -1px rgba(0,0,0,0.1)0 4px 6px -1px rgba(0,0,0,0.3)
--kc-shadow-lg0 10px 15px -3px rgba(0,0,0,0.1)0 10px 15px -3px rgba(0,0,0,0.3)

Full example

KryptosConnect.init({
clientId: "your-client-id",
appName: "My App",
theme: "light",
cssVars: {
// Brand
"--kc-primary": "#6366f1",
"--kc-primary-hover": "#4f46e5",
"--kc-primary-light": "#e0e7ff",
"--kc-primary-text": "#ffffff",
"--kc-primary-rgb": "99, 102, 241",

// Backgrounds
"--kc-bg-primary": "#ffffff",
"--kc-bg-secondary": "#f8fafc",
"--kc-bg-hover": "#f1f5f9",

// Text
"--kc-text-primary": "#0f172a",
"--kc-text-secondary": "#64748b",

// Borders
"--kc-border": "#e2e8f0",
"--kc-border-focus": "#6366f1",
},
});

Per-button style override (web)

For one-off button styling on web, use the style or className prop — this does not affect the connect UI, only the trigger button:

<KryptosConnectButton
generateLinkToken={generateLinkToken}
onConnectSuccess={handleSuccess}
onConnectError={(err) => console.error(err)}
style={{
background: "linear-gradient(to right, #6366f1, #8b5cf6)",
borderRadius: "10px",
}}
>
Connect Wallet
</KryptosConnectButton>

Per-button style override (mobile)

Use the style prop on KryptosConnectButton. Setting backgroundColor here takes precedence over --kc-primary for that button only:

<KryptosConnectButton
generateLinkToken={generateLinkToken}
onConnectSuccess={handleSuccess}
onConnectError={(err) => console.error(err)}
buttonLabel="Connect Coinbase"
style={{ backgroundColor: "#0052FF", borderRadius: 10 }}
/>