There are some great things with Col that has width, tabletWidth, and desktopWidth. Is that all CSS based? Would be nice to know device type (phone or tablet) in JS. Or I just missed it!
Yes, those are just CSS media queries https://framework7.io/docs/grid.html#column-sizes
Why? In 99.99% of cases it is not required. And nowadays there are small tablets like phones, and large phones like tablets
If you need to do something in JS based on screen width, there is a app.width
and app.height
properties https://framework7.io/docs/app.html#app-methods-properties
if (app.width >= 768) {
// can be a tablet
...
}
1 Like
It’s for conditional rendering which won’t work in a responsive way unfortunately. I could render both and use css to hide one, but that seems wasteful. Maybe not enough to worry about though.
Then referencing app.width should be sufficient.