My App
LoopKitFrontend

Theming

Customize LoopKit component styles with CSS custom properties

Setup

Import the default stylesheet:

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

CSS Custom Properties

Override these custom properties in your CSS to customize the look:

:root {
    --loopkit-primary: #8b5cf6;
    --loopkit-grade-again: #dc2626;
    --loopkit-grade-hard: #ea580c;
    --loopkit-grade-good: #16a34a;
    --loopkit-grade-easy: #2563eb;
    --loopkit-bg: #ffffff;
    --loopkit-text: #111827;
    --loopkit-border: #d1d5db;
    --loopkit-radius: 12px;
    --loopkit-font: 'Inter', sans-serif;
}
PropertyDefaultDescription
--loopkit-primary#8b5cf6Primary accent color (purple)
--loopkit-grade-again#dc2626"Again" button color (red)
--loopkit-grade-hard#ea580c"Hard" button color (orange)
--loopkit-grade-good#16a34a"Good" button color (green)
--loopkit-grade-easy#2563eb"Easy" button color (blue)
--loopkit-bg#ffffffBackground color
--loopkit-text#111827Text color
--loopkit-border#d1d5dbBorder color
--loopkit-radius12pxBorder radius
--loopkit-font'Inter', sans-serifFont family

Dark Mode

Override the properties in a dark mode context:

.dark, [data-theme="dark"] {
    --loopkit-bg: #1f2937;
    --loopkit-text: #f9fafb;
    --loopkit-border: #4b5563;
    --loopkit-primary: #a78bfa;
}

Custom Styling Example

/* Rounded cards with shadow */
:root {
    --loopkit-radius: 16px;
}

.loopkit-card {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

/* Compact grade buttons */
.loopkit-grade-buttons {
    gap: 0.5rem;
}

Headless Alternative

If you prefer full control, skip the stylesheet and build your own components using the hooks. Every component in LoopKit has a corresponding hook that exposes all state and actions.

On this page