Understanding the Theme System
UptimeKit’s theme system is designed to be simple yet powerful. Themes are pure rendering components that receive data and render the UI. All theming concerns (dark mode, CSS loading, data attributes) are handled automatically.Key Benefits
- Zero boilerplate: Theme files are pure rendering components
- No flash: Theme is set before first paint
- Simple architecture: Just 2 wrapper files handle all theme logic
- Auto CSS loading: Custom CSS loaded automatically from manifest
- Type safe: Proper TypeScript generics throughout
Theme Structure
Creating Your First Theme
Step 1: Create Theme Directory
Create a new directory underapp/themes/ with your theme name:
Step 2: Create Manifest
Createmanifest.ts with your theme metadata:
app/themes/my-theme/manifest.ts
Step 3: Create Main Page Component
Createpage.tsx for the main status page:
app/themes/my-theme/page.tsx
Step 4: Create Other Required Pages
Createincident-detail.tsx:
app/themes/my-theme/incident-detail.tsx
maintenance-detail.tsx:
app/themes/my-theme/maintenance-detail.tsx
updates.tsx:
app/themes/my-theme/updates.tsx
Step 5: Register Your Theme
Add your theme toapp/themes/index.ts:
app/themes/index.ts
Customizing with CSS
The most powerful way to customize your theme is by overriding CSS variables. This allows you to change colors, fonts, shadows, and more without modifying component code.Creating Custom CSS
Createpublic/themes/my-theme/style.css:
public/themes/my-theme/style.css
Available CSS Variables
Colors
Status Colors
Typography
Spacing & Effects
src/index.css for the complete list of available variables.
Data Contracts
All theme pages receive standardized data through props:ThemePageProps (Main Status Page)
ThemeIncidentDetailProps
ThemeMaintenanceDetailProps
ThemeUpdatesProps
app/themes/types.ts for complete type definitions.
Component Organization
Extract reusable UI elements into components:app/themes/my-theme/components/status-badge.tsx
Theme Architecture
How It Works
Themes are pure rendering components. All theme setup is handled by two files:-
ThemePageWrapper(server component):- Renders inline blocking script that sets
data-themeand.darkclass before first paint - Loads theme manifest automatically
- Renders
ThemeProviderfor client-side hydration - Used by all page dispatchers (app/page.tsx, app/[slug]/page.tsx, etc.)
- Renders inline blocking script that sets
-
ThemeProvider(client component):- Syncs theme changes when user switches themes
- Dynamically loads custom CSS from manifest
- Keeps everything in sync with next-themes
- ✅ Zero boilerplate - Theme files are pure rendering components
- ✅ No flash - Inline script sets theme before first paint
- ✅ Simple architecture - Just 2 files handle all theme logic
- ✅ Auto CSS loading - Manifest cssFile loaded automatically
- ✅ Type safe - Proper TypeScript generics throughout
Best Practices
1. Use CSS Variables
Override CSS variables instead of writing custom styles:2. Support Dark Mode
Always provide dark mode overrides ifsupportsDarkMode: true:
3. Extract Components
Keep theme files clean by extracting reusable components:4. Use Tailwind Classes
Leverage Tailwind utility classes that use CSS variables:5. Follow Type Contracts
Use the provided TypeScript types for props:Testing Your Theme
Local Development
- Set up a local UptimeKit instance following the installation guide
- Add your theme files to
app/themes/ - Register your theme in
app/themes/index.ts - Create a test status page and select your theme
- Test all pages: main, incident detail, maintenance detail, updates
Test Checklist
- Main status page renders correctly
- Incident detail page works
- Maintenance detail page works
- Updates page displays properly
- Dark mode toggles correctly (if supported)
- Custom CSS loads and applies
- All monitor statuses display correctly
- Responsive design works on mobile/tablet
- Logo and branding display properly
- Links and navigation work
Example Themes
Study the included example theme for reference:- default - Classic design with full uptime history and comprehensive monitoring display
Contributing Your Theme
Once your theme is ready:- Test thoroughly following the checklist above
- Create a pull request to the UptimeKit repository
- Include screenshots of your theme
- Document any special features or requirements
- Follow the project’s contribution guidelines
Need Help?
- Check existing themes in
app/themes/for examples - Review type definitions in
app/themes/types.ts - Ask questions via GitHub Issues
- Email support at [email protected]