Customize
Integrate your style and design system into Lapikit components
By default, Lapikit is inspired by Material Design v3 style rules, so as to offer a coherent foundation that can be adapted to the widest possible audience. With Lapikit, you can quickly customize components using the lapikit.config.js file located at the root of your application.
Lapikit customization is divided into 4 main parts:
Options ensure that Lapikit style files are correctly formatted for your application.
boolean
) : true
Add style resets to format basic browser styles. These CSS resets are based on the necolas normalize.css file.
boolean
) : false
Minifies all component styles to reduce overall file size.
light
| dark
| system
): system
Lapikit offers direct theme management based on the user configuration of the operating system. This feature is based on prefers-color-scheme in reference to MDN.
The options available:
light
: force Lapikit theme to be displayed in light colordark
: force Lapikit theme to be displayed in dark colorsystem
: ensures availability of dark and light themes for use according to user configuration.This functionality is complemented by colorSchemeSystem, colorScheme andsetColorScheme utilities.
[key: string]: string | {light: string, dark: string}
) : presetsLapikit uses default colors, based on Material Design v3. All colors are converted to oklch and provide your application with CSS variables for using theme colors. If your colorScheme configuration in Lapikit is based on system
, each variable adapts dynamically according to the colorScheme.
for each color key in Lapikit’s configuration, you have 2 choices:
string
: the color defined will be set for both theme shades.{ light: string , dark: string }
: the color will be specific to each color chart.Colors must be defined in either x11
, hexadecimal
, rgb
, css variables
or oklch
format.
[!INFO] Other formats will be supported as Lapikit develops.
Lapikit is based on TailwindCSS breakpoints and not Material Design v3, as we feel that TailwindCSS breakpoints are better suited to the needs of developers in general. These parameters are fully customizable.
[!WARNING] We rely on the TailwindCSS reference for breakpoints, but do not depend on it. If you modify the breakpoints in TailwindCSS, you’ll have to modify them in Lapikit too.
In order to propose display classes, we have included breakpoint variables for 3 device types:
string
): sm
Breakpoint for mobilesstring
): md
Breakpoint for tabletsstring
): lg
Breakpoint for computersEach variable is based on the key names defined in thresholds.
[key: string]: string
): presets
Lapikit supports 8 breakpoints by default, which you can add or modify. Components use these breakpoint keys for the various adaptive classes specific to each component.
To find out more, visit the breakpoints page.
string
): 0.125rem
Defines the default space for all margins, padding and sizes of Lapikit components via the --kit-spacing
variable
Corner
boolean
): true
Enable or disable --kit-radius-*
variables
[key: string]: string | number
): presets
All rounding available for Lapikit components and globally via --kit-radius-*
variables
[key: string]: string | Array<string>
): presets
Lapikit predefines default fonts for standard use via sans, mono and serif variables. They are available globally via CSS variables --kit-font-family-*
.
The next steps
See also the Breakpoints and Application pages to take full advantage of the visual possibilities.