Breakpoints
Define component display according to the display size of your application. Each Lapikit component offers APIs that are compatible with these breakpoints.
The following table lists the default breakpoint keys, their pixel values, and the device types they correspond to:
Lapikit uses the same mobile-first writing logic as TailwindCSS for managing classes with breakpoints. We ensure that all classes are functional, and then add breakpoints that modify the display according to screen size with {breakpoint}:{class}
.
Breakpoint example:
.kit-btn-density-comfortable
is displayed for all screen sizes..kit-btn-density-comfortable .md:kit-btn-density-default
modifies the density display if the display varies between default and md.Using breakpoints in the APIs of Lapikit components Each component offers certain so-called responsive APIs. They accept several parameters based on the keys available in your Lapikit threshold configuration.
Here’s an example with the Button component and the density API.
Lapikit offers advanced breakpoint customization. You can add and modify both devices and thresholds so that your app stays fully adaptive.
To do this, edit your plugins/lapikit.(ts|js)
file and configure breakpoints inside the createLapikit() call. You can visit customize pages for discover all options to lapikit customization.
[!INFO] It’s advisable to restart your environment after this kind of modification to ensure that all Lapikit styles are updated.
Lapikit also offers device breakpoints, so you can define a display for just one type of device, or several in succession. This allows you to display, for example, a BottomNavigation for mobiles, followed by an AppBar for tablets and computers.
Here is the list of available classes:
And your custom breakpoints devices use this format class : kit-device--(d|h)-{device}
.
Lapikit is built to adapt, not dictate. If the default mapping between devices and thresholds doesn’t match your design system, you can fully customize it via the devices config.
Here’s how you might redefine which breakpoints count as mobile, tablet, desktop or custom:
This gives you full control over what mobile or tablet means in your app, keeping your responsive logic aligned with your design tokens or product specs. .
To find out more, discover how Lapikit styles adapt to your customized breakpoints.
Do you have a question? Ask on GitHub or Discord server
Do you see a bug? Open an issue on GitHub