Display your content with responsive breakpoints

Breakpoints

Mytril makes it easy to create responsive layouts with predefined breakpoints for different screen sizes. These breakpoints help you control how your content is displayed across devices, ensuring that your application is optimized for everything from small tablets to large desktop screens.

Breakpoint key guide:

Breakpoint prefixMinimum withCSS
xs28rem (448px)@media (width >= 28rem)
sm40rem (640px)@media (width >= 40rem)
md48rem (768px)@media (width >= 48rem)
lg64rem (1024px)@media (width >= 64rem)
xl80rem (1280px)@media (width >= 80rem)
2xl96rem (1536px)@media (width >= 96rem)
3xl112rem (1792px)@media (width >= 112rem)

With these breakpoints, you can create responsive components that adjust seamlessly depending on the user’s device. You can target these breakpoints in your CSS or JavaScript, or use them directly in your Mytril components to define how content is displayed at different sizes.

Example usage with Mytril:

Mytril’s breakpoints can be used to easily define media queries or set conditional styles based on the screen size directly on your html.

cover
Title
SubTitle
Obcaecati adipisci nihil temporibus laborum nesciunt reiciendis cumque illum accusamus iusto voluptates molestias, ratione quos mollitia quas veritatis velit nobis amet numquam.

Default breakpoint values:

Mytril provides the following default breakpoint values in the mytril.config.js file:

Working mobile-first

Mytril uses a mobile-first breakpoint system, similar to that to which you may be accustomed in other frameworks such as Tailwind or Bootstrap.

This means that non-prefixed utilities (such as uppercase) take effect on all screen sizes, while prefixed utilities (such as md:uppercase) only take effect at the specified breakpoint and above.

Customizing breakpoints:

You can also modify or add new breakpoints to suit the specific needs of your project. Simply update the mytril.config.js file with your preferred values:

With this flexibility, Mytril allows you to fine-tune the responsiveness of your application to ensure a seamless experience on all screen sizes, from small mobile devices to extra-large desktops.

Mobile breakpoint

Mytril directly proposes a breakpoint to predefine when you switch from a mobile/laptop interface. With certain Mytril components, such as BottomNavigation, this allows you to define a display state according to the mobile view and the classic view.

You can customize this parameter in the mytril.config.js file, allowing you to adapt it to your design system.

  1. Home
Help us improve this component!
or

Minedelve respects your privacy

Minedelve and our partners use cookies or similar technologies to enable us to improve the site, your experience and to ensure the proper functioning of the site, to collect statistics in order to optimize the services offered, and to adapt Minedelve's content.