Skip to content

Removing JavaScript from my Layout Library

Latest
Compare
Choose a tag to compare
@Jarvis1010 Jarvis1010 released this 14 Dec 18:49
· 967 commits to main since this release

A ResponsiveswitchAt without all the JavaScript

Bedrock's Columns Component has always had the ability to switch to a stacking layout if you provided the switchAt prop. The switchAt prop lets the column component know at which size it should switch from columns to Stack. So nothing has really changed, except one major thing: It no longer requires JavaScript to do it. It's now done with just CSS. Here is an example where if you go below 60ch, it will automatically change to a stacking layout: https://codesandbox.io/s/vibrant-goldstine-bk7bt0?file=/src/App.tsx

What's Changed

Full Changelog: https://github.com/Bedrock-Layouts/Bedrock/commits/@bedrock-layout/[email protected]