Skip to main content

Configuration Variables

NuvoUI is designed to be highly configurable through a set of variables that control everything from utility class generation to responsive breakpoints, colors, spacing, and typography.

Core Configuration Options

These variables control the framework's fundamental behavior.

Utility Generation

$generate-utility-classes controls whether utility classes are generated:

Features Toggles

These variables enable or disable specific framework features:

Disable individual features

By default, NuvoUI will not generate any utility classes, keeping your compiled CSS minimal. Enabling utility classes will significantly increase the output size. To maintain control, you can selectively disable specific features by setting them to false.

Here is a complete list of features you can enable or disable:

Global Settings

Default Unit

The default unit is used when converting unitless values:

Typography Base Settings

Basic typography configuration:

Layout Constants

Variables used across layout modules:

Border System

Border Widths

Common border width values:

Border Radii

Border radius values for consistent rounding:

Color System

Semantic Colors

These colors represent semantic meanings across the UI:

Color Primitives

Base colors that can be extended with shade variants:

Responsive System

Breakpoints

Define the breakpoints used for responsive utilities:

Grid Item Sizes

Predefined sizes for grid items:

Scoping

Parent Selector

Control the scope of utility classes:

Shadow System

Shadow colors for consistent elevation:

Spacing System

Spacing Scale

Define the spacing scale used for margin, padding, and gap utilities:

Percentage Values

Common percentage values used for width, height, and other properties:

Theme System

The theme system uses prefixed tokens to indicate their intended use (bg-, text-, border-):

Beaware

Some of these tokens are used inside the theme system, e.g. removing border-base will remove the border from the base class border

Theme Validation

NuvoUI automatically validates that all theme tokens from the light theme exist in the dark theme, if they do not match it will give error.

Theme Token Usage

Theme tokens are automatically used to generate appropriate CSS classes based on their prefix:

How Inverted Colors Work

Inverted colors provide automatic contrast for each token by using the corresponding dark theme value in light mode, and light theme value in dark mode:

Typography System

Font Sizes

Define the font sizes used throughout the framework:

Using Configuration Variables

You can override any of these variables in your own project:

Configuration Reference Table

VariableTypeDefaultDescription
$generate-utility-classesBooleantrueControls generation of utility classes
$enable-dark-modeBooleantrueEnables dark mode support
$default-unitStringpxDefault unit for unitless values
$base-sizeNumber16pxBase font size in pixels
$font-familyStringSystem font stackDefault font family
$column-countNumber12Number of columns in grid system
$default-container-nameStringnuvoui-containerDefault container name
$primary, $secondary, etc.ColorVariousSemantic color values
$color-primitivesMapColor mapBase colors for the system
$light-themeMapToken mapLight theme values with prefixed keys
$theme-tokensListFrom $light-themeAutomatically derived from light theme keys
$dark-themeMapToken mapDark theme values (must match light theme keys)
$shadow-colorsMapShadow valuesShadow color variants
$breakpointsMapSize mapResponsive breakpoint values
$grid-item-sizesMapSize mapGrid item size presets
$font-sizesMapSize mapTypography size scale
$spacingsMapSize mapSpacing scale for margin, padding, etc.
$percentagesListValue listCommon percentage values
$border-widthsListWidth listBorder width values
$border-radiiMapRadius mapBorder radius values
$parent-selectorString""Parent selector for scoping