Skip to content
MarkasUI
Type to search

    Guide

    MarkasUI

    Form

    Feedback

    Overlay

    Navigation

    Data

    Sections

    Animations

    Backgrounds

    Buttons

    Templates

    Pages

    Theming

    The MarkasUI color tokens and how to change the brand color.

    Every component color comes from the --markas-* CSS variables in markas.css. Components never use hex values or default Tailwind colors like bg-green-700, so changing the theme only means changing the variables.

    Changing the brand color

    Override the variables after importing markas.css:

    @import "./markas.css";
    
    :root {
      --markas-primary: #1d4ed8;
      --markas-primary-strong: #1e40af;
      --markas-primary-soft: #e0e7ff;
      --markas-primary-line: #a5b4fc;
    }
    
    .dark {
      --markas-primary: #818cf8;
      --markas-primary-strong: #a5b4fc;
      --markas-primary-soft: #1e1b4b;
      --markas-primary-line: #3730a3;
    }

    Keep every text and background pair at WCAG AA contrast (4.5:1).

    Tokens

    TokenTailwind classUsed for
    canvasbg-canvasPage background
    surfacebg-surfaceCards, preview boxes, inputs
    subtlebg-subtleHover, code background, active item
    lineborder-lineBorders and dividers
    inktext-inkPrimary text
    mutedtext-mutedSecondary text
    fainttext-faintPlaceholders and meta
    primarybg-primaryPrimary buttons, links, focus
    primary-strongbg-primary-strongPrimary hover
    on-primarytext-on-primaryText on primary
    primary-softbg-primary-softBadge and highlight background
    primary-lineborder-primary-lineBadge border
    successbg-successSuccess state
    warningbg-warningWarnings
    dangerbg-dangerErrors and destructive actions

    The light and dark value of every token is also in the registry: /r/theme.json.

    Shadow

    Floating elements (Dropdown Menu, Tooltip, Toast, Modal, Drawer) use a single shadow-overlay token. Change it with --shadow-overlay in @theme if needed.

    Radius and font

    Components use Tailwind’s default radii (rounded-md 6px, rounded-lg 8px, rounded-xl 12px) and load no fonts. Text uses your project’s font.