Display
The display helpers allow you to control the display of content. This includes being conditionally visible based upon the current viewport, or the actual element display type. Specify the elements display property. These classes can be applied to all breakpoints from xs to xl. When using a base class, If you want to check the screen size in javascript then Svelte Materialify has got you covered. Check more about window.matchMedia Available properties: Helper Classes
.d-{value}
, the responsive classes are .d-{breakpoint}-{value}
. Js Breakpoints
<script>
import { onMount } from 'svelte';
onMount(async () => {
let breakpoints = await import('svelte-materialify/src/utils/breakpoints');
breakpoints = breakpoints.default;
// check if screen size is less than or equal to medium
let mediumAndDown = window.matchMedia(breakpoints['md-and-down']).matches;
});
</script>