/Foundation

Theming

How to customize the look and feel of HextaUI components using themes.

Font Family

HextaUI uses two primary font families for its components:

  • Geist: A versatile sans-serif font for body text and UI elements.
  • JetBrains Mono: A monospaced font for code blocks and technical content.

Variables

app/globals.css
:root {
  --hu-font-geist: var(--font-geist);
  --hu-font-jetbrains: var(--font-jetbrains-mono);

  --radius: 0.75rem;

  --hu-background: 0, 0%, 100%;
  --hu-foreground: 0, 0%, 14%;

  --hu-card: 0, 0%, 99%;
  --hu-card-foreground: 0, 0%, 14%;

  --hu-primary: 0, 0%, 20%;
  --hu-primary-foreground: 0, 0%, 98%;

  --hu-secondary: 0, 0%, 97%;
  --hu-secondary-foreground: 0, 0%, 20%;

  --hu-muted: 0, 0%, 97%;
  --hu-muted-foreground: 0, 0%, 56%;

  --hu-accent: 0, 0%, 96%;
  --hu-accent-foreground: 0, 0%, 20%;

  --hu-destructive: 9, 96%, 47%;
  --hu-destructive-foreground: 0, 0%, 98%;

  --hu-border: 0, 0%, 92%;
  --hu-input: 0, 0%, 100%;
  --hu-ring: 0, 0%, 71%;

  --color-fd-background: hsl(var(--hu-background));
}

.dark {
  --hu-background: 0, 0%, 7%;
  --hu-foreground: 0, 0%, 100%;

  --hu-card: 0, 0%, 9%;
  --hu-card-foreground: 0, 0%, 100%;

  --hu-primary: 0, 0%, 100%;
  --hu-primary-foreground: 0, 0%, 20%;

  --hu-secondary: 0, 0%, 15%;
  --hu-secondary-foreground: 0, 0%, 100%;

  --hu-muted: 0, 0%, 15%;
  --hu-muted-foreground: 0, 0%, 71%;

  --hu-accent: 0, 0%, 15%;
  --hu-accent-foreground: 0, 0%, 100%;

  --hu-destructive: 0, 84%, 50%;
  --hu-destructive-foreground: 0, 0%, 98%;

  --hu-border: 0, 0%, 100%, 10%;
  --hu-input: 0, 0%, 100%, 5%;
  --hu-ring: 0, 0%, 56%;

  --color-fd-background: hsl(var(--hu-background));
  --color-fd-card: hsl(var(--hu-card));
}

Customizing Colors

You can customize the HextaUI color palette by overriding these CSS variables in your own stylesheet:

Custom theme example
:root {
  /* Custom primary colors */
  --hu-primary: 221, 83%, 53%;
  --hu-primary-foreground: 0, 0%, 98%;

  /* Custom destructive colors */
  --hu-destructive: 0, 84%, 60%;
  --hu-destructive-foreground: 0, 0%, 98%;
}
Edit on GitHub

Last updated on