Skip to main content

Theming

Customize the look and feel of AgentFish components.

Theme Configuration

Pass theme options to the provider:

<AgentFishProvider
config={{
app: { appId: '...' },
theme: {
mode: 'dark', // 'light' | 'dark'
colors: {
primary: '#0EA5E9',
primaryHover: '#0284C7',
background: '#0f0f1a',
surface: '#1a1a2e',
border: '#2d2d44',
text: '#ffffff',
textMuted: '#9ca3af',
},
radius: '12px',
fontFamily: 'Inter, sans-serif',
},
}}
>

Theme Options

OptionTypeDefaultDescription
mode'light' | 'dark''dark'Color mode
colors.primarystring#0EA5E9Primary brand color
colors.primaryHoverstring#0284C7Primary hover state
colors.backgroundstring#0f0f1aPage background
colors.surfacestring#1a1a2eCard/modal background
colors.borderstring#2d2d44Border color
colors.textstring#ffffffPrimary text
colors.textMutedstring#9ca3afSecondary text
radiusstring12pxBorder radius
fontFamilystringInter, sans-serifFont family

CSS Variables

For more control, override CSS variables directly:

@import '@agentfish/react/styles.css';

:root {
--af-primary: #0EA5E9;
--af-primary-hover: #0284C7;
--af-background: #0f0f1a;
--af-surface: #1a1a2e;
--af-border: #2d2d44;
--af-text: #ffffff;
--af-text-muted: #9ca3af;
--af-radius: 12px;
}

Available Variables

VariableDescription
--af-primaryPrimary brand color
--af-primary-hoverPrimary hover state
--af-backgroundPage background
--af-surfaceCard/modal background
--af-borderBorder color
--af-textPrimary text color
--af-text-mutedSecondary/muted text
--af-radiusBorder radius
--af-font-familyFont family

Light Mode

<AgentFishProvider
config={{
app: { appId: '...' },
theme: {
mode: 'light',
colors: {
primary: '#0EA5E9',
background: '#ffffff',
surface: '#f8fafc',
border: '#e2e8f0',
text: '#0f172a',
textMuted: '#64748b',
},
},
}}
>

Custom Styling

Components accept className for additional styling:

<SignIn 
className="my-custom-button"
providers={['email', 'wallet']}
/>
.my-custom-button {
/* Your custom styles */
}

Example: Brand Colors

Match your brand colors:

// Purple theme
<AgentFishProvider
config={{
app: { appId: '...' },
theme: {
mode: 'dark',
colors: {
primary: '#8B5CF6',
primaryHover: '#7C3AED',
},
},
}}
>

// Green theme
<AgentFishProvider
config={{
app: { appId: '...' },
theme: {
mode: 'dark',
colors: {
primary: '#10B981',
primaryHover: '#059669',
},
},
}}
>