Skip to content
On this page

Use Screen

A syntax sugar for useSize but with a predefined width for seperating screen size.

Equivalent to TailwindCSS breakpoint.

    ..h = 300
        base: (v) => v..wPercent = 100,
        md: (v) => v..wPercent = 90,
        xl: (v) => v..wPercent = 75,

If the property doesn’t define, it will fall through fallback, for example.


For useScreen, the accepts property is consists of 6.

Breakpoint NameScreen Size
base< 568px
xs< 640px
sm< 720px
md< 920px
lg< 1024px
xl>= 1024px