// Copyright 2026 The Lynx Authors. All rights reserved. // Licensed under the Apache License Version 2.0 that can be found in the // LICENSE file in the root directory of this source tree. import { root } from "@lynx-js/react"; import "./index.scss"; const cards = [ { number: "01", title: "Reflow the content", description: "Cards move from one column to two, then three as the viewport grows.", detail: "FLEX WRAP + WIDTH", className: "mint", }, { number: "02", title: "Reveal a side panel", description: "Supporting content gets its own sidebar when there is room beside the page.", detail: "DISPLAY + MIN-WIDTH", className: "lavender", }, { number: "03", title: "Give details room", description: "Larger type and generous spacing make the most of a bigger canvas.", detail: "FONT SIZE + PADDING", className: "peach", }, ]; function MediaQueryLargeScreenDemo() { return ( L LYNX / LAYOUT LAB CSS @media THE BIG PICTURE {"More space.\nMore context."} This panel appears at 1024px. The main content stays flexible beside it. LAYOUT CHECKLIST 01 / Reflow content 02 / Reveal context 03 / Adjust spacing @media (min-width: 1024px) MEDIA QUERY / LARGE SCREEN ADAPTATION Room to grow. One page, from phone to tablet to desktop. The layout adapts to the space available. COMPACT / 1 COLUMN MEDIUM / 2 COLUMNS EXPANDED / 3 COLUMNS + SIDEBAR Phone < 600px Tablet 600–1023px Desktop ≥ 1024px Same content. New layout. Three ways to adapt {cards.map((card) => ( {card.number} {card.title} {card.description} {card.detail} ))} Resize the viewport. All layout changes come from CSS media queries. ); } root.render(); if (import.meta.webpackHot) { import.meta.webpackHot.accept(); }