Lumo CSS Framework (Legacy)

4.0.10 · deprecated · verified Sun Apr 19

The `lumo-css-framework` package provides a set of utility-first CSS classes and foundational styles derived from Vaadin's Lumo design system. It was designed to help developers build web applications with a consistent Vaadin Lumo theme, offering customizable style properties like colors, fonts, sizing, spacing, and icons, along with dark and compact variants. While this specific npm package (version 4.0.10, last updated over five years ago) saw use in older Vaadin projects (pre-Vaadin 20), it is now considered deprecated. For current Vaadin applications (Vaadin 20+), the utility classes and Lumo theme are either built directly into the Vaadin framework or available through the actively maintained `@vaadin/vaadin-lumo-styles` package, which is part of the broader `web-components` monorepository and receives regular updates (current stable version 24.10.0). Users are strongly advised against using this standalone `lumo-css-framework` package for new projects or upgrading existing ones, and should instead rely on the integrated Vaadin theming or `@vaadin/vaadin-lumo-styles` for web component-based projects. Key differentiators of Lumo include its deep integration with Vaadin components, robust CSS custom property system for theming, and comprehensive set of utility classes for flexible layouting, which conform to some Tailwind CSS patterns.

Common errors

Warnings

Install

Imports

Quickstart

Demonstrates how to import the Lumo CSS framework's styles in a Vaadin project's main stylesheet and provides context on its deprecation.

/* src/main/frontend/themes/my-app/styles.css */
/* This example assumes a Vaadin Flow project structure */
/* For Vaadin 19 and earlier, using the lumo-css-framework npm package */

@import url('lumo-css-framework/all-classes.css');

/* You can also import specific parts, e.g., only utility classes */
/* @import url('lumo-css-framework/classes.css'); */

/* Add your custom styles here, overriding Lumo variables if needed */
:host([theme~="my-app"]) {
  --lumo-primary-color: #694CFA;
  --lumo-primary-color-50pct: rgba(105, 76, 250, 0.5);
  --lumo-font-family: 'Inter', sans-serif;
}

/* Example of using Lumo utility classes in HTML/JSX/TSX */
// <div class="flex flex-col items-center justify-center p-l"></div>

/* For Vaadin 20+ applications, the lumo-css-framework package is deprecated. */
/* Lumo utility classes are often directly available or via @vaadin/vaadin-lumo-styles. */
/* Example for Vaadin 20+ with built-in utility classes (no direct lumo-css-framework import needed) */
// @CssImport(value = "./themes/my-app/styles.css", themeFor = "vaadin-app-layout")
// @Theme("my-app")

view raw JSON →