{"meta":{"title":"Modern Web Guidance","source":"https://github.com/GoogleChrome/modern-web-guidance","sourceName":"GoogleChrome/modern-web-guidance","license":"Apache-2.0 (code) / CC-BY 4.0 (guides)","docs":"https://goo.gle/modern-web-guidance","explorer":"https://web-platform-dx.github.io/web-features-explorer/","fetchedAt":"2026-11-14","note":"由 Google Chrome、Microsoft Edge、Mozilla Firefox 与 MDN 团队共同维护的开源现代 Web 平台指南；本站为离线快照整理，非官方实时数据。"},"cats":[{"id":"ui-behaviors","name":"界面行为","en":"UI Behaviors","icon":"🎬","color":"#ffa657","count":40},{"id":"performance","name":"性能","en":"Performance","icon":"🚀","color":"#db61a2","count":26},{"id":"chrome-extensions","name":"Chrome 扩展","en":"Chrome Extensions","icon":"🧩","color":"#4dabf7","count":24},{"id":"ui-components","name":"界面组件","en":"UI Components","icon":"🧱","color":"#bc8cff","count":22},{"id":"visual-design","name":"视觉设计","en":"Visual Design","icon":"🖌️","color":"#ff7b72","count":22},{"id":"forms","name":"表单与输入","en":"Forms","icon":"📝","color":"#d29922","count":19},{"id":"css","name":"CSS 与布局","en":"CSS & Layout","icon":"🎨","color":"#58a6ff","count":18},{"id":"security","name":"安全","en":"Security","icon":"🛡️","color":"#f85149","count":17},{"id":"ui-atoms","name":"界面细节","en":"UI Atoms","icon":"🔹","color":"#79c0ff","count":13},{"id":"html","name":"HTML 与 DOM","en":"HTML & DOM","icon":"🧩","color":"#f0883e","count":8},{"id":"built-in-ai","name":"浏览器内置 AI","en":"Built-in AI","icon":"🤖","color":"#a371f7","count":5},{"id":"js","name":"JavaScript 与 API","en":"JS & APIs","icon":"⚡","color":"#e3b341","count":5},{"id":"accessibility","name":"无障碍","en":"Accessibility","icon":"♿","color":"#3fb950","count":4},{"id":"user-experience","name":"用户体验","en":"User Experience","icon":"✨","color":"#56d364","count":3},{"id":"webmcp","name":"WebMCP","en":"WebMCP","icon":"🔌","color":"#d2a8ff","count":3},{"id":"pwa","name":"PWA 与应用安装","en":"PWA","icon":"📱","color":"#39c5cf","count":2},{"id":"privacy","name":"隐私","en":"Privacy","icon":"🔒","color":"#8b949e","count":1},{"id":"wasm","name":"WebAssembly","en":"WebAssembly","icon":"🛠️","color":"#7ee787","count":1}],"groups":[{"name":"CSS & Layout","count":140},{"name":"HTML & DOM","count":36},{"name":"JavaScript & APIs","count":74}],"features":[{"name":"::backdrop","url":"https://web-platform-dx.github.io/web-features-explorer/features/backdrop/","group":"CSS & Layout","groupIndex":0},{"name":"content-visibility","url":"https://web-platform-dx.github.io/web-features-explorer/features/content-visibility/","group":"CSS & Layout","groupIndex":0},{"name":"progress()","url":"https://web-platform-dx.github.io/web-features-explorer/features/progress-function/","group":"CSS & Layout","groupIndex":0},{"name":"::details-content","url":"https://web-platform-dx.github.io/web-features-explorer/features/details-content/","group":"CSS & Layout","groupIndex":0},{"name":"contrast-color()","url":"https://web-platform-dx.github.io/web-features-explorer/features/contrast-color/","group":"CSS & Layout","groupIndex":0},{"name":"reading-flow","url":"https://web-platform-dx.github.io/web-features-explorer/features/reading-flow/","group":"CSS & Layout","groupIndex":0},{"name":"::file-selector-button","url":"https://web-platform-dx.github.io/web-features-explorer/features/file-selector-button/","group":"CSS & Layout","groupIndex":0},{"name":"Cross-document view transitions","url":"https://web-platform-dx.github.io/web-features-explorer/features/cross-document-view-transitions/","group":"CSS & Layout","groupIndex":0},{"name":"Relative colors","url":"https://web-platform-dx.github.io/web-features-explorer/features/relative-color/","group":"CSS & Layout","groupIndex":0},{"name":"::placeholder","url":"https://web-platform-dx.github.io/web-features-explorer/features/placeholder/","group":"CSS & Layout","groupIndex":0},{"name":"currentColor","url":"https://web-platform-dx.github.io/web-features-explorer/features/currentcolor/","group":"CSS & Layout","groupIndex":0},{"name":"rem","url":"https://web-platform-dx.github.io/web-features-explorer/features/rem/","group":"CSS & Layout","groupIndex":0},{"name":"::selection","url":"https://web-platform-dx.github.io/web-features-explorer/features/selection/","group":"CSS & Layout","groupIndex":0},{"name":"Custom highlights","url":"https://web-platform-dx.github.io/web-features-explorer/features/highlight/","group":"CSS & Layout","groupIndex":0},{"name":"resize (CSS property)","url":"https://web-platform-dx.github.io/web-features-explorer/features/resize/","group":"CSS & Layout","groupIndex":0},{"name":":dir()","url":"https://web-platform-dx.github.io/web-features-explorer/features/dir-pseudo/","group":"CSS & Layout","groupIndex":0},{"name":"Custom properties","url":"https://web-platform-dx.github.io/web-features-explorer/features/custom-properties/","group":"CSS & Layout","groupIndex":0},{"name":"revert","url":"https://web-platform-dx.github.io/web-features-explorer/features/revert-value/","group":"CSS & Layout","groupIndex":0},{"name":":focus-visible","url":"https://web-platform-dx.github.io/web-features-explorer/features/focus-visible/","group":"CSS & Layout","groupIndex":0},{"name":"display animation","url":"https://web-platform-dx.github.io/web-features-explorer/features/display-animation/","group":"CSS & Layout","groupIndex":0},{"name":"revert-rule","url":"https://web-platform-dx.github.io/web-features-explorer/features/revert-rule/","group":"CSS & Layout","groupIndex":0},{"name":":focus-within","url":"https://web-platform-dx.github.io/web-features-explorer/features/focus-within/","group":"CSS & Layout","groupIndex":0},{"name":"Element-scoped view transitions","url":"https://web-platform-dx.github.io/web-features-explorer/features/view-transitions-element-scoped/","group":"CSS & Layout","groupIndex":0},{"name":"Safe area inset environment variables","url":"https://web-platform-dx.github.io/web-features-explorer/features/safe-area-inset/","group":"CSS & Layout","groupIndex":0},{"name":":has()","url":"https://web-platform-dx.github.io/web-features-explorer/features/has/","group":"CSS & Layout","groupIndex":0},{"name":"em unit","url":"https://web-platform-dx.github.io/web-features-explorer/features/em-unit/","group":"CSS & Layout","groupIndex":0},{"name":"Scroll marker target pseudo-classes","url":"https://web-platform-dx.github.io/web-features-explorer/features/scroll-marker-targets/","group":"CSS & Layout","groupIndex":0},{"name":":host-context()","url":"https://web-platform-dx.github.io/web-features-explorer/features/host-context/","group":"CSS & Layout","groupIndex":0},{"name":"field-sizing","url":"https://web-platform-dx.github.io/web-features-explorer/features/field-sizing/","group":"CSS & Layout","groupIndex":0},{"name":"Scroll method promises","url":"https://web-platform-dx.github.io/web-features-explorer/features/scroll-promises/","group":"CSS & Layout","groupIndex":0},{"name":":is()","url":"https://web-platform-dx.github.io/web-features-explorer/features/is/","group":"CSS & Layout","groupIndex":0},{"name":"filter","url":"https://web-platform-dx.github.io/web-features-explorer/features/filter/","group":"CSS & Layout","groupIndex":0},{"name":"Scroll snap","url":"https://web-platform-dx.github.io/web-features-explorer/features/scroll-snap/","group":"CSS & Layout","groupIndex":0},{"name":":modal","url":"https://web-platform-dx.github.io/web-features-explorer/features/modal/","group":"CSS & Layout","groupIndex":0},{"name":"flex-wrap: balance","url":"https://web-platform-dx.github.io/web-features-explorer/features/flexbox-flex-wrap-balance/","group":"CSS & Layout","groupIndex":0},{"name":"Scroll snap events","url":"https://web-platform-dx.github.io/web-features-explorer/features/scroll-snap-events/","group":"CSS & Layout","groupIndex":0},{"name":":not()","url":"https://web-platform-dx.github.io/web-features-explorer/features/not/","group":"CSS & Layout","groupIndex":0},{"name":"Flexbox","url":"https://web-platform-dx.github.io/web-features-explorer/features/flexbox/","group":"CSS & Layout","groupIndex":0},{"name":"scroll-axis-lock","url":"https://web-platform-dx.github.io/web-features-explorer/features/scroll-axis-lock/","group":"CSS & Layout","groupIndex":0},{"name":":nth-child() of &lt;selector>","url":"https://web-platform-dx.github.io/web-features-explorer/features/nth-child-of/","group":"CSS & Layout","groupIndex":0},{"name":"font-size","url":"https://web-platform-dx.github.io/web-features-explorer/features/font-size/","group":"CSS & Layout","groupIndex":0},{"name":"scroll-behavior","url":"https://web-platform-dx.github.io/web-features-explorer/features/scroll-behavior/","group":"CSS & Layout","groupIndex":0},{"name":":placeholder-shown","url":"https://web-platform-dx.github.io/web-features-explorer/features/placeholder-shown/","group":"CSS & Layout","groupIndex":0},{"name":"font-size-adjust","url":"https://web-platform-dx.github.io/web-features-explorer/features/font-size-adjust/","group":"CSS & Layout","groupIndex":0},{"name":"Scroll-driven animations","url":"https://web-platform-dx.github.io/web-features-explorer/features/scroll-driven-animations/","group":"CSS & Layout","groupIndex":0},{"name":":user-valid and :user-invalid","url":"https://web-platform-dx.github.io/web-features-explorer/features/user-pseudos/","group":"CSS & Layout","groupIndex":0},{"name":"Forced colors","url":"https://web-platform-dx.github.io/web-features-explorer/features/forced-colors/","group":"CSS & Layout","groupIndex":0},{"name":"scroll-initial-target","url":"https://web-platform-dx.github.io/web-features-explorer/features/scroll-initial-target/","group":"CSS & Layout","groupIndex":0},{"name":":where()","url":"https://web-platform-dx.github.io/web-features-explorer/features/where/","group":"CSS & Layout","groupIndex":0},{"name":"Gradient interpolation","url":"https://web-platform-dx.github.io/web-features-explorer/features/gradient-interpolation/","group":"CSS & Layout","groupIndex":0},{"name":"scroll-target-group","url":"https://web-platform-dx.github.io/web-features-explorer/features/scroll-target-group/","group":"CSS & Layout","groupIndex":0},{"name":"@function","url":"https://web-platform-dx.github.io/web-features-explorer/features/function/","group":"CSS & Layout","groupIndex":0},{"name":"Gradients","url":"https://web-platform-dx.github.io/web-features-explorer/features/gradients/","group":"CSS & Layout","groupIndex":0},{"name":"scrollbar-color","url":"https://web-platform-dx.github.io/web-features-explorer/features/scrollbar-color/","group":"CSS & Layout","groupIndex":0},{"name":"@scope","url":"https://web-platform-dx.github.io/web-features-explorer/features/scope/","group":"CSS & Layout","groupIndex":0},{"name":"Grid","url":"https://web-platform-dx.github.io/web-features-explorer/features/grid/","group":"CSS & Layout","groupIndex":0},{"name":"scrollbar-gutter","url":"https://web-platform-dx.github.io/web-features-explorer/features/scrollbar-gutter/","group":"CSS & Layout","groupIndex":0},{"name":"@starting-style","url":"https://web-platform-dx.github.io/web-features-explorer/features/starting-style/","group":"CSS & Layout","groupIndex":0},{"name":"Grid lanes","url":"https://web-platform-dx.github.io/web-features-explorer/features/grid-lanes/","group":"CSS & Layout","groupIndex":0},{"name":"scrollbar-width","url":"https://web-platform-dx.github.io/web-features-explorer/features/scrollbar-width/","group":"CSS & Layout","groupIndex":0},{"name":"@supports","url":"https://web-platform-dx.github.io/web-features-explorer/features/supports/","group":"CSS & Layout","groupIndex":0},{"name":"Hyphenation","url":"https://web-platform-dx.github.io/web-features-explorer/features/hyphens/","group":"CSS & Layout","groupIndex":0},{"name":"scrollend","url":"https://web-platform-dx.github.io/web-features-explorer/features/scrollend/","group":"CSS & Layout","groupIndex":0},{"name":"abs() and sign()","url":"https://web-platform-dx.github.io/web-features-explorer/features/abs-sign/","group":"CSS & Layout","groupIndex":0},{"name":"image-set()","url":"https://web-platform-dx.github.io/web-features-explorer/features/image-set/","group":"CSS & Layout","groupIndex":0},{"name":"scrollIntoView()","url":"https://web-platform-dx.github.io/web-features-explorer/features/scroll-into-view/","group":"CSS & Layout","groupIndex":0},{"name":"accent-color","url":"https://web-platform-dx.github.io/web-features-explorer/features/accent-color/","group":"CSS & Layout","groupIndex":0},{"name":"Individual transform properties","url":"https://web-platform-dx.github.io/web-features-explorer/features/individual-transforms/","group":"CSS & Layout","groupIndex":0},{"name":"Shadow parts","url":"https://web-platform-dx.github.io/web-features-explorer/features/shadow-parts/","group":"CSS & Layout","groupIndex":0},{"name":"Active view transition","url":"https://web-platform-dx.github.io/web-features-explorer/features/active-view-transition/","group":"CSS & Layout","groupIndex":0},{"name":"inherit","url":"https://web-platform-dx.github.io/web-features-explorer/features/inherit-value/","group":"CSS & Layout","groupIndex":0},{"name":"sibling-count() and sibling-index()","url":"https://web-platform-dx.github.io/web-features-explorer/features/sibling-count/","group":"CSS & Layout","groupIndex":0},{"name":"Alt text for generated content","url":"https://web-platform-dx.github.io/web-features-explorer/features/alt-text-generated-content/","group":"CSS & Layout","groupIndex":0},{"name":"initial","url":"https://web-platform-dx.github.io/web-features-explorer/features/initial-value/","group":"CSS & Layout","groupIndex":0},{"name":"Sticky positioning","url":"https://web-platform-dx.github.io/web-features-explorer/features/sticky-positioning/","group":"CSS & Layout","groupIndex":0},{"name":"Anchor position container queries","url":"https://web-platform-dx.github.io/web-features-explorer/features/container-anchor-position-queries/","group":"CSS & Layout","groupIndex":0},{"name":"Interaction media queries","url":"https://web-platform-dx.github.io/web-features-explorer/features/interaction/","group":"CSS & Layout","groupIndex":0},{"name":"Subgrid","url":"https://web-platform-dx.github.io/web-features-explorer/features/subgrid/","group":"CSS & Layout","groupIndex":0},{"name":"Anchor positioning","url":"https://web-platform-dx.github.io/web-features-explorer/features/anchor-positioning/","group":"CSS & Layout","groupIndex":0},{"name":"interpolate-size","url":"https://web-platform-dx.github.io/web-features-explorer/features/interpolate-size/","group":"CSS & Layout","groupIndex":0},{"name":"System colors","url":"https://web-platform-dx.github.io/web-features-explorer/features/system-color/","group":"CSS & Layout","groupIndex":0},{"name":"Animations (CSS)","url":"https://web-platform-dx.github.io/web-features-explorer/features/animations-css/","group":"CSS & Layout","groupIndex":0},{"name":"isolation","url":"https://web-platform-dx.github.io/web-features-explorer/features/isolation/","group":"CSS & Layout","groupIndex":0},{"name":"Text overflow","url":"https://web-platform-dx.github.io/web-features-explorer/features/text-overflow/","group":"CSS & Layout","groupIndex":0},{"name":"appearance","url":"https://web-platform-dx.github.io/web-features-explorer/features/appearance/","group":"CSS & Layout","groupIndex":0},{"name":"Lab and LCH","url":"https://web-platform-dx.github.io/web-features-explorer/features/lab/","group":"CSS & Layout","groupIndex":0},{"name":"Text stroke and fill  (compatibility prefixes)","url":"https://web-platform-dx.github.io/web-features-explorer/features/text-stroke-fill/","group":"CSS & Layout","groupIndex":0},{"name":"aspect-ratio","url":"https://web-platform-dx.github.io/web-features-explorer/features/aspect-ratio/","group":"CSS & Layout","groupIndex":0},{"name":"light-dark()","url":"https://web-platform-dx.github.io/web-features-explorer/features/light-dark/","group":"CSS & Layout","groupIndex":0},{"name":"text-box","url":"https://web-platform-dx.github.io/web-features-explorer/features/text-box/","group":"CSS & Layout","groupIndex":0},{"name":"at-rule()","url":"https://web-platform-dx.github.io/web-features-explorer/features/supports-at-rule/","group":"CSS & Layout","groupIndex":0},{"name":"line-clamp","url":"https://web-platform-dx.github.io/web-features-explorer/features/line-clamp/","group":"CSS & Layout","groupIndex":0},{"name":"text-decoration","url":"https://web-platform-dx.github.io/web-features-explorer/features/text-decoration/","group":"CSS & Layout","groupIndex":0},{"name":"attr()","url":"https://web-platform-dx.github.io/web-features-explorer/features/attr/","group":"CSS & Layout","groupIndex":0},{"name":"line-height","url":"https://web-platform-dx.github.io/web-features-explorer/features/line-height/","group":"CSS & Layout","groupIndex":0},{"name":"text-decoration-skip-ink","url":"https://web-platform-dx.github.io/web-features-explorer/features/text-decoration-skip-ink/","group":"CSS & Layout","groupIndex":0},{"name":"background-blend-mode","url":"https://web-platform-dx.github.io/web-features-explorer/features/background-blend-mode/","group":"CSS & Layout","groupIndex":0},{"name":"linear() easing","url":"https://web-platform-dx.github.io/web-features-explorer/features/linear-easing/","group":"CSS & Layout","groupIndex":0},{"name":"text-decoration-skip-ink: all","url":"https://web-platform-dx.github.io/web-features-explorer/features/text-decoration-skip-ink-all/","group":"CSS & Layout","groupIndex":0},{"name":"background-clip: border-area","url":"https://web-platform-dx.github.io/web-features-explorer/features/background-clip-border-area/","group":"CSS & Layout","groupIndex":0},{"name":"Logical properties","url":"https://web-platform-dx.github.io/web-features-explorer/features/logical-properties/","group":"CSS & Layout","groupIndex":0},{"name":"text-decoration-skip-spaces","url":"https://web-platform-dx.github.io/web-features-explorer/features/text-decoration-skip-spaces/","group":"CSS & Layout","groupIndex":0},{"name":"border-radius","url":"https://web-platform-dx.github.io/web-features-explorer/features/border-radius/","group":"CSS & Layout","groupIndex":0},{"name":"Masks","url":"https://web-platform-dx.github.io/web-features-explorer/features/masks/","group":"CSS & Layout","groupIndex":0},{"name":"text-wrap","url":"https://web-platform-dx.github.io/web-features-explorer/features/text-wrap/","group":"CSS & Layout","groupIndex":0},{"name":"box-shadow","url":"https://web-platform-dx.github.io/web-features-explorer/features/box-shadow/","group":"CSS & Layout","groupIndex":0},{"name":"min(), max(), and clamp()","url":"https://web-platform-dx.github.io/web-features-explorer/features/min-max-clamp/","group":"CSS & Layout","groupIndex":0},{"name":"text-wrap: balance","url":"https://web-platform-dx.github.io/web-features-explorer/features/text-wrap-balance/","group":"CSS & Layout","groupIndex":0},{"name":"calc-size()","url":"https://web-platform-dx.github.io/web-features-explorer/features/calc-size/","group":"CSS & Layout","groupIndex":0},{"name":"mix-blend-mode","url":"https://web-platform-dx.github.io/web-features-explorer/features/mix-blend-mode/","group":"CSS & Layout","groupIndex":0},{"name":"text-wrap: pretty","url":"https://web-platform-dx.github.io/web-features-explorer/features/text-wrap-pretty/","group":"CSS & Layout","groupIndex":0},{"name":"Cascade layers","url":"https://web-platform-dx.github.io/web-features-explorer/features/cascade-layers/","group":"CSS & Layout","groupIndex":0},{"name":"Nesting","url":"https://web-platform-dx.github.io/web-features-explorer/features/nesting/","group":"CSS & Layout","groupIndex":0},{"name":"transition-behavior","url":"https://web-platform-dx.github.io/web-features-explorer/features/transition-behavior/","group":"CSS & Layout","groupIndex":0},{"name":"ch unit","url":"https://web-platform-dx.github.io/web-features-explorer/features/ch/","group":"CSS & Layout","groupIndex":0},{"name":"Oklab and OkLCh","url":"https://web-platform-dx.github.io/web-features-explorer/features/oklab/","group":"CSS & Layout","groupIndex":0},{"name":"Transitions (CSS)","url":"https://web-platform-dx.github.io/web-features-explorer/features/transitions/","group":"CSS & Layout","groupIndex":0},{"name":"clip-path","url":"https://web-platform-dx.github.io/web-features-explorer/features/clip-path/","group":"CSS & Layout","groupIndex":0},{"name":"overflow-clip-margin","url":"https://web-platform-dx.github.io/web-features-explorer/features/overflow-clip-margin/","group":"CSS & Layout","groupIndex":0},{"name":"Trigonometric functions (CSS)","url":"https://web-platform-dx.github.io/web-features-explorer/features/trig-functions/","group":"CSS & Layout","groupIndex":0},{"name":"color-mix()","url":"https://web-platform-dx.github.io/web-features-explorer/features/color-mix/","group":"CSS & Layout","groupIndex":0},{"name":"overflow-wrap","url":"https://web-platform-dx.github.io/web-features-explorer/features/overflow-wrap/","group":"CSS & Layout","groupIndex":0},{"name":"unset","url":"https://web-platform-dx.github.io/web-features-explorer/features/unset-value/","group":"CSS & Layout","groupIndex":0},{"name":"color-scheme","url":"https://web-platform-dx.github.io/web-features-explorer/features/color-scheme/","group":"CSS & Layout","groupIndex":0},{"name":"overflow: clip","url":"https://web-platform-dx.github.io/web-features-explorer/features/overflow-clip/","group":"CSS & Layout","groupIndex":0},{"name":"user-select","url":"https://web-platform-dx.github.io/web-features-explorer/features/user-select/","group":"CSS & Layout","groupIndex":0},{"name":"Conic gradients","url":"https://web-platform-dx.github.io/web-features-explorer/features/conic-gradients/","group":"CSS & Layout","groupIndex":0},{"name":"overlay","url":"https://web-platform-dx.github.io/web-features-explorer/features/overlay/","group":"CSS & Layout","groupIndex":0},{"name":"View transitions","url":"https://web-platform-dx.github.io/web-features-explorer/features/view-transitions/","group":"CSS & Layout","groupIndex":0},{"name":"Container queries (size)","url":"https://web-platform-dx.github.io/web-features-explorer/features/container-queries/","group":"CSS & Layout","groupIndex":0},{"name":"overscroll-behavior","url":"https://web-platform-dx.github.io/web-features-explorer/features/overscroll-behavior/","group":"CSS & Layout","groupIndex":0},{"name":"view-transition-class","url":"https://web-platform-dx.github.io/web-features-explorer/features/view-transition-class/","group":"CSS & Layout","groupIndex":0},{"name":"Container scroll-state queries","url":"https://web-platform-dx.github.io/web-features-explorer/features/container-scroll-state-queries/","group":"CSS & Layout","groupIndex":0},{"name":"prefers-color-scheme media query","url":"https://web-platform-dx.github.io/web-features-explorer/features/prefers-color-scheme/","group":"CSS & Layout","groupIndex":0},{"name":"Viewport units","url":"https://web-platform-dx.github.io/web-features-explorer/features/viewport-units/","group":"CSS & Layout","groupIndex":0},{"name":"Container style queries","url":"https://web-platform-dx.github.io/web-features-explorer/features/container-style-queries/","group":"CSS & Layout","groupIndex":0},{"name":"prefers-contrast media query","url":"https://web-platform-dx.github.io/web-features-explorer/features/prefers-contrast/","group":"CSS & Layout","groupIndex":0},{"name":"Web animations","url":"https://web-platform-dx.github.io/web-features-explorer/features/web-animations/","group":"CSS & Layout","groupIndex":0},{"name":"Content","url":"https://web-platform-dx.github.io/web-features-explorer/features/content/","group":"CSS & Layout","groupIndex":0},{"name":"prefers-reduced-motion media query","url":"https://web-platform-dx.github.io/web-features-explorer/features/prefers-reduced-motion/","group":"CSS & Layout","groupIndex":0},{"name":":autofill","url":"https://web-platform-dx.github.io/web-features-explorer/features/autofill/","group":"HTML & DOM","groupIndex":1},{"name":"&lt;slot>","url":"https://web-platform-dx.github.io/web-features-explorer/features/slot/","group":"HTML & DOM","groupIndex":1},{"name":"HTML streaming setters","url":"https://web-platform-dx.github.io/web-features-explorer/features/html-streaming-setters/","group":"HTML & DOM","groupIndex":1},{"name":":indeterminate","url":"https://web-platform-dx.github.io/web-features-explorer/features/indeterminate/","group":"HTML & DOM","groupIndex":1},{"name":"&lt;video>","url":"https://web-platform-dx.github.io/web-features-explorer/features/video/","group":"HTML & DOM","groupIndex":1},{"name":"HTML-in-canvas","url":"https://web-platform-dx.github.io/web-features-explorer/features/canvas-html/","group":"HTML & DOM","groupIndex":1},{"name":"&lt;audio>","url":"https://web-platform-dx.github.io/web-features-explorer/features/audio/","group":"HTML & DOM","groupIndex":1},{"name":"Autonomous custom elements","url":"https://web-platform-dx.github.io/web-features-explorer/features/autonomous-custom-elements/","group":"HTML & DOM","groupIndex":1},{"name":"inert","url":"https://web-platform-dx.github.io/web-features-explorer/features/inert/","group":"HTML & DOM","groupIndex":1},{"name":"&lt;details>","url":"https://web-platform-dx.github.io/web-features-explorer/features/details/","group":"HTML & DOM","groupIndex":1},{"name":"blocking=\"render\"","url":"https://web-platform-dx.github.io/web-features-explorer/features/blocking-render/","group":"HTML & DOM","groupIndex":1},{"name":"Interest invokers","url":"https://web-platform-dx.github.io/web-features-explorer/features/interest-invokers/","group":"HTML & DOM","groupIndex":1},{"name":"&lt;dialog closedby>","url":"https://web-platform-dx.github.io/web-features-explorer/features/dialog-closedby/","group":"HTML & DOM","groupIndex":1},{"name":"Customizable &lt;select>","url":"https://web-platform-dx.github.io/web-features-explorer/features/customizable-select/","group":"HTML & DOM","groupIndex":1},{"name":"Invoker commands","url":"https://web-platform-dx.github.io/web-features-explorer/features/invoker-commands/","group":"HTML & DOM","groupIndex":1},{"name":"&lt;dialog>","url":"https://web-platform-dx.github.io/web-features-explorer/features/dialog/","group":"HTML & DOM","groupIndex":1},{"name":"Declarative shadow DOM","url":"https://web-platform-dx.github.io/web-features-explorer/features/declarative-shadow-dom/","group":"HTML & DOM","groupIndex":1},{"name":"Lazy-loading media","url":"https://web-platform-dx.github.io/web-features-explorer/features/loading-lazy-media/","group":"HTML & DOM","groupIndex":1},{"name":"&lt;input type=\"checkbox\" switch>","url":"https://web-platform-dx.github.io/web-features-explorer/features/switch-control/","group":"HTML & DOM","groupIndex":1},{"name":"Email, telephone, and URL &lt;input> types","url":"https://web-platform-dx.github.io/web-features-explorer/features/input-email-tel-url/","group":"HTML & DOM","groupIndex":1},{"name":"moveBefore()","url":"https://web-platform-dx.github.io/web-features-explorer/features/move-before/","group":"HTML & DOM","groupIndex":1},{"name":"&lt;input type=\"range\">","url":"https://web-platform-dx.github.io/web-features-explorer/features/input-range/","group":"HTML & DOM","groupIndex":1},{"name":"Fetch priority","url":"https://web-platform-dx.github.io/web-features-explorer/features/fetch-priority/","group":"HTML & DOM","groupIndex":1},{"name":"MutationObserver","url":"https://web-platform-dx.github.io/web-features-explorer/features/mutationobserver/","group":"HTML & DOM","groupIndex":1},{"name":"&lt;input>","url":"https://web-platform-dx.github.io/web-features-explorer/features/input/","group":"HTML & DOM","groupIndex":1},{"name":"focusgroup","url":"https://web-platform-dx.github.io/web-features-explorer/features/focusgroup/","group":"HTML & DOM","groupIndex":1},{"name":"Mutually exclusive &lt;details> elements","url":"https://web-platform-dx.github.io/web-features-explorer/features/details-name/","group":"HTML & DOM","groupIndex":1},{"name":"&lt;link rel=\"expect\">","url":"https://web-platform-dx.github.io/web-features-explorer/features/link-rel-expect/","group":"HTML & DOM","groupIndex":1},{"name":"Form-associated custom elements","url":"https://web-platform-dx.github.io/web-features-explorer/features/form-associated-custom-elements/","group":"HTML & DOM","groupIndex":1},{"name":"Popover","url":"https://web-platform-dx.github.io/web-features-explorer/features/popover/","group":"HTML & DOM","groupIndex":1},{"name":"&lt;link rel=\"preload\">","url":"https://web-platform-dx.github.io/web-features-explorer/features/link-rel-preload/","group":"HTML & DOM","groupIndex":1},{"name":"hidden=\"until-found\"","url":"https://web-platform-dx.github.io/web-features-explorer/features/hidden-until-found/","group":"HTML & DOM","groupIndex":1},{"name":"popover=\"hint\"","url":"https://web-platform-dx.github.io/web-features-explorer/features/popover-hint/","group":"HTML & DOM","groupIndex":1},{"name":"&lt;progress>","url":"https://web-platform-dx.github.io/web-features-explorer/features/progress/","group":"HTML & DOM","groupIndex":1},{"name":"HTML setter methods","url":"https://web-platform-dx.github.io/web-features-explorer/features/html-setters/","group":"HTML & DOM","groupIndex":1},{"name":"Shadow DOM","url":"https://web-platform-dx.github.io/web-features-explorer/features/shadow-dom/","group":"HTML & DOM","groupIndex":1},{"name":"&lt;install>","url":"https://web-platform-dx.github.io/web-features-explorer/features/install/","group":"JavaScript & APIs","groupIndex":2},{"name":"integrity() for url()","url":"https://web-platform-dx.github.io/web-features-explorer/features/url-integrity/","group":"JavaScript & APIs","groupIndex":2},{"name":"Sanitizer API","url":"https://web-platform-dx.github.io/web-features-explorer/features/sanitizer/","group":"JavaScript & APIs","groupIndex":2},{"name":"&lt;meta name=\"text-scale\">","url":"https://web-platform-dx.github.io/web-features-explorer/features/meta-text-scale/","group":"JavaScript & APIs","groupIndex":2},{"name":"Interaction contentful paint performance entries","url":"https://web-platform-dx.github.io/web-features-explorer/features/interaction-contentful-paint/","group":"JavaScript & APIs","groupIndex":2},{"name":"Scheduler API","url":"https://web-platform-dx.github.io/web-features-explorer/features/scheduler/","group":"JavaScript & APIs","groupIndex":2},{"name":"&lt;template for>","url":"https://web-platform-dx.github.io/web-features-explorer/features/template-for/","group":"JavaScript & APIs","groupIndex":2},{"name":"Intersection observer","url":"https://web-platform-dx.github.io/web-features-explorer/features/intersection-observer/","group":"JavaScript & APIs","groupIndex":2},{"name":"Small, large, and dynamic viewport units","url":"https://web-platform-dx.github.io/web-features-explorer/features/viewport-unit-variants/","group":"JavaScript & APIs","groupIndex":2},{"name":"AbortController and AbortSignal","url":"https://web-platform-dx.github.io/web-features-explorer/features/aborting/","group":"JavaScript & APIs","groupIndex":2},{"name":"Intl.DurationFormat","url":"https://web-platform-dx.github.io/web-features-explorer/features/intl-duration-format/","group":"JavaScript & APIs","groupIndex":2},{"name":"Soft navigation performance entries","url":"https://web-platform-dx.github.io/web-features-explorer/features/soft-navigations/","group":"JavaScript & APIs","groupIndex":2},{"name":"ARIA attribute reflection","url":"https://web-platform-dx.github.io/web-features-explorer/features/aria-attribute-reflection/","group":"JavaScript & APIs","groupIndex":2},{"name":"Keyboard events","url":"https://web-platform-dx.github.io/web-features-explorer/features/keyboard-events/","group":"JavaScript & APIs","groupIndex":2},{"name":"Speculation rules","url":"https://web-platform-dx.github.io/web-features-explorer/features/speculation-rules/","group":"JavaScript & APIs","groupIndex":2},{"name":"ariaNotify()","url":"https://web-platform-dx.github.io/web-features-explorer/features/arianotify/","group":"JavaScript & APIs","groupIndex":2},{"name":"Language detector","url":"https://web-platform-dx.github.io/web-features-explorer/features/languagedetector/","group":"JavaScript & APIs","groupIndex":2},{"name":"Subresource integrity","url":"https://web-platform-dx.github.io/web-features-explorer/features/subresource-integrity/","group":"JavaScript & APIs","groupIndex":2},{"name":"Async clipboard","url":"https://web-platform-dx.github.io/web-features-explorer/features/async-clipboard/","group":"JavaScript & APIs","groupIndex":2},{"name":"LanguageModel","url":"https://web-platform-dx.github.io/web-features-explorer/features/languagemodel/","group":"JavaScript & APIs","groupIndex":2},{"name":"Summarizer","url":"https://web-platform-dx.github.io/web-features-explorer/features/summarizer/","group":"JavaScript & APIs","groupIndex":2},{"name":"autocorrect","url":"https://web-platform-dx.github.io/web-features-explorer/features/autocorrect/","group":"JavaScript & APIs","groupIndex":2},{"name":"Lazy-loading images and iframes","url":"https://web-platform-dx.github.io/web-features-explorer/features/loading-lazy/","group":"JavaScript & APIs","groupIndex":2},{"name":"SVG","url":"https://web-platform-dx.github.io/web-features-explorer/features/svg/","group":"JavaScript & APIs","groupIndex":2},{"name":"beforeinstallprompt","url":"https://web-platform-dx.github.io/web-features-explorer/features/beforeinstallprompt/","group":"JavaScript & APIs","groupIndex":2},{"name":"light-dark() image values","url":"https://web-platform-dx.github.io/web-features-explorer/features/light-dark-image/","group":"JavaScript & APIs","groupIndex":2},{"name":"Temporal","url":"https://web-platform-dx.github.io/web-features-explorer/features/temporal/","group":"JavaScript & APIs","groupIndex":2},{"name":"border-shape","url":"https://web-platform-dx.github.io/web-features-explorer/features/border-shape/","group":"JavaScript & APIs","groupIndex":2},{"name":"Local network access","url":"https://web-platform-dx.github.io/web-features-explorer/features/local-network-access/","group":"JavaScript & APIs","groupIndex":2},{"name":"text-decoration-inset","url":"https://web-platform-dx.github.io/web-features-explorer/features/tmp-text-decoration-inset/","group":"JavaScript & APIs","groupIndex":2},{"name":"Connection allowlists","url":"https://web-platform-dx.github.io/web-features-explorer/features/connection-allowlists/","group":"JavaScript & APIs","groupIndex":2},{"name":"Long animation frames performance entries","url":"https://web-platform-dx.github.io/web-features-explorer/features/long-animation-frames/","group":"JavaScript & APIs","groupIndex":2},{"name":"text-fit","url":"https://web-platform-dx.github.io/web-features-explorer/features/text-fit/","group":"JavaScript & APIs","groupIndex":2},{"name":"corner-shape","url":"https://web-platform-dx.github.io/web-features-explorer/features/corner-shape/","group":"JavaScript & APIs","groupIndex":2},{"name":"long-animation-frames-style-layout","url":"https://web-platform-dx.github.io/web-features-explorer/features/tmp-long-animation-frames-style-layout/","group":"JavaScript & APIs","groupIndex":2},{"name":"Top-level await","url":"https://web-platform-dx.github.io/web-features-explorer/features/top-level-await/","group":"JavaScript & APIs","groupIndex":2},{"name":"Credential management","url":"https://web-platform-dx.github.io/web-features-explorer/features/credential-management/","group":"JavaScript & APIs","groupIndex":2},{"name":"Navigation API","url":"https://web-platform-dx.github.io/web-features-explorer/features/navigation/","group":"JavaScript & APIs","groupIndex":2},{"name":"touch-action","url":"https://web-platform-dx.github.io/web-features-explorer/features/touch-action/","group":"JavaScript & APIs","groupIndex":2},{"name":"cross-origin() for url()","url":"https://web-platform-dx.github.io/web-features-explorer/features/url-cross-origin/","group":"JavaScript & APIs","groupIndex":2},{"name":"navigator.install()","url":"https://web-platform-dx.github.io/web-features-explorer/features/navigator-install/","group":"JavaScript & APIs","groupIndex":2},{"name":"Translator","url":"https://web-platform-dx.github.io/web-features-explorer/features/translator/","group":"JavaScript & APIs","groupIndex":2},{"name":"document.modelContext","url":"https://web-platform-dx.github.io/web-features-explorer/features/document-modelcontext/","group":"JavaScript & APIs","groupIndex":2},{"name":"Origin","url":"https://web-platform-dx.github.io/web-features-explorer/features/origin/","group":"JavaScript & APIs","groupIndex":2},{"name":"Trusted types","url":"https://web-platform-dx.github.io/web-features-explorer/features/trusted-types/","group":"JavaScript & APIs","groupIndex":2},{"name":"email-verification","url":"https://web-platform-dx.github.io/web-features-explorer/features/tmp-email-verification/","group":"JavaScript & APIs","groupIndex":2},{"name":"Page visibility","url":"https://web-platform-dx.github.io/web-features-explorer/features/page-visibility/","group":"JavaScript & APIs","groupIndex":2},{"name":"User agent client hints","url":"https://web-platform-dx.github.io/web-features-explorer/features/ua-client-hints/","group":"JavaScript & APIs","groupIndex":2},{"name":"enterkeyhint","url":"https://web-platform-dx.github.io/web-features-explorer/features/enterkeyhint/","group":"JavaScript & APIs","groupIndex":2},{"name":"Page visibility state performance entries","url":"https://web-platform-dx.github.io/web-features-explorer/features/page-visibility-state/","group":"JavaScript & APIs","groupIndex":2},{"name":"Web app manifest","url":"https://web-platform-dx.github.io/web-features-explorer/features/manifest/","group":"JavaScript & APIs","groupIndex":2},{"name":"Event timing performance entries","url":"https://web-platform-dx.github.io/web-features-explorer/features/event-timing/","group":"JavaScript & APIs","groupIndex":2},{"name":"Partitioned cookies","url":"https://web-platform-dx.github.io/web-features-explorer/features/partitioned-cookies/","group":"JavaScript & APIs","groupIndex":2},{"name":"Web app origin migration","url":"https://web-platform-dx.github.io/web-features-explorer/features/app-migration/","group":"JavaScript & APIs","groupIndex":2},{"name":"Federated credential management","url":"https://web-platform-dx.github.io/web-features-explorer/features/fedcm/","group":"JavaScript & APIs","groupIndex":2},{"name":"Password credentials","url":"https://web-platform-dx.github.io/web-features-explorer/features/password-credentials/","group":"JavaScript & APIs","groupIndex":2},{"name":"Web authentication","url":"https://web-platform-dx.github.io/web-features-explorer/features/webauthn/","group":"JavaScript & APIs","groupIndex":2},{"name":"Fetch","url":"https://web-platform-dx.github.io/web-features-explorer/features/fetch/","group":"JavaScript & APIs","groupIndex":2},{"name":"Permissions policy","url":"https://web-platform-dx.github.io/web-features-explorer/features/permissions-policy/","group":"JavaScript & APIs","groupIndex":2},{"name":"Web authentication signal methods","url":"https://web-platform-dx.github.io/web-features-explorer/features/webauthn-signals/","group":"JavaScript & APIs","groupIndex":2},{"name":"fetchLater","url":"https://web-platform-dx.github.io/web-features-explorer/features/fetchlater/","group":"JavaScript & APIs","groupIndex":2},{"name":"Pointer Events","url":"https://web-platform-dx.github.io/web-features-explorer/features/pointer-events-api/","group":"JavaScript & APIs","groupIndex":2},{"name":"Web Cryptography","url":"https://web-platform-dx.github.io/web-features-explorer/features/web-cryptography/","group":"JavaScript & APIs","groupIndex":2},{"name":"Form-associated WebMCP attributes","url":"https://web-platform-dx.github.io/web-features-explorer/features/declarative-webmcp/","group":"JavaScript & APIs","groupIndex":2},{"name":"Referrer policy","url":"https://web-platform-dx.github.io/web-features-explorer/features/referrer-policy/","group":"JavaScript & APIs","groupIndex":2},{"name":"WebAssembly","url":"https://web-platform-dx.github.io/web-features-explorer/features/wasm/","group":"JavaScript & APIs","groupIndex":2},{"name":"HTML processing instructions","url":"https://web-platform-dx.github.io/web-features-explorer/features/html-processing-instructions/","group":"JavaScript & APIs","groupIndex":2},{"name":"referrer-policy() for url()","url":"https://web-platform-dx.github.io/web-features-explorer/features/url-referrer-policy/","group":"JavaScript & APIs","groupIndex":2},{"name":"webcrypto-modern-algos","url":"https://web-platform-dx.github.io/web-features-explorer/features/tmp-webcrypto-modern-algos/","group":"JavaScript & APIs","groupIndex":2},{"name":"image()","url":"https://web-platform-dx.github.io/web-features-explorer/features/image-function/","group":"JavaScript & APIs","groupIndex":2},{"name":"Registered custom properties","url":"https://web-platform-dx.github.io/web-features-explorer/features/registered-custom-properties/","group":"JavaScript & APIs","groupIndex":2},{"name":"WebOTP","url":"https://web-platform-dx.github.io/web-features-explorer/features/web-otp/","group":"JavaScript & APIs","groupIndex":2},{"name":"inputmode","url":"https://web-platform-dx.github.io/web-features-explorer/features/inputmode/","group":"JavaScript & APIs","groupIndex":2},{"name":"Resize observer","url":"https://web-platform-dx.github.io/web-features-explorer/features/resize-observer/","group":"JavaScript & APIs","groupIndex":2}],"usecases":[{"id":"accessible-error-announcement","cat":"accessibility","desc":"Synchronize programmatic accessibility states (like aria-invalid) with the visual :user-invalid state to ensure screen reader users receive error feedback only after interaction, mirroring the visual experience.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/accessibility/accessible-error-announcement.md"},{"id":"accessible-generated-content","cat":"accessibility","desc":"Use CSS generated content (`::before`/`::after`) in ways that stay accessible, including alternative text for decorative content.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/accessibility/accessible-generated-content.md"},{"id":"respect-os-text-scale","cat":"accessibility","desc":"Respect the operating system's text scale preference for a page so font sizes, layout, and rem-based measurements follow the user's accessibility settings.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/accessibility/respect-os-text-scale.md"},{"id":"language-detection","cat":"built-in-ai","desc":"Detect the language of user-generated content or already present site content.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/built-in-ai/language-detection.md"},{"id":"language-model","cat":"built-in-ai","desc":"Run on-device natural language inference in the browser using the Prompt API, with streaming output, structured JSON responses, and multi-turn session management.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/built-in-ai/language-model.md"},{"id":"summarizer","cat":"built-in-ai","desc":"Summarize text content using the on-device Summarizer API.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/built-in-ai/summarizer.md"},{"id":"translator","cat":"built-in-ai","desc":"Translate text between languages using the on-device Translator API.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/built-in-ai/translator.md"},{"id":"animate-to-intrinsic-sizes","cat":"css","desc":"Smoothly animate interactive components (like accordions, menus, and expanding cards) to and from their natural dimensions.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/animate-to-intrinsic-sizes.md"},{"id":"atrule-support-conditionals","cat":"css","desc":"Conditionally apply certain CSS rules or declarations only if a certain at-rule is supported by the browser.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/atrule-support-conditionals.md"},{"id":"calculate-with-intrinsic-sizes","cat":"css","desc":"Calculate the size of an element based on its intrinsic size, while ensuring it fits within given design constraints.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/calculate-with-intrinsic-sizes.md"},{"id":"child-state-based-styling","cat":"css","desc":"Build a component that changes its styling based on the state of one of its child elements. For example, a component that renders in light or dark mode based on whether a theme toggle is checked (or not).","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/child-state-based-styling.md"},{"id":"content-based-styling","cat":"css","desc":"Build a component that changes its layout based on whether it contains specific child elements (or not). For example, if the component contains an image, use a multi-column layout, otherwise default to a single-column layout.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/content-based-styling.md"},{"id":"css","cat":"css","desc":"Action-oriented guidelines for modern CSS architecture, including the cascade, selectors, scoping, nesting, and design tokens. Use this guide when authoring styles or managing design systems.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/css.md"},{"id":"css-layout","cat":"css","desc":"Modern CSS layouts such as flexbox, grid, subgrid, container queries, anchor positioning, and intrinsic sizing. Use this skill when architecting responsive UI components or page layouts.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/css-layout.md"},{"id":"design-token-reactivity","cat":"css","desc":"Define higher-order design tokens, like density modes (compact, comfortable, spacious) or themes and have descendant components react to changes directly and in component-appropriate ways.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/design-token-reactivity.md"},{"id":"dynamic-sibling-styling","cat":"css","desc":"Create dynamic visual spectrums or layout arrangements that automatically adapt to the number of elements in a group.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/dynamic-sibling-styling.md"},{"id":"fluid-scaling","cat":"css","desc":"Scale items like font size, spacing, and media sizes smoothly based on the parent container's size rather than using fixed breakpoints","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/fluid-scaling.md"},{"id":"individual-transform-properties","cat":"css","desc":"Animate or override individual CSS transform properties (e.g. translate, rotate, scale) independently of other transform properties on a single element.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/individual-transform-properties.md"},{"id":"overflow-clipping-control","cat":"css","desc":"Adjust the visible clipping boundary of an element to align with the content edge, padding edge, or border edge—or a specified offset from any of these—offering finer-grained control over how content is clipped.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/overflow-clipping-control.md"},{"id":"reduce-style-repetition","cat":"css","desc":"Reduce excessive style repetition by encapsulating complex or dynamic styling logic into reusable functions (such as a function that computes a gradient based on a set of input parameters).","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/reduce-style-repetition.md"},{"id":"responsive-design","cat":"css","desc":"Build UI that adapts to container and viewport size, including container queries, dynamic viewport units, aspect ratios, and responsive typography.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/responsive-design.md"},{"id":"selector-atrule-combinations","cat":"css","desc":"Target elements based on the intersection or union of selectors and conditional @-rules while minimizing repetition.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/selector-atrule-combinations.md"},{"id":"size-aware-styling","cat":"css","desc":"Build a component whose styles can be conditionally dependent on its own width or height, rather than the width or height of the viewport. For example a card component that can change its layouts depending on how large it is, or a call-to-action button that can conditionally display helper text based on its width.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/size-aware-styling.md"},{"id":"style-parent-with-has","cat":"css","desc":"Style parent elements of a form field (e.g. labels or fieldsets) when the field is invalid.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/style-parent-with-has.md"},{"id":"usage-aware-component-variations","cat":"css","desc":"Build components that adapt visual logic based on semantic context using CSS container style queries.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/usage-aware-component-variations.md"},{"id":"animated-select-picker","cat":"forms","desc":"Create a custom select component whose dropdown is animated. For example, the menu fades or slides into view, or the options animate upon selection.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/forms/animated-select-picker.md"},{"id":"autofill-address-form","cat":"forms","desc":"Build an address form with correct autocomplete attributes and autofill support.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/forms/autofill-address-form.md"},{"id":"autofill-highlight-inputs","cat":"forms","desc":"Customize the styling of form fields that have been autofilled and not edited by the user","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/forms/autofill-highlight-inputs.md"},{"id":"autofill-payment-form","cat":"forms","desc":"Build a payment form that collects card details with correct autocomplete values and autofill support.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/forms/autofill-payment-form.md"},{"id":"autofill-sign-in-form","cat":"forms","desc":"Build a sign-in form with correct autocomplete values and autofill support.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/forms/autofill-sign-in-form.md"},{"id":"autofill-sign-up-form","cat":"forms","desc":"Build a sign-up form with correct autocomplete values and autofill support.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/forms/autofill-sign-up-form.md"},{"id":"brand-consistent-forms","cat":"forms","desc":"Match checkboxes, radio buttons, range sliders, and progress bars to your site's color palette without replacing them with custom components.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/forms/brand-consistent-forms.md"},{"id":"branded-select-styling","cat":"forms","desc":"Create custom select elements whose button, picker, arrow icon, and checkmark all seamlessly match your brand or design system's typography, colors, spacing, and border treatments.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/forms/branded-select-styling.md"},{"id":"custom-select-picker-layouts","cat":"forms","desc":"Create custom select pickers whose options are positioned in unique or interesting ways, rather than the traditional stacked list of options.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/forms/custom-select-picker-layouts.md"},{"id":"form-fields-automatically-fit-contents","cat":"forms","desc":"Allow form fields to grow and shrink to fit the user input, e.g. as the user types or selects a different option. Apply maximum and minimum size limits to create dynamic and responsive form fields that conform with the page design.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/forms/form-fields-automatically-fit-contents.md"},{"id":"ime-safe-enter-submit","cat":"forms","desc":"Implement Enter-to-submit in textareas and single-line inputs (chat, search, inline rename) safely for IME (Input Method Editor) users to prevent submitting incomplete text.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/forms/ime-safe-enter-submit.md"},{"id":"required-field-feedback","cat":"forms","desc":"Provide error message for required form fields that were skipped or left empty *only* after user interaction, to avoid preemptive errors and ensure feedback is timely and contextually relevant to the user's flow.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/forms/required-field-feedback.md"},{"id":"rich-media-picker","cat":"forms","desc":"Create a custom select component whose options can contain complex HTML formatting (e.g. images, icons, and other rich formatting) rather than just plain text.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/forms/rich-media-picker.md"},{"id":"select-menu-interaction","cat":"forms","desc":"Validate that a non-default option has been chosen in a select menu only after the user has interacted with the control.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/forms/select-menu-interaction.md"},{"id":"slider","cat":"forms","desc":"Style a native range slider with custom track, thumb, fill, and focus states while preserving native functionality and accessibility.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/forms/slider.md"},{"id":"sms-otp-form","cat":"forms","desc":"Verify user phone numbers and one-time passcodes delivered over SMS with automatic code extraction and accessible form input.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/forms/sms-otp-form.md"},{"id":"switch","cat":"forms","desc":"Build an accessible switch with the native HTML switch attribute, falling back to a styled checkbox when not supported.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/forms/switch.md"},{"id":"validate-input-after-interaction","cat":"forms","desc":"Show form field validation feedback (e.g. password complexity or email format requirements) only after the user has finished their initial interaction, avoiding premature errors on page load or while the user is typing.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/forms/validate-input-after-interaction.md"},{"id":"accessible-web-components","cat":"html","desc":"Make custom elements accessible by default, setting roles and ARIA state via the ElementInternals ARIA mixin, managing focus with delegatesFocus, and keeping ARIA relationships within a single shadow root.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/html/accessible-web-components.md"},{"id":"custom-elements","cat":"html","desc":"Define, register, and manage the lifecycle of autonomous custom elements, covering constructor rules, lifecycle callbacks, upgrade timing, attribute/property reflection, and naming conventions.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/html/custom-elements.md"},{"id":"form-associated-custom-elements","cat":"html","desc":"Make a custom control participate natively in forms with formAssociated and ElementInternals, submitting its own value, integrating with constraint validation, and reacting to reset, disable, and state-restore.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/html/form-associated-custom-elements.md"},{"id":"prerendering-custom-elements","cat":"html","desc":"Server-render a custom element, then hydrate it in place without re-rendering or a flash of unstyled content.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/html/prerendering-custom-elements.md"},{"id":"shadow-dom","cat":"html","desc":"Encapsulate a component's DOM and styles with Shadow DOM, construct the tree efficiently with HTML templates, and project consumer content with slots.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/html/shadow-dom.md"},{"id":"styling-web-components","cat":"html","desc":"Style across the shadow boundary with :host selectors, inherited and custom properties for theming, ::slotted and ::part, and cascade layers and container queries inside components.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/html/styling-web-components.md"},{"id":"web-components","cat":"html","desc":"Orientation and cross-cutting principles for authoring and using Web Components, covering Custom Elements, Shadow DOM, templates and slots, Declarative Shadow DOM, styling across the shadow boundary, Form-Associated Custom Elements, and accessibility requirements. Use this guide when building reusable UI components, design systems, or server-rendered custom elements.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/html/web-components.md"},{"id":"calculate-event-differentials","cat":"js","desc":"Calculate elapsed or remaining time between dates and times, balance duration units, and format human-readable localized durations using Temporal.Duration and Intl.DurationFormat.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/js/calculate-event-differentials.md"},{"id":"capture-location-agnostic-data","cat":"js","desc":"Model location-agnostic calendar dates, wall-clock times, partial dates (recurring birthdays, credit card expirations), and recurring monthly intervals without time zone drift using Temporal Plain types.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/js/capture-location-agnostic-data.md"},{"id":"coordinate-global-events","cat":"js","desc":"Schedule future meetings or events by explicitly binding them to a geographical IANA time zone so that event times remain accurate regardless of Daylight Saving Time (DST) transitions, \"skipped\" or \"repeated\" hours during clock changes.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/js/coordinate-global-events.md"},{"id":"sort-high-precision-timestamps","cat":"js","desc":"Parse, sort, and measure intervals between sub-millisecond or nanosecond ISO 8601 timestamps without Date truncation collisions using Temporal.Instant.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/js/sort-high-precision-timestamps.md"},{"id":"support-global-calendar-systems","cat":"js","desc":"Display and calculate dates in non-Gregorian calendar systems (e.g., Islamic, Hebrew, or Chinese) accurately for international users.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/js/support-global-calendar-systems.md"},{"id":"batch-analytics-events","cat":"performance","desc":"Debounce and batch multiple analytics, telemetry, and Core Web Vitals events together in a single beacon to minimize network contention and reduce server load, while still delivering real-time updates.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/batch-analytics-events.md"},{"id":"break-up-long-tasks","cat":"performance","desc":"Break up heavy synchronous processing (complex computations and/or long loops) or DOM updates to improve Interaction to Next Paint (INP) responsiveness and let the browser handle user input and repaint the screen.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/break-up-long-tasks.md"},{"id":"calculate-total-foreground-time","cat":"performance","desc":"Calculate the total time a user actually spent viewing a page, excluding periods when the tab was in the background.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/calculate-total-foreground-time.md"},{"id":"conditional-async-dependencies","cat":"performance","desc":"Conditionally load or initialize async dependencies (such as importing polyfills for missing web features) without requiring complex orchestration across all of a page's script dependencies.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/conditional-async-dependencies.md"},{"id":"defer-rendering-heavy-content","cat":"performance","desc":"Reduce rendering times in content-heavy web pages (e.g. pages with long feeds, lots of articles, or complex dashboards), by deferring rendering for any content that is not immediately visible to the user.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/defer-rendering-heavy-content.md"},{"id":"defer-work-until-scroll-ends","cat":"performance","desc":"Defer expensive operations like DOM updates, data fetching, analytics tracking, or layout recalculation until after scrolling completes to maintain smooth scroll performance.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/defer-work-until-scroll-ends.md"},{"id":"deliver-optimized-decorative-images","cat":"performance","desc":"Deliver optimized decorative images (such as backgrounds, UI icons, or complex masks) by simultaneously providing next-generation image formats (like AVIF or WebP) alongside multiple pixel densities (like 1x and 2x) so the browser can dynamically negotiate the best combination of file size and visual quality for the user's device capabilities.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/deliver-optimized-decorative-images.md"},{"id":"deprioritize-background-fetches","cat":"performance","desc":"Deprioritize background data fetches made with the Fetch API to prevent network contention with user-initiated requests.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/deprioritize-background-fetches.md"},{"id":"detect-initial-visibility-state","cat":"performance","desc":"Reliably determine whether a page was initially loaded in the background, even in cases where the script is loaded asynchronously after the user foregrounded the page.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/detect-initial-visibility-state.md"},{"id":"efficient-background-processing","cat":"performance","desc":"Conserve system resources and battery life by pausing background JavaScript execution (such as `&lt;canvas&gt;` animations, WebGL rendering, or high-frequency WebSocket data polling) when the component is off-screen and then resume them just-in-time when they scroll back into view.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/efficient-background-processing.md"},{"id":"faster-spa-view-transitions","cat":"performance","desc":"Enable faster transitions back to previously visited views in a Single-Page Application (SPA) by preserving their structural DOM state instead of destroying and rebuilding them on every navigation.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/faster-spa-view-transitions.md"},{"id":"flicker-free-client-side-ab-testing","cat":"performance","desc":"Deliver and render A/B tests, multi-variate tests, or other experiments using client-side JavaScript to alter or inject HTML, CSS, and JavaScript without the original content showing first before flickering or flashing to show the experiment content.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/flicker-free-client-side-ab-testing.md"},{"id":"full-session-analytics","cat":"performance","desc":"Reliably track analytics, Core Web Vitals, errors, and telemetry data across the user's entire page visit, and defer sending of the data until the user leaves the page.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/full-session-analytics.md"},{"id":"identify-heavy-scripts","cat":"performance","desc":"Identify the scripts most responsible for long animation frames","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/identify-heavy-scripts.md"},{"id":"identify-inp-causes","cat":"performance","desc":"Identify slow-running JavaScript and other causes of poor Interaction to Next Paint (INP) responsiveness.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/identify-inp-causes.md"},{"id":"improve-next-page-load-performance","cat":"performance","desc":"Improve page load performance by prefetching or prerendering pages that the user is likely to visit next.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/improve-next-page-load-performance.md"},{"id":"interaction-paint-timing","cat":"performance","desc":"Measure the time it takes for user interactions and client-side navigations to render new contentful updates on screen.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/interaction-paint-timing.md"},{"id":"interactions-in-complex-layouts","cat":"performance","desc":"Make interactions snappier and more responsive (reducing Interaction to Next Paint (INP) scores) by avoiding layout re-calculations in complex layouts, such as data-heavy dashboards or spreadsheet-style grids.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/interactions-in-complex-layouts.md"},{"id":"lazy-load-video-and-audio","cat":"performance","desc":"Defer downloading offscreen video and audio assets, including video poster images and preloaded media data, until the media player approaches the viewport to conserve bandwidth and reduce network contention during initial page load.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/lazy-load-video-and-audio.md"},{"id":"optimize-image-priority","cat":"performance","desc":"Optimize the loading priority of Largest Contentful Paint (LCP) candidate images and deprioritize non-critical images to reduce critical resource load delays.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/optimize-image-priority.md"},{"id":"optimize-preload-priority","cat":"performance","desc":"Optimize the relative priority of preloaded content to reduce critical resource load delays.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/optimize-preload-priority.md"},{"id":"optimize-script-priority","cat":"performance","desc":"Optimize the loading priority of scripts by boosting critical asynchronous scripts and deprioritizing non-essential or late-body scripts to improve sequencing and reduce delays.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/optimize-script-priority.md"},{"id":"out-of-order-html-streaming","cat":"performance","desc":"Declaratively update a page with content streamed later into the same HTML document or via imperative JavaScript APIs.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/out-of-order-html-streaming.md"},{"id":"resolution-optimized-pseudo-elements","cat":"performance","desc":"Use resolution-optimized images in CSS pseudo-elements (such as `::before` and `::after`) to reduce the number of DOM nodes.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/resolution-optimized-pseudo-elements.md"},{"id":"schedule-tasks-by-priority","cat":"performance","desc":"Schedule tasks with different priorities to ensure critical work runs first while background work is deferred.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/schedule-tasks-by-priority.md"},{"id":"privacy","cat":"privacy","desc":"Action-oriented guidelines for web developers to implement privacy by design, data minimization, third-party audits, and secure data handling. Use this skill when designing applications, integrating third-party services, handling user data, or configuring security headers.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/privacy/privacy.md"},{"id":"install-web-app","cat":"pwa","desc":"Install web applications from a page using browser-controlled consent UI.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/pwa/install-web-app.md"},{"id":"migrate-web-app-origin","cat":"pwa","desc":"Transfer an installed web app to a new origin while preserving user configuration and OS-level shortcuts.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/pwa/migrate-web-app-origin.md"},{"id":"client-side-encryption","cat":"security","desc":"Establish shared secrets using public-key encapsulation or key agreement—including hybrid and post-quantum protection—and encrypt sensitive data in the browser with authenticated encryption.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/client-side-encryption.md"},{"id":"digital-signatures","cat":"security","desc":"Sign and verify messages, tokens, or artifacts in the browser using classical or quantum-resistant (post-quantum) asymmetric keys to ensure data integrity and authenticity.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/digital-signatures.md"},{"id":"local-network-access","cat":"security","desc":"Access resources on a user's local network or loopback interface from a public web application.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/local-network-access.md"},{"id":"passkey-authentication","cat":"security","desc":"Authenticate a returning user with a passkey for primary sign-in.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/passkey-authentication.md"},{"id":"passkey-conditional-create","cat":"security","desc":"Silently register a passkey for an existing user after a successful password login.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/passkey-conditional-create.md"},{"id":"passkey-management","cat":"security","desc":"Let users view and manage the passkeys registered to their account.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/passkey-management.md"},{"id":"passkey-reauthentication","cat":"security","desc":"Verify a signed-in user's identity using their existing passkeys before a sensitive action.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/passkey-reauthentication.md"},{"id":"passkey-registration","cat":"security","desc":"Register a passkey for an existing user account.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/passkey-registration.md"},{"id":"passkeys","cat":"security","desc":"Comprehensive orientation and cross-cutting principles for implementing WebAuthn and Passkeys in web applications. Use this guide when handling passkey registration, authentication, management, or reauthentication.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/passkeys.md"},{"id":"quick-sign-ins","cat":"security","desc":"Authenticate returning users in place with their saved passkeys or passwords before navigating to a sign-in page or interrupting their workflow.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/quick-sign-ins.md"},{"id":"restrict-outbound-connections","cat":"security","desc":"Restrict a page or worker to communicating only with an explicit allowlist of network endpoints to prevent unauthorized third-party requests and client-side data exfiltration.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/restrict-outbound-connections.md"},{"id":"sanitize-untrusted-html","cat":"security","desc":"Safely parse and display untrusted HTML content from user input by removing unsafe elements and attributes.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/sanitize-untrusted-html.md"},{"id":"secure-external-subresources","cat":"security","desc":"Verify the cryptographic integrity of external scripts, stylesheets, fonts, and images loaded from third-party origins, and control whether those requests send credentials or referrer URLs.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/secure-external-subresources.md"},{"id":"trusted-types","cat":"security","desc":"Prevent DOM-based XSS attacks by defining a Trusted Types policy to sanitize untrusted HTML, using the policy when writing to DOM sinks like innerHTML, and enforcing Trusted Types via Content Security Policy.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/trusted-types.md"},{"id":"validate-origins","cat":"security","desc":"Compare and validate web origins and sites safely across cross-document messages and URLs without error-prone string parsing.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/validate-origins.md"},{"id":"verify-email-ownership","cat":"security","desc":"Verify that a user owns an email address during account creation, sign-in, or recovery without sending a one-time passcode or magic link email.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/verify-email-ownership.md"},{"id":"carousel-slide-effects","cat":"ui-atoms","desc":"Create a carousel of slides with images or other visual elements, where each slide animates as they enter/center/exit their scroller. For example, the slides may fade-in/fade-out, rotate, get bigger or smaller, etc.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-atoms/carousel-slide-effects.md"},{"id":"component-specific-light-dark-theme","cat":"ui-atoms","desc":"Force certain elements to be in light mode or dark mode (e.g. code blocks, media players, etc) independently of the page's color-scheme.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-atoms/component-specific-light-dark-theme.md"},{"id":"icons","cat":"ui-atoms","desc":"Display and manage icons that can be set and parameterized from CSS, are fast to load, crisp at any resolution and are properly exposed to (or hidden from) assistive technologies.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-atoms/icons.md"},{"id":"position-aware-tooltips","cat":"ui-atoms","desc":"Build tooltips and popovers with directional arrows (or other visual styling) that automatically point the correct way when the element flips to a fallback position.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-atoms/position-aware-tooltips.md"},{"id":"pull-to-reveal","cat":"ui-atoms","desc":"Build a pull-to-reveal feature that would enable the user to pull down on the screen to reveal more content, like a search bar.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-atoms/pull-to-reveal.md"},{"id":"responsive-table","cat":"ui-atoms","desc":"Build a data table that presents tabular data with proper header semantics, and remains readable and navigable on small screens and with assistive technologies.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-atoms/responsive-table.md"},{"id":"scroll-position-aware-elements","cat":"ui-atoms","desc":"Build floating buttons or widgets (back-to-top, scroll-to-bottom, chat launchers, etc.) that appear and disappear based on whether the user has scrolled at all.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-atoms/scroll-position-aware-elements.md"},{"id":"scroll-progress-indicator","cat":"ui-atoms","desc":"Create a scroll progress bar, stepped progress tracker, or any visual affordance that communicates how far through a page or section the user has scrolled.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-atoms/scroll-progress-indicator.md"},{"id":"scrollability-affordance-hints","cat":"ui-atoms","desc":"Build scroll shadows or fading edges that appear only when there's actually more content to scroll to in that direction.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-atoms/scrollability-affordance-hints.md"},{"id":"shrinking-header-on-scroll","cat":"ui-atoms","desc":"Smoothly animate a fixed header or full-page cover on scroll to dynamically shrink, gain shadows, and transform its layout over a predefined scroll distance.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-atoms/shrinking-header-on-scroll.md"},{"id":"single-line-overflow","cat":"ui-atoms","desc":"Show text that must stay on one line, such as a tab label, table cell, navigation item, or file name, in a space it may not fit, without breaking the layout or losing the text.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-atoms/single-line-overflow.md"},{"id":"state-aware-sticky-headers","cat":"ui-atoms","desc":"Build sticky section headers or navbars that visually transform when they're actually \"stuck\" at the top, changing their color scheme or gaining a shadow.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-atoms/state-aware-sticky-headers.md"},{"id":"viewport-aware-dropdowns","cat":"ui-atoms","desc":"Position dropdowns, flyouts, or contextual action panels tethered to a trigger button so they automatically flip axes at viewport edges instead of getting clipped.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-atoms/viewport-aware-dropdowns.md"},{"id":"2d-panning","cat":"ui-behaviors","desc":"Allow users to freely pan or scroll two-dimensional surfaces—such as maps, zoomed images, infinite canvases, or large data grids—across both directions (whether diagonally or changing direction mid-gesture) without the gesture locking to a single horizontal or vertical axis.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/2d-panning.md"},{"id":"anchor-positioning-tab-underline","cat":"ui-behaviors","desc":"Transition an element seamlessly between two target element positions. For example, moving a selected tab underline between the previously selected tab and the currently selected tab.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/anchor-positioning-tab-underline.md"},{"id":"animate-element-entry-exit","cat":"ui-behaviors","desc":"Smoothly hide/show elements as they are added/removed from the DOM or as their display values are toggled.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/animate-element-entry-exit.md"},{"id":"animate-to-from-top-layer","cat":"ui-behaviors","desc":"Animate elements such as dialogs, popovers, and tooltips as they're entering/exiting the top layer.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/animate-to-from-top-layer.md"},{"id":"carousel-snap-highlights","cat":"ui-behaviors","desc":"Visually highlight the currently snapped non-interactive item in scroll-snapping carousels, galleries, or full-page swipe experiences. For example, expanding a card when snapped, or revealing hidden content.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/carousel-snap-highlights.md"},{"id":"consistent-cross-document-transitions","cat":"ui-behaviors","desc":"Ensure critical page state is loaded and stable before initiating a cross-document view transition. This means critical CSS styles are loaded and applied, critical JavaScript is loaded and run, and the HTML visible for the user's initial view of the page has been parsed before the transition runs.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/consistent-cross-document-transitions.md"},{"id":"cross-document-transitions","cat":"ui-behaviors","desc":"Create smooth, seamless transitions between full page navigations, such as cross-fades, custom reveal effects, or morphing of content from one page to the next.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/cross-document-transitions.md"},{"id":"custom-button-actions","cat":"ui-behaviors","desc":"Declaratively connect a button to any element to trigger custom, application-specific actions using declarative button commands, invoker commands, button commands, custom commands, or declarative toggle actions.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/custom-button-actions.md"},{"id":"declarative-dialog-popover-control","cat":"ui-behaviors","desc":"Toggle the visibility of a dialog or popover from a button without writing JavaScript.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/declarative-dialog-popover-control.md"},{"id":"directional-navigation-transitions","cat":"ui-behaviors","desc":"Animate visual state changes to reflect the direction of a user's navigational flow, such as sliding new content in from the right when advancing forward or from the left when returning to a previous screen.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/directional-navigation-transitions.md"},{"id":"drag","cat":"ui-behaviors","desc":"Support dragging to move a floating element around the page.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/drag.md"},{"id":"drag-and-drop","cat":"ui-behaviors","desc":"Support dragging to rearrange the children of a container along one axis (horizontal or vertical) while preserving their state and accessible order.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/drag-and-drop.md"},{"id":"dynamic-sibling-animations","cat":"ui-behaviors","desc":"Stagger animation or transition timing across sibling elements so each one starts after a computed delay based on its position in the sibling list.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/dynamic-sibling-animations.md"},{"id":"dynamic-sort","cat":"ui-behaviors","desc":"Best practices for handling dynamic user-triggered reordering of a container's children (e.g. list items, table rows, or a card grid), with optional animated reordering that respects user preferences, good screen reader UX, and optimal performance for large lists.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/dynamic-sort.md"},{"id":"group-element-transitions","cat":"ui-behaviors","desc":"Smoothly rearrange and animate list items, cards, or grid elements into their new positions simultaneously when adding, removing, shuffling, or reordering—such as removing a product from a shopping cart.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/group-element-transitions.md"},{"id":"highlight-text-ranges","cat":"ui-behaviors","desc":"Highlight arbitrary text ranges on a page such as search results, spelling errors, or collaborative editing cursors.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/highlight-text-ranges.md"},{"id":"interactive-content-reveal","cat":"ui-behaviors","desc":"Create interactive reveal effects, such as a spotlight that follows the user's pointer to uncover details within an image or UI section.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/interactive-content-reveal.md"},{"id":"interest-triggered-action-previews","cat":"ui-behaviors","desc":"Show a live preview of a button's effect when a user signals interest (e.g. hovering, focusing, or long-pressing) but before they commit to clicking.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/interest-triggered-action-previews.md"},{"id":"interest-triggered-tooltips","cat":"ui-behaviors","desc":"Show a tooltip or supplemental information when a user hovers over, focuses on, or long-presses an interactive element, without requiring a click.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/interest-triggered-tooltips.md"},{"id":"light-dismiss-a-dialog","cat":"ui-behaviors","desc":"Create a modal dialog that can be closed via light dismiss (i.e. clicking or tapping outside of the dialog)","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/light-dismiss-a-dialog.md"},{"id":"motion","cat":"ui-behaviors","desc":"Animate UI with CSS transitions, animations, scroll-driven animations, and view transitions while keeping motion on the compositor and respecting reduced-motion preferences.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/motion.md"},{"id":"move-dom-element-without-losing-state","cat":"ui-behaviors","desc":"Move or reparent a DOM element without losing important element state, such as interactivity states (:focus/:active), `&lt;iframe&gt;` loading state, animation/transition state, etc","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/move-dom-element-without-losing-state.md"},{"id":"parallax-scroll-effects","cat":"ui-behaviors","desc":"Create scroll-based effects (such as parallax) where foreground and background layers move at different rates, creating a sense of depth as the user scrolls.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/parallax-scroll-effects.md"},{"id":"persistent-top-layer-ui","cat":"ui-behaviors","desc":"Keep a modal dialog, fullscreen element, or native popover visibly open and functionally active when its underlying DOM node is moved or reparented in the DOM.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/persistent-top-layer-ui.md"},{"id":"physics-based-easing","cat":"ui-behaviors","desc":"Create custom, physics-based animation and transition effects, like bounce and spring, that feel more natural and engaging than traditional easing curves.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/physics-based-easing.md"},{"id":"platform-controls-dismiss-dialog","cat":"ui-behaviors","desc":"Create a modal dialog that can be closed via standard platform-specific user actions, such as pressing the `Esc` key on desktop platforms, or a \"back\" or \"dismiss\" gesture on mobile platforms","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/platform-controls-dismiss-dialog.md"},{"id":"prevent-page-scroll-under-modal-dialog","cat":"ui-behaviors","desc":"Prevent the underlying page from scrolling while a modal dialog is open.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/prevent-page-scroll-under-modal-dialog.md"},{"id":"same-document-transitions","cat":"ui-behaviors","desc":"Visually connect persisting elements across different page states or navigations in a Single Page Application (SPA) (e.g. expanding a product thumbnail into a full-bleed hero image) by smoothly morphing their size, position, or other styling properties.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/same-document-transitions.md"},{"id":"scoped-component-transitions","cat":"ui-behaviors","desc":"Animate state changes inside a single component (a card, list, panel, or other subtree) while the rest of the page remains interactive, and other transitions run concurrently.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/scoped-component-transitions.md"},{"id":"scroll-completion-effects","cat":"ui-behaviors","desc":"Trigger visual effects, animations, or focus changes on a target element only after a smooth programmatic scroll to that element has finished.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/scroll-completion-effects.md"},{"id":"scroll-entry-exit-effects","cat":"ui-behaviors","desc":"Create fade-in, scale-up, or other complex reveal-type effects on elements as they enter and exit the scrollport (or viewport) while the user is scrolling.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/scroll-entry-exit-effects.md"},{"id":"scroll-snap-realtime-feedback","cat":"ui-behaviors","desc":"Provide real-time visual feedback in linked UI elements while a user scrolls through snap-aligned content, before the scroll gesture completes.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/scroll-snap-realtime-feedback.md"},{"id":"scroll-snap-state-sync","cat":"ui-behaviors","desc":"Synchronize navigation indicators, linked content panels, and analytics tracking with the actively snapped item in a scrollable container.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/scroll-snap-state-sync.md"},{"id":"scroll-target-on-load","cat":"ui-behaviors","desc":"Build a scrollable list of elements (e.g. a carousel of images or a chat conversation thread) that can be displayed with a particular element scrolled into view on the initial render.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/scroll-target-on-load.md"},{"id":"scrollytelling","cat":"ui-behaviors","desc":"Animate visual properties on a target element — such as fading a backdrop, shifting a background color, or to create scrollytelling experiences — driven entirely by the scrollport position of a completely different element.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/scrollytelling.md"},{"id":"search-hidden-content","cat":"ui-behaviors","desc":"Hide content from view using patterns such as accordions, tabs, and \"Read more\" sections, while ensuring the hidden text reveals itself during native \"Find in page\" searches, allows search engine indexing, supports URL fragment deep links, and maintains ARIA accessibility.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/search-hidden-content.md"},{"id":"sortable-table","cat":"ui-behaviors","desc":"Progressively enhance a data table with behaviors that allow users to sort rows by clicking on column headers.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/sortable-table.md"},{"id":"spatial-navigation","cat":"ui-behaviors","desc":"Implement accessible spatial navigation using arrow keys that works correctly in different layout modes (grid etc)","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/spatial-navigation.md"},{"id":"swipe-to-remove","cat":"ui-behaviors","desc":"Let users act on items in a list (remove, archive, mark as read, etc.) with a horizontal swipe gesture, so they can process entries quickly without tapping a separate control.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/swipe-to-remove.md"},{"id":"swipe-to-reveal","cat":"ui-behaviors","desc":"Let users swipe horizontally on a list item or content pane to reveal contextual action buttons or a side menu without automatically triggering an action.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/swipe-to-reveal.md"},{"id":"accordion","cat":"ui-components","desc":"Build an accordion component with animation, optional exclusive (one-open-at-a-time) behavior, and brand-consistent styling.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/accordion.md"},{"id":"app-menus","cat":"ui-components","desc":"Build an application menu bar where several top-level menus (such as File, Edit, and View) act as a single keyboard stop and switch between each other on hover or arrow keys.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/app-menus.md"},{"id":"breadcrumbs","cat":"ui-components","desc":"Build a breadcrumb trail that shows the user's location within a site hierarchy and lets them navigate to ancestor pages.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/breadcrumbs.md"},{"id":"card","cat":"ui-components","desc":"Build a card component that adapts its presentation to its own available space and contents.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/card.md"},{"id":"carousel","cat":"ui-components","desc":"Build a carousel component that displays a set of items in a horizontal or vertical layout.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/carousel.md"},{"id":"checkbox","cat":"ui-components","desc":"Style checkboxes, including custom icons, layout, colors, check/uncheck animations, while preserving native functionality and accessibility.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/checkbox.md"},{"id":"copy-button","cat":"ui-components","desc":"Build a copy button that copies text from arbitrary elements to the clipboard.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/copy-button.md"},{"id":"dark-mode-toggle","cat":"ui-components","desc":"Build a dark mode toggle component that allows users to override their system color scheme preference for the current site.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/dark-mode-toggle.md"},{"id":"dialog","cat":"ui-components","desc":"Build a modal or non-modal dialog component that is accessible, manages focus appropriately, and can be dismissed the way users expect on each platform.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/dialog.md"},{"id":"hovercard","cat":"ui-components","desc":"Build a hovercard component that displays an interactive structured preview of the page a certain type of link (e.g. a user profile) will navigate to when hovered over.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/hovercard.md"},{"id":"menu","cat":"ui-components","desc":"Build a menu component that displays a list of options or actions, with support for nested submenus.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/menu.md"},{"id":"navbar","cat":"ui-components","desc":"Build a site navigation bar that adapts across screen sizes and indicates the current page.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/navbar.md"},{"id":"navigation-drawer","cat":"ui-components","desc":"Create a navigation drawer component that, when triggered from a menu button, slides in from the side overlaid on top of existing page content, and slides out when dismissed (by swiping away, tapping outside, or pressing escape).","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/navigation-drawer.md"},{"id":"persistent-app-tours","cat":"ui-components","desc":"Create persistent onboarding walkthroughs using tethered native overlays that stay open during user interaction.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/persistent-app-tours.md"},{"id":"persistent-toast-notifications","cat":"ui-components","desc":"Create non-intrusive toast and overlay notifications for persistent, stackable messaging and state communication.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/persistent-toast-notifications.md"},{"id":"progress","cat":"ui-components","desc":"Build a styled progress bar that communicates completion of a task or process, in both determinate and indeterminate states.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/progress.md"},{"id":"progress-ring","cat":"ui-components","desc":"Build a progress ring component that visually represents the completion status of a task or process, with support for content in the center and brand-consistent styling.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/progress-ring.md"},{"id":"scrollspy","cat":"ui-components","desc":"Highlight the currently visible section of a page in a navigation menu","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/scrollspy.md"},{"id":"spinner","cat":"ui-components","desc":"Build a loading spinner that communicates busy state to all users, respects reduced-motion preferences, and animates efficiently.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/spinner.md"},{"id":"stack-drill-down","cat":"ui-components","desc":"Build full-screen hierarchical navigation that lets users drill down into nested views and swipe or navigate back to return, with browser history kept in sync.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/stack-drill-down.md"},{"id":"tabs","cat":"ui-components","desc":"Build a responsive tabbed interface with good UX when not all tabs fit on screen.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/tabs.md"},{"id":"toolbar","cat":"ui-components","desc":"Build a toolbar component that displays a set of controls for performing actions.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/toolbar.md"},{"id":"content-first-noise-reduction","cat":"user-experience","desc":"Maximize content and reduce noise by removing blocking popups, keeping persistent navigation compact, and moving secondary content behind on-demand disclosure.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/content-first-noise-reduction.md"},{"id":"form-factor-adaptation","cat":"user-experience","desc":"Adapt layouts, controls, and text to any device or container so touch targets stay usable, content fits its space, and nothing collides with system UI.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/form-factor-adaptation.md"},{"id":"natural-interactions","cat":"user-experience","desc":"Implement natural interactions with clear hover, focus, and press feedback, motion that opens from its trigger, swipeable content, and keyboard-reachable actions.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/natural-interactions.md"},{"id":"adapt-scrollbar-to-contrast-preferences","cat":"visual-design","desc":"Enhance scrollbar visibility for users who prefer high-contrast interfaces","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/adapt-scrollbar-to-contrast-preferences.md"},{"id":"apply-webgl-shaders","cat":"visual-design","desc":"Apply custom visual effects with WebGL shaders to HTML content.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/apply-webgl-shaders.md"},{"id":"browser-ui-theming","cat":"visual-design","desc":"Theme browser-generated UI such as text selection, scrollbars, form controls, and pickers with CSS instead of re-creating it with custom elements.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/browser-ui-theming.md"},{"id":"color","cat":"visual-design","desc":"Color guidance for the web, including contrast requirements, light and dark color schemes, Forced Colors Mode, and generating tints and shades from a base color.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/color.md"},{"id":"complex-shapes","cat":"visual-design","desc":"Clip elements and their content to any free-form shape, like a symbol, brush stroke, or organic texture for more expressive designs.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/complex-shapes.md"},{"id":"contrast-color","cat":"visual-design","desc":"Select a readable text color with sufficient contrast on a dynamic background color.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/contrast-color.md"},{"id":"custom-text-decorations","cat":"visual-design","desc":"Add text decorations such as underlines, overlines, strikethroughs, or entirely custom shapes, with reveal animations, custom offsets and end insets, and flexible ink skipping.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/custom-text-decorations.md"},{"id":"customize-scrollbar-color-and-thickness","cat":"visual-design","desc":"Customize the color or thickness of a scrollbar","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/customize-scrollbar-color-and-thickness.md"},{"id":"dark-mode","cat":"visual-design","desc":"Implement dark mode support in a way that respects the user's light/dark theme preference and adapts browser UI (e.g. scrollbars, form controls, etc)","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/dark-mode.md"},{"id":"equal-width-text-lines","cat":"visual-design","desc":"Make every line of a multi-line heading or lockup span the same width, as in poster-style or stacked-headline typography. Unlike justified text, the text itself is sized to the width rather than the spacing stretched","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/equal-width-text-lines.md"},{"id":"export-html-media-from-canvas","cat":"visual-design","desc":"Capture and export dynamic HTML content as images or video frames from within canvas.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/export-html-media-from-canvas.md"},{"id":"expose-canvas-content-to-browser-features","cat":"visual-design","desc":"Expose content rendered in a canvas to browser features like assistive technologies, translation, or reading mode.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/expose-canvas-content-to-browser-features.md"},{"id":"improve-text-layout-and-legibility","cat":"visual-design","desc":"Improve the layout and legibility of short standalone text content, such as headings no longer than a few lines, by enabling the browser to apply evenly balanced line breaks when wrapping text.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/improve-text-layout-and-legibility.md"},{"id":"interactive-content-in-3d-scenes","cat":"visual-design","desc":"Integrate interactive HTML elements into a 3D scene.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/interactive-content-in-3d-scenes.md"},{"id":"precise-text-alignment","cat":"visual-design","desc":"Achieve precise vertical alignment with text of any font. For example, exactly equal visual padding above and below text, or aligning text perfectly flush with adjacent icons or images.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/precise-text-alignment.md"},{"id":"shaped-cutouts","cat":"visual-design","desc":"Combine multiple shapes to create complex cutouts or 'knockout' effects in elements, such as adding a notch to an element.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/shaped-cutouts.md"},{"id":"soft-edge-content-fade","cat":"visual-design","desc":"Apply a transparency gradient to content edges to indicate further scrollable areas or to obscure payment-walled text.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/soft-edge-content-fade.md"},{"id":"typography","cat":"visual-design","desc":"Typography best practices for the web, including font sizing units, line height, text wrapping and balancing, and fluid type that scales with the viewport.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/typography.md"},{"id":"visual-effects","cat":"visual-design","desc":"Visual effects with CSS such as layered shadows, blend modes, gradients with predictable color interpolation, and patterns like stripes, checkerboards, dots, and pie charts built from gradients alone.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/visual-effects.md"},{"id":"visually-stable-font-fallbacks","cat":"visual-design","desc":"Define font styles such that text remains readable and visually consistent in the event that there's a swap between the preferred font and one of the fallbacks (or vice versa).","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/visually-stable-font-fallbacks.md"},{"id":"visually-stable-mixed-fonts","cat":"visual-design","desc":"Define font styles such that text remains readable and visually consistent in situations where multiple fonts are used to render a single block of text.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/visually-stable-mixed-fonts.md"},{"id":"visually-texture-content","cat":"visual-design","desc":"Apply realistic weathering and texture patterns to elements to give them an organic, aged, or physical material appearance.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/visually-texture-content.md"},{"id":"cpp-on-the-web","cat":"wasm","desc":"Compile C/C++ to WebAssembly using Emscripten","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/wasm/cpp-on-the-web.md"},{"id":"agentic-forms","cat":"webmcp","desc":"Expose client-side functionality as tools to AI agents by annotating standard HTML forms with WebMCP attributes.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/webmcp/agentic-forms.md"},{"id":"agentic-javascript-tools","cat":"webmcp","desc":"Programmatically register client-side JavaScript functions as tools for AI agents using the WebMCP Imperative API.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/webmcp/agentic-javascript-tools.md"},{"id":"webmcp","cat":"webmcp","desc":"Use this guide to implement WebMCP in browser applications, exposing client-side functionality as tools to AI agents via declarative or imperative APIs.","url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/webmcp/webmcp.md"}],"guides":[{"id":"accessibility","cat":"accessibility","title":"Accessibility Coding Guidelines","kind":"overview","desc":"This guide provides actionable DOs and DON'Ts for AI coding agents to ensure web applications are accessible to all users, including those using assistive technologies.","ucCat":"","chars":51649,"codes":15,"sections":["1. Content Navigability and Structure","2. Semantic HTML and ARIA","3. Accessible Names and Descriptions","4. Document Metadata and Language","5. Keyboard and Focus Management","6. Alternate Text and Media","7. Forms and Input Controls","8. Live Regions","9. Color","10. Typography","11. Motion and Preferences","12. Modals and Native Dialogs","13. Testing Validations"],"baselines":[],"tokens":["<title>","<iframe>","<dialog>","<header>","<nav>","<main>","<aside>","<footer>","aria-label","<nav aria-label=\"Primary\">","<nav aria-label=\"Secondary\">","<section>","region","<h1>","<h6>","<div>","<span>","role=\"dialog\"","role=\"alertdialog\"","<h4>","<summary>","<details>","<ul>","<ol>","<table>","<caption>","<tr>","<th>","<td>","scope","<th scope=\"row\">","<th scope=\"col\">","tabindex=\"-1\"","<h1 id=\"content\" tabindex=\"-1\">","<div role=\"button\">","<a role=\"button\">","<button>","role=\"button\"","required","aria-required","<ul role=\"list\">","<nav role=\"navigation\">","<input required aria-required=\"true\">","list-style: none","display: flex","grid","role=\"list\"","role=\"tab\"","aria-expanded","aria-pressed","disabled","aria-disabled","tabindex=\"0\"","aria-disabled=\"true\"","aria-hidden=\"true\"","role=\"presentation\"","role=\"none\"","ElementInternals","role","aria-*","<label>","<legend>","<fieldset>","<figcaption>","<figure>","for","id","aria-labelledby","<input>","title"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/accessibility/accessibility.md"},{"id":"accessible-error-announcement","cat":"accessibility","title":"Accessible Error Announcement","kind":"usecase","desc":"Synchronize programmatic accessibility states (like aria-invalid) with the visual :user-invalid state to ensure screen reader users receive error feedback only after interaction, mirroring the visual experience.","ucCat":"accessibility","chars":13642,"codes":6,"sections":["The Problem","The Solution","Implementation Guide","Fallbacking & Browser Support"],"baselines":[],"tokens":[":invalid",":user-invalid","aria-invalid","aria-invalid=\"true\"","aria-invalid=\"false\"","required","aria-describedby","blur","change","input","invalid","novalidate","data-error","id","data-error=\"email-error\"","<div id=\"email-error\">",".visually-hidden","WeakMap"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/accessibility/accessible-error-announcement.md"},{"id":"accessible-generated-content","cat":"accessibility","title":"Accessible generated content","kind":"usecase","desc":"Use CSS generated content (`::before`/`::after`) in ways that stay accessible, including alternative text for decorative content.","ucCat":"accessibility","chars":2203,"codes":3,"sections":["Fallback strategies"],"baselines":[{"feature":"Alt text for generated content","status":"Newly available"}],"tokens":["content","content: url(...) / \"...\"","content: url(...)","<span>","aria-label"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/accessibility/accessible-generated-content.md"},{"id":"respect-os-text-scale","cat":"accessibility","title":"Respect Operating System Text Scale","kind":"usecase","desc":"Respect the operating system's text scale preference for a page so font sizes, layout, and rem-based measurements follow the user's accessibility settings.","ucCat":"accessibility","chars":7218,"codes":7,"sections":["Overview","Implementation","Fallback Strategies"],"baselines":[],"tokens":["<meta name=\"text-scale\">","1rem","rem","em","<head>","px","body",":root","html","vw","clamp()","fluid-scaling","height","block-size","max-height","max-block-size","min-height","min-block-size","white-space: nowrap","<meta name=\"text-scale\" content=\"scale\">","font-size","env(preferred-text-scale)"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/accessibility/respect-os-text-scale.md"},{"id":"language-detection","cat":"built-in-ai","title":"Language Detection","kind":"usecase","desc":"Detect the language of user-generated content or already present site content.","ucCat":"built-in-ai","chars":3663,"codes":3,"sections":["Key Use Cases","Hardware & System Requirements","Implementation Guide","Security and Environment","Fallback Strategy"],"baselines":[],"tokens":["lang","LanguageDetector.create()","NotAllowedError","downloadable","downloading","0.0","1.0","LanguageDetector","'unavailable'"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/built-in-ai/language-detection.md"},{"id":"language-model","cat":"built-in-ai","title":"Language Model","kind":"usecase","desc":"Run on-device natural language inference in the browser using the Prompt API, with streaming output, structured JSON responses, and multi-turn session management.","ucCat":"built-in-ai","chars":19408,"codes":8,"sections":["1. Getting Started and Hardware Requirements","2. Core Prompting Capabilities","3. Advanced Session Management","4. Structured Output with JSON Schema","5. Best Practices and Safety","6. Fallback strategies"],"baselines":[],"tokens":["availability()","'downloadable'","'downloading'","LanguageModel.create()","NotAllowedError","<progress>","tabindex=\"-1\"","session.destroy()","prompt()","promptStreaming()","innerHTML","textContent","aria-busy=\"true\"","lang","expectedOutputs","session.contextUsage","session.contextWindow","initialPrompts","localStorage","responseConstraint","prefix: true","AbortController","signal","create()","JSON.parse()","try","catch","AbortError","clone()","destroy()","maxLength: 125","motion","sessionStorage","IndexedDB"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/built-in-ai/language-model.md"},{"id":"prompt-api","cat":"built-in-ai","title":"Language Model","kind":"overview","desc":"The Prompt API allows developers to run natural language processing tasks directly in the browser using Gemini Nano. This built-in AI approach ensures user privacy, reduces server costs, and enables offline functionality.","ucCat":"","chars":19408,"codes":8,"sections":["1. Getting Started and Hardware Requirements","2. Core Prompting Capabilities","3. Advanced Session Management","4. Structured Output with JSON Schema","5. Best Practices and Safety","6. Fallback strategies"],"baselines":[],"tokens":["availability()","'downloadable'","'downloading'","LanguageModel.create()","NotAllowedError","<progress>","tabindex=\"-1\"","session.destroy()","prompt()","promptStreaming()","innerHTML","textContent","aria-busy=\"true\"","lang","expectedOutputs","session.contextUsage","session.contextWindow","initialPrompts","localStorage","responseConstraint","prefix: true","AbortController","signal","create()","JSON.parse()","try","catch","AbortError","clone()","destroy()","maxLength: 125","motion","sessionStorage","IndexedDB"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/built-in-ai/prompt-api.md"},{"id":"summarizer","cat":"built-in-ai","title":"Summarizer","kind":"usecase","desc":"Summarize text content using the on-device Summarizer API.","ucCat":"built-in-ai","chars":6360,"codes":6,"sections":["Getting Started","API Functions & Configuration","Summarization Methods","Security and Permissions","Fallback Strategy"],"baselines":[],"tokens":["Summarizer.availability(options)","Summarizer.create(options)","window.ai.summarizer","monitor(m)","Summarizer.create()","downloadprogress","availability","'downloadable'","'downloading'","NotAllowedError","type","key-points","tldr","teaser","headline","format","markdown","plain-text","length","short","medium","long","preference","auto","speed","capability","lang","outputLanguage","Summarizer","'unavailable'","built-in-ai-task-apis-polyfills","prompt-api-polyfill"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/built-in-ai/summarizer.md"},{"id":"translator","cat":"built-in-ai","title":"Translator","kind":"usecase","desc":"Translate text between languages using the on-device Translator API.","ucCat":"built-in-ai","chars":7399,"codes":4,"sections":["Prerequisites & Requirements","Implementation & Code Samples","Supported Languages","Security & Performance","Fallback Strategy"],"baselines":[],"tokens":["Translator","window.Translator","self.Translator","window.ai.translator","sourceLanguage","targetLanguage","Translator.availability(options)","Translator.create(options)","monitor(m)","Translator.create()","downloadprogress","availability(options)","'downloadable'","'downloading'","NotAllowedError","'available'","'unavailable'","built-in-ai-task-apis-polyfills","prompt-api-polyfill"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/built-in-ai/translator.md"},{"id":"animate-to-intrinsic-sizes","cat":"css","title":"Animate to Intrinsic Sizes","kind":"usecase","desc":"Smoothly animate interactive components (like accordions, menus, and expanding cards) to and from their natural dimensions.","ucCat":"css","chars":5803,"codes":5,"sections":["Implementation steps","Example: Generic Expansion Pattern","Example: Calculated Intrinsic Inline-Size","Example: Transition from Intrinsic to Fixed","Key constraints","Fallback strategies"],"baselines":[],"tokens":["block-size: auto","inline-size: max-content","interpolate-size","calc-size()","interpolate-size: allow-keywords",":root","transition","block-size","inline-size","auto","min-content","max-content","fit-content","content",":hover","auto + 2rem","any","to","size","numeric-only"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/animate-to-intrinsic-sizes.md"},{"id":"atrule-support-conditionals","cat":"css","title":"Conditionally Apply CSS Based on At-Rule Support","kind":"usecase","desc":"Conditionally apply certain CSS rules or declarations only if a certain at-rule is supported by the browser.","ucCat":"css","chars":5771,"codes":7,"sections":["Detecting support for at-rules when `@supports at-rule()` isn’t appropriate { #detecting-at-rules-without-supports-at-rule }","Fallback strategies"],"baselines":[],"tokens":["@supports at-rule()","at-rule()","@supports","@supports selector(...)","@supports at-rule(@function)","@supports (color: --foo())","container-type","@supports (container-type: scroll-state)","@supports (container-type: size)","@supports (container-type: anchored)","anchored()","@supports (container-type: style)","@property","globalThis.CSSFunctionRule","@function","CSS.registerProperty","@supports (at-rule())"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/atrule-support-conditionals.md"},{"id":"calculate-with-intrinsic-sizes","cat":"css","title":"Calculate With Intrinsic Sizes","kind":"usecase","desc":"Calculate the size of an element based on its intrinsic size, while ensuring it fits within given design constraints.","ucCat":"css","chars":10665,"codes":7,"sections":["Implementation Steps","Basic Syntax","Use Cases","Critical Considerations","Fallback strategies"],"baselines":[],"tokens":["calc-size()","auto","min-content","fit-content","to","clamp()","min()","max()","inline-size","block-size","<calc-size-basis>","max-content","content","flex-basis","any","<calc-sum>","100px","size","round()","0px","interpolate-size: allow-keywords","height: 0","height: auto",":root","block-size: 0","visibility: hidden","visibility: visible","visibility","prefers-reduced-motion",").","interpolate-size","@supports"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/calculate-with-intrinsic-sizes.md"},{"id":"child-state-based-styling","cat":"css","title":"Child State Based Styling","kind":"usecase","desc":"Build a component that changes its styling based on the state of one of its child elements. For example, a component that renders in light or dark mode based on whether a theme toggle is checked (or not).","ucCat":"css","chars":4967,"codes":4,"sections":["Implementing state-based container styling","Fallback strategies"],"baselines":[],"tokens":[":has()",":checked",":focus",":valid",":invalid",":not()",".is-active",".has-error",":focus-within",":has([child-selector]:[state])",".theme-card","body:has(...)","@supports not selector(:has(*))","CSS.supports()","change","focus","blur"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/child-state-based-styling.md"},{"id":"content-based-styling","cat":"css","title":"Content Based Styling","kind":"usecase","desc":"Build a component that changes its layout based on whether it contains specific child elements (or not). For example, if the component contains an image, use a multi-column layout, otherwise default to a single-column layout.","ucCat":"css","chars":5341,"codes":4,"sections":[],"baselines":[],"tokens":[".card--has-image",".card--text-only",":has()",":not()",":has([child-selector])",".article-card","body:has(img)","@supports not selector(:has(*))",".has-image","CSS.supports()"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/content-based-styling.md"},{"id":"css-layout","cat":"css","title":"CSS Layouts and Responsive Design","kind":"usecase","desc":"Modern CSS layouts such as flexbox, grid, subgrid, container queries, anchor positioning, and intrinsic sizing. Use this skill when architecting responsive UI components or page layouts.","ucCat":"css","chars":21571,"codes":6,"sections":["1 Fundamentals","2 Flexbox","3 Grid and subgrid","4 Container queries","5 Native overlays, anchor positioning, and stacking contexts","6 Overflow tracking and layout stability","7 Viewport mechanics and track distribution","8 Grid lanes (aka masonry)"],"baselines":[{"feature":"Subgrid","status":"Widely available"},{"feature":"Container queries (size)","status":"Widely available"},{"feature":"<dialog>","status":"Widely available"},{"feature":"Popover","status":"Newly available"},{"feature":"scrollbar-gutter","status":"Newly available"},{"feature":"Small, large, and dynamic viewport units","status":"Widely available"}],"tokens":["aspect-ratio","grid-auto-flow: dense","anchor-name","position-anchor","inline-size","block-size","margin-inline","padding-block","inset-inline-start","css","place-*","place-content","place-items","place-self","min-content","max-content","fit-content()","fr","minmax()","width","height","overflow: hidden","<canvas>","<img>","<svg>","<video>","<iframe>","display: inline","overflow","display: block","grid","flex","calc-size()","calculate-with-intrinsic-sizes","display: flex","flex-direction","row","flex-wrap: wrap","nowrap","overflow: auto/hidden","flex-wrap: balance","wrap","<grow> <shrink> <basis>","flex: 1 1 250px","flex-grow","flex-shrink","flex-basis","gap","row-gap","column-gap","safe","align-items: safe center","margin-inline-start: auto","margin-block-start: auto","align-self","align-items","margin: auto","align-content","min-inline-size: 0","min-width: 0","justify-self","order","flex-direction: *-reverse","space-around","space-evenly","flex-direction: column","justify-content","grid-template-columns: 200px 1fr","grid-template-areas","auto-fit"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/css-layout.md"},{"id":"css","cat":"css","title":"CSS: Modern Architecture","kind":"usecase","desc":"Action-oriented guidelines for modern CSS architecture, including the cascade, selectors, scoping, nesting, and design tokens. Use this guide when authoring styles or managing design systems.","ucCat":"css","chars":12538,"codes":9,"sections":["1. Foundations","2. Inheritance and The Cascade","3. Selectors and scoping","4. Interactivity","5. Design Tokens and Theming","6. Responsive design","7. Typography","8. Visual effects","9. Shapes","10. Transitions & animations","11. Generated content"],"baselines":[],"tokens":[":is()",":where()",":not()","@scope","currentColor","color","inherit","em","font-size: var(--size)","cqw","cqh","cqi","cqb","margin-inline-start","margin-left","@layer","reset","base","theme","components","utilities","initial","unset","revert","transition-*","transition: inherit",":has()","label:has(:checked)","label.has-checked","child-state-based-styling",") and","(via",":nth-child(<An+B> of <selector>)","details:nth-child(1 of [open])","<details>","details[open]:first-child","border-bottom","li","not","revert-layer",".card :not(.content *)",".invert",".dark",".light","accessibility",":root","background: transparent","padding: 0","background: #f06","padding: .3em","--color-blue-10","--color-gray-90","--font-sans-serif","--size-xl","--color-accent","--color-neutral","--font-body","--font-heading","--ui-border","--surface-bg-subtle","--button-bg-primary-hover","--button-border-color-secondary","dark-mode","browser-ui-theming","responsive-design","typography","visual-effects","corner-shape: squircle","border-radius","10px / 20px"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/css.md"},{"id":"design-token-reactivity","cat":"css","title":"Design Token Reactivity","kind":"usecase","desc":"Define higher-order design tokens, like density modes (compact, comfortable, spacious) or themes and have descendant components react to changes directly and in component-appropriate ways.","ucCat":"css","chars":5918,"codes":8,"sections":["Background & Overview","How to implement","Fallback strategies"],"baselines":[{"feature":"Container style queries","status":"Newly available"}],"tokens":["@container style()","container-type","container-name","data-density",":where()","[data-density=\"spacious\"]","[data-density=\"compact\"]","CSSContainerRule"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/design-token-reactivity.md"},{"id":"dynamic-sibling-styling","cat":"css","title":"Styling siblings based on count and index","kind":"usecase","desc":"Create dynamic visual spectrums or layout arrangements that automatically adapt to the number of elements in a group.","ucCat":"css","chars":3689,"codes":5,"sections":["Dynamic color systems","Symmetrical layout and fan effects","Circular and complex positioning"],"baselines":[{"feature":"sibling-count() and sibling-index()","status":"Newly available"}],"tokens":[":nth-child","sibling-index()","sibling-count()","sin()","cos()","CSS.supports()","@supports"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/dynamic-sibling-styling.md"},{"id":"fluid-scaling","cat":"css","title":"Fluid Scaling","kind":"usecase","desc":"Scale items like font size, spacing, and media sizes smoothly based on the parent container's size rather than using fixed breakpoints","ucCat":"css","chars":3317,"codes":4,"sections":["Overview","Implementation"],"baselines":[{"feature":"Container queries (size)","status":"Widely available"}],"tokens":["cqi","cqb","@container","container-type","clamp()"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/fluid-scaling.md"},{"id":"individual-transform-properties","cat":"css","title":"Individual Transform Properties","kind":"usecase","desc":"Animate or override individual CSS transform properties (e.g. translate, rotate, scale) independently of other transform properties on a single element.","ucCat":"css","chars":3693,"codes":3,"sections":[],"baselines":[{"feature":"Individual transform properties","status":"Widely available"}],"tokens":["transform","translate","rotate","scale",":hover"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/individual-transform-properties.md"},{"id":"overflow-clipping-control","cat":"css","title":"Overflow Clipping Control","kind":"usecase","desc":"Adjust the visible clipping boundary of an element to align with the content edge, padding edge, or border edge—or a specified offset from any of these—offering finer-grained control over how content is clipped.","ucCat":"css","chars":8248,"codes":6,"sections":["How to Implement","Example Code","Strategic Implementation & Best Practices","Fallback Strategies"],"baselines":[{"feature":"overflow","status":"clip: Widely available"}],"tokens":["overflow: hidden","overflow: clip","overflow-clip-margin","<img>","<video>","<canvas>","overflow-clip-margin: content-box","object-fit","border-radius","overflow","hidden","auto","scroll","content-box","padding-box","border-box","15px","5px","content-box 15px","calc()","clip","filter: drop-shadow()","position: sticky","overflow: visible"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/overflow-clipping-control.md"},{"id":"reduce-style-repetition","cat":"css","title":"Reduce Style Repetition with CSS Functions","kind":"usecase","desc":"Reduce excessive style repetition by encapsulating complex or dynamic styling logic into reusable functions (such as a function that computes a gradient based on a set of input parameters).","ucCat":"css","chars":4011,"codes":4,"sections":["The `@function` Syntax","Practical Examples","Best Practices"],"baselines":[],"tokens":["@function","result","--","<color>","type","--angle","@media"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/reduce-style-repetition.md"},{"id":"responsive-design","cat":"css","title":"Responsive design","kind":"usecase","desc":"Build UI that adapts to container and viewport size, including container queries, dynamic viewport units, aspect ratios, and responsive typography.","ucCat":"css","chars":1885,"codes":0,"sections":["Overall best practices","Responsive typography"],"baselines":[],"tokens":["@container","size-aware-styling","dvh","dvw","vh","vw","aspect-ratio","<img>","<video>","css-layout","clamp()","fluid-scaling"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/responsive-design.md"},{"id":"selector-atrule-combinations","cat":"css","title":"Selector & @-rule Combinations","kind":"usecase","desc":"Target elements based on the intersection or union of selectors and conditional @-rules while minimizing repetition.","ucCat":"css","chars":3648,"codes":5,"sections":["The problem","What to do instead","Fallbacks"],"baselines":[{"feature":"Container style queries","status":"Newly available"}],"tokens":["(prefers-color-scheme: dark)","or","display","not style(...)","@container"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/selector-atrule-combinations.md"},{"id":"size-aware-styling","cat":"css","title":"Size Aware Styling","kind":"usecase","desc":"Build a component whose styles can be conditionally dependent on its own width or height, rather than the width or height of the viewport. For example a card component that can change its layouts depending on how large it is, or a call-to-action button that can conditionally display helper text based on its width.","ucCat":"css","chars":2993,"codes":4,"sections":["Overview","Implementation"],"baselines":[{"feature":"Container queries (size)","status":"Widely available"}],"tokens":["@container"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/size-aware-styling.md"},{"id":"style-parent-with-has","cat":"css","title":"Style a Form Group When a Field Is Invalid with :has()","kind":"usecase","desc":"Style parent elements of a form field (e.g. labels or fieldsets) when the field is invalid.","ucCat":"css","chars":13958,"codes":7,"sections":["The Problem","The Solution","Implementation Guide","Fallbacking & Browser Support","Other Considerations"],"baselines":[],"tokens":["fieldset","<label>",":has()",":user-invalid",".parent:has(:user-invalid)",".field-group","body","required-field-feedback",".has-error","WeakMap","aria-invalid","aria-invalid=\"false\"","required","aria-invalid=\"true\"","data-error","id","data-error=\"email-error\"","<div id=\"email-error\">","aria-describedby",".visually-hidden"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/style-parent-with-has.md"},{"id":"usage-aware-component-variations","cat":"css","title":"Semantic Component Adaptation","kind":"usecase","desc":"Build components that adapt visual logic based on semantic context using CSS container style queries.","ucCat":"css","chars":5240,"codes":2,"sections":["When to use this guide","Choosing the right tool","Implementation Directives","Implementation Example","Fallback Strategies"],"baselines":[{"feature":"Container style queries","status":"Newly available"}],"tokens":["@container style()","--surface: featured",".featured .button","design-token-reactivity",".toolbar .button","container-type","@container style(--property: value)",":where()"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/css/usage-aware-component-variations.md"},{"id":"animated-select-picker","cat":"forms","title":"Animated Select Picker","kind":"usecase","desc":"Create a custom select component whose dropdown is animated. For example, the menu fades or slides into view, or the options animate upon selection.","ucCat":"forms","chars":8738,"codes":3,"sections":["How to Implement","Example Code: Smooth Select Scale and Fade","Strategic Implementation & Best Practices","Fallback strategies"],"baselines":[],"tokens":["<select>","appearance: base-select","@starting-style","allow-discrete","::picker(select)","interpolate-size: allow-keywords",":root","height: auto","height: 0","display","overlay","transition","transition-behavior: allow-discrete","display: none","display: block","inside the",":open::picker-icon","overflow: hidden","prefers-reduced-motion","name","<label>","value","<svg>","<div>","<option>","<button>","<selectedcontent>"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/forms/animated-select-picker.md"},{"id":"autofill-address-form","cat":"forms","title":"Build an address form that follows best practice","kind":"usecase","desc":"Build an address form with correct autocomplete attributes and autofill support.","ucCat":"forms","chars":5007,"codes":5,"sections":["How to implement"],"baselines":[{"feature":"the html.elements.input.autocomplete capability","status":"Widely available"}],"tokens":["<form>","<input>","<label>","<button>","type","autocomplete","inputmode","<select>","<textarea>","for","id","type=\"email\"","type=\"tel\"","<input type=\"submit\">","div","autocomplete=\"name\"","address-line1","address-line2","address-line3","required"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/forms/autofill-address-form.md"},{"id":"autofill-highlight-inputs","cat":"forms","title":"Customize the styling of autofilled form fields","kind":"usecase","desc":"Customize the styling of form fields that have been autofilled and not edited by the user","ucCat":"forms","chars":3628,"codes":3,"sections":["How to implement","Fallback strategies"],"baselines":[],"tokens":[":autofill","<input>","<select>","<textarea>","contenteditable","::part(name):autofill","outline: none","outline",":autofill:focus-visible","border-width","padding","background-color","background-image","color","FieldText","light-dark()","--autofill-background-color","box-shadow","-webkit-text-fill-color","currentColor",":-webkit-autofill",":is()"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/forms/autofill-highlight-inputs.md"},{"id":"autofill-payment-form","cat":"forms","title":"Build a payment form that follows best practice","kind":"usecase","desc":"Build a payment form that collects card details with correct autocomplete values and autofill support.","ucCat":"forms","chars":9966,"codes":4,"sections":["How to implement","Fallback strategies"],"baselines":[{"feature":"enterkeyhint","status":"Widely available"},{"feature":"Email, telephone, and URL <input> types","status":"Widely available"},{"feature":"inputmode","status":"Widely available"}],"tokens":["<form>","<input>","<label>","<button>","type","autocomplete","inputmode","<select>","<textarea>","for","id","type=\"email\"","type=\"tel\"","<input type=\"submit\">","div","autocomplete=\"name\"","enterkeyhint","enterkeyhint=\"previous\"","enterkeyhint=\"next\"","enterkeyhint=\"done\"","enterkeyhint=\"search\"","MM/YY","aria-describedby","cc-exp","placeholder","type=\"text\"","inputmode=\"numeric\"","type=\"password\"","required","pattern"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/forms/autofill-payment-form.md"},{"id":"autofill-sign-in-form","cat":"forms","title":"Build a sign-in form that follows best practice","kind":"usecase","desc":"Build a sign-in form with correct autocomplete values and autofill support.","ucCat":"forms","chars":10751,"codes":3,"sections":["How to implement"],"baselines":[{"feature":"Email, telephone, and URL <input> types","status":"Widely available"},{"feature":"inputmode","status":"Widely available"},{"feature":"autocorrect","status":"Newly available"}],"tokens":["<form>","<input>","<label>","<button>","type","autocomplete","inputmode","<select>","<textarea>","for","id","type=\"email\"","type=\"tel\"","spellcheck=\"false\"","autocorrect","autocapitalize","input type=\"email\"","<input type=\"submit\">","div","autocomplete=\"name\"","enterkeyhint","enterkeyhint=\"previous\"","enterkeyhint=\"next\"","enterkeyhint=\"done\"","enterkeyhint=\"search\"","required","<div>","type=\"password\"","<input type=\"email\">","<input type=\"tel\">","inputmode=\"numeric\"","name","submit","autocomplete=\"username\"","username","id=\"email\"","name=\"email\"","autocomplete=\"new-password\"","autocomplete=\"current-password\""],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/forms/autofill-sign-in-form.md"},{"id":"autofill-sign-up-form","cat":"forms","title":"Build a sign-up form that follows best practice","kind":"usecase","desc":"Build a sign-up form with correct autocomplete values and autofill support.","ucCat":"forms","chars":11848,"codes":2,"sections":["How to implement"],"baselines":[{"feature":"Email, telephone, and URL <input> types","status":"Widely available"},{"feature":"inputmode","status":"Widely available"},{"feature":"autocorrect","status":"Newly available"}],"tokens":["<form>","<input>","<label>","<button>","type","autocomplete","inputmode","<select>","<textarea>","for","id","type=\"email\"","type=\"tel\"","spellcheck=\"false\"","autocorrect","autocapitalize","input type=\"email\"","<input type=\"submit\">","div","autocomplete=\"name\"","enterkeyhint","enterkeyhint=\"previous\"","enterkeyhint=\"next\"","enterkeyhint=\"done\"","enterkeyhint=\"search\"","pattern","required","<div>","type=\"password\"","<input type=\"email\">","<input type=\"tel\">","inputmode=\"numeric\"","name","submit","autocomplete=\"username\"","username","id=\"email\"","name=\"email\"","autocomplete=\"new-password\""],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/forms/autofill-sign-up-form.md"},{"id":"brand-consistent-forms","cat":"forms","title":"Brand-Consistent Forms","kind":"usecase","desc":"Match checkboxes, radio buttons, range sliders, and progress bars to your site's color palette without replacing them with custom components.","ucCat":"forms","chars":8554,"codes":6,"sections":["How to Implement","Example Code: Brand-Consistent Form Controls","Strategic Implementation & Best Practices","Fallback Strategy"],"baselines":[],"tokens":["accent-color","body","color-scheme","color-scheme: light dark","3:1","checkbox","radio","range","progress","@supports not","<span>","input"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/forms/brand-consistent-forms.md"},{"id":"branded-select-styling","cat":"forms","title":"Branded Select Styling","kind":"usecase","desc":"Create custom select elements whose button, picker, arrow icon, and checkmark all seamlessly match your brand or design system's typography, colors, spacing, and border treatments.","ucCat":"forms","chars":5785,"codes":3,"sections":["How to Implement","Example Code: Branded Courier Select","Strategic Implementation & Best Practices","Fallback strategies"],"baselines":[],"tokens":["<select>","appearance: base-select","::picker(select)","<button>","<selectedcontent>","z-index","select::picker-icon","option::checkmark","<option>","base-select","3:1","name","<label>","value","<svg>","<div>"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/forms/branded-select-styling.md"},{"id":"custom-select-picker-layouts","cat":"forms","title":"Custom Select Picker Layouts","kind":"usecase","desc":"Create custom select pickers whose options are positioned in unique or interesting ways, rather than the traditional stacked list of options.","ucCat":"forms","chars":7998,"codes":6,"sections":["How to Implement","Accessibility","Fallback Strategy"],"baselines":[],"tokens":["appearance: base-select","<select>","::picker(select)","display: grid","select::picker(select)","select:open::picker(select)","display: flex",":open","<option>","option:checked","::before","visibility: hidden","::checkmark","padding-bottom","padding-left","padding-inline-start","padding-block-end","<selectedcontent>","<button>","name","<label>","value","keydown","Left","Right","getBoundingClientRect()","grid-template-columns","grid-column","::picker()","menu","listbox","role=\"grid\"","Down","Up","<optgroup>","<svg>","<div>"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/forms/custom-select-picker-layouts.md"},{"id":"form-fields-automatically-fit-contents","cat":"forms","title":"Form Fields Automatically Fit Contents","kind":"usecase","desc":"Allow form fields to grow and shrink to fit the user input, e.g. as the user types or selects a different option. Apply maximum and minimum size limits to create dynamic and responsive form fields that conform with the page design.","ucCat":"forms","chars":6042,"codes":4,"sections":[],"baselines":[{"feature":"field-sizing","status":"Newly available"}],"tokens":["<input>","<textarea>","<select>","field-sizing: content","min-inline-size","min-width","max-inline-size","max-width","width","height","width: auto","width: fit-content","height: auto","align-self: start","justify-self: start","field-sizing"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/forms/form-fields-automatically-fit-contents.md"},{"id":"forms","cat":"forms","title":"Forms","kind":"overview","desc":"<input type=\"checkbox\" id=\"exact\" name=\"exact\" value=\"true\">","ucCat":"","chars":19380,"codes":11,"sections":["1. Semantic Structure and Form Element","2. Accessible Labeling and State","3. Autofill and Input Hints","4. Constraints and Validation","5. Responsive Design and Typography","6. Styling Form Controls","7. JavaScript and AJAX","8. Identity, Payments, and Advanced Security","9. Address Collection","10. Usability Testing and Analytics","11. Multi-Page Forms"],"baselines":[],"tokens":["<form>","<search>","aria-labelledby","method=\"POST\"","method=\"GET\"","action","name","<button type=\"submit\">","<textarea>","<select>","<input>","type=\"button\"","<fieldset>","<legend>","GET","<div>","<span>","<a>","Tab","<input type=\"checkbox\">","<input type=\"radio\">","<input list=\"id\">","<datalist>","<label>","for","id","3-12 characters","placeholder","aria-invalid=\"true\"","aria-describedby","lang","<html>","required","aria-live","aria-label","autocomplete","email","tel","current-password","new-password","inputmode","inputmode=\"numeric\"","enterkeyhint","next","done","autocorrect=\"off\"","autocapitalize=\"none\"","spellcheck=\"false\"","sms-otp-form","type=\"number\"","type=\"text\"","type=number","--value-length","paste","minlength","maxlength","pattern",":user-invalid","setCustomValidity",":invalid","blur","input","focusout","submit","font: inherit","1rem","48px","rem","line-height","margin-inline-start"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/forms/forms.md"},{"id":"ime-safe-enter-submit","cat":"forms","title":"IME-safe enter-to-submit","kind":"usecase","desc":"Implement Enter-to-submit in textareas and single-line inputs (chat, search, inline rename) safely for IME (Input Method Editor) users to prevent submitting incomplete text.","ucCat":"forms","chars":6440,"codes":4,"sections":["Implementation strategy","Accessibility and testing","Fallback strategies"],"baselines":[],"tokens":["Enter","<textarea>","Return","keydown","<input>","isComposing","true","<form>","KeyboardEvent","event.preventDefault()","Shift+Enter","Cmd+Enter","Ctrl+Enter","<button type=\"submit\">","<label>","id","for","compositionend","event.isComposing","false","keyCode === 229","keyCode: 229","VK_PROCESSKEY","event.key === 'Enter'","event.keyCode === 229","event.keyCode === 13","event.timeStamp","keyCode"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/forms/ime-safe-enter-submit.md"},{"id":"required-field-feedback","cat":"forms","title":"Required Field Feedback","kind":"usecase","desc":"Provide error message for required form fields that were skipped or left empty *only* after user interaction, to avoid preemptive errors and ensure feedback is timely and contextually relevant to the user's flow.","ucCat":"forms","chars":14249,"codes":6,"sections":["The Problem","The Solution","Implementation Guide","Fallbacking & Browser Support","Other Considerations"],"baselines":[],"tokens":[":user-invalid","required","onBlur","touched","aria-describedby","data-error","id","aria-invalid=\"true\"","checkValidity()","aria-invalid","aria-invalid=\"false\"","data-error=\"email-error\"","<div id=\"email-error\">",".visually-hidden","WeakMap","<span aria-hidden=\"true\">*</span>","disabled"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/forms/required-field-feedback.md"},{"id":"rich-media-picker","cat":"forms","title":"Rich Media Picker (Customizable Select)","kind":"usecase","desc":"Create a custom select component whose options can contain complex HTML formatting (e.g. images, icons, and other rich formatting) rather than just plain text.","ucCat":"forms","chars":10724,"codes":5,"sections":["How to Implement","Example Code: Rich Role Picker","Strategic Implementation & Best Practices","Accessibility considerations","Fallback Strategies"],"baselines":[],"tokens":["<select>","appearance: base-select","<option>","::picker(select)","<button>","<selectedcontent>","z-index","name","<label>","value","aria-label","<svg>","<div>"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/forms/rich-media-picker.md"},{"id":"select-menu-interaction","cat":"forms","title":"Select Menu Interaction","kind":"usecase","desc":"Validate that a non-default option has been chosen in a select menu only after the user has interacted with the control.","ucCat":"forms","chars":13179,"codes":6,"sections":["The Problem","The Solution","Implementation Guide","Fallbacking & Browser Support","Other Considerations"],"baselines":[],"tokens":[":user-invalid","<select>","required","value=\"\"","aria-describedby","data-error","id","WeakMap","aria-invalid","aria-invalid=\"false\"","aria-invalid=\"true\"","data-error=\"email-error\"","<div id=\"email-error\">",".visually-hidden"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/forms/select-menu-interaction.md"},{"id":"slider","cat":"forms","title":"Brand-Consistent Range Slider","kind":"usecase","desc":"Style a native range slider with custom track, thumb, fill, and focus states while preserving native functionality and accessibility.","ucCat":"forms","chars":6690,"codes":7,"sections":["Use the native range input","Choose the styling approach","Style the track and thumb","Style the active track","Limitations","Fallbacks"],"baselines":[{"feature":"progress()","status":"Newly available"}],"tokens":["<input type=\"range\">","<div>","min","max","step","value","aria-valuetext","::before","::after","position-aware-tooltips","brand-consistent-forms","accent-color","appearance: none","margin: 0","border: 0","::-moz-range-progress","--control-value","input","progress()","attr()","--slider-progress","calc()","--attr-min","--attr-max"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/forms/slider.md"},{"id":"sms-otp-form","cat":"forms","title":"SMS OTP form verification","kind":"usecase","desc":"Verify user phone numbers and one-time passcodes delivered over SMS with automatic code extraction and accessible form input.","ucCat":"forms","chars":12806,"codes":7,"sections":["Security considerations","Semantic form markup","Origin-bound SMS message format","Integrating the WebOTP API into your verification flow","Cross-origin iframe verification","Fallback strategies"],"baselines":[{"feature":"inputmode","status":"Widely available"},{"feature":"AbortController and AbortSignal","status":"Widely available"}],"tokens":["<form>","@domain #code","<input>","autocomplete=\"one-time-code\"","inputmode=\"numeric\"","<input type=\"number\">","passkeys","method=\"POST\"","<button type=\"submit\">","type=\"text\"","type=\"number\"","type=\"tel\"","<label>","for","id","aria-describedby","maxlength=\"1\"","letter-spacing","and the OTP prefixed by","@<domain> #<otp>","https://","http://",":8080","/verify","@domain","@<domain>","#<otp>","OTPCredential","http://localhost","DOMContentLoaded","form.submit()","navigator.credentials.get()","AbortController","AbortSignal","signal: ac.signal","ac.abort()","form.requestSubmit()","otp","otpInput.value = otp.code","submit","event.preventDefault()","fetch()","<iframe>","shop.example","bank.example","@shop.example","@bank.example","Permissions-Policy","otp-credentials","allow=\"otp-credentials\"","title","https://bank.example","call behind",". When","<iframe allow=\"otp-credentials\">","inputmode"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/forms/sms-otp-form.md"},{"id":"switch","cat":"forms","title":"Build Accessible Switch Controls","kind":"usecase","desc":"Build an accessible switch with the native HTML switch attribute, falling back to a styled checkbox when not supported.","ucCat":"forms","chars":2595,"codes":3,"sections":["Markup","Styling","Fallback strategies"],"baselines":[],"tokens":["switch","<input type=\"checkbox\" switch>","<label>","checkbox",") and","(via","for","id","change","input",".checked",".value","accent-color","brand-consistent-forms","input-switch-polyfill","'switch' in HTMLInputElement.prototype","false","role=\"switch\"","appearance: none"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/forms/switch.md"},{"id":"validate-input-after-interaction","cat":"forms","title":"Validate Input After Interaction","kind":"usecase","desc":"Show form field validation feedback (e.g. password complexity or email format requirements) only after the user has finished their initial interaction, avoiding premature errors on page load or while the user is typing.","ucCat":"forms","chars":17621,"codes":8,"sections":["The Problem","The Solution","Implementation Guide","Fallbacking & Browser Support","Other Considerations"],"baselines":[],"tokens":[":invalid",":user-invalid","type=\"email\"","pattern","required",":user-valid","aria-describedby","data-error","id","WeakMap","user@localserver","aria-invalid","aria-invalid=\"false\"","aria-invalid=\"true\"","data-error=\"email-error\"","<div id=\"email-error\">",".visually-hidden"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/forms/validate-input-after-interaction.md"},{"id":"accessible-web-components","cat":"html","title":"Accessible Web Components","kind":"usecase","desc":"Make custom elements accessible by default, setting roles and ARIA state via the ElementInternals ARIA mixin, managing focus with delegatesFocus, and keeping ARIA relationships within a single shadow root.","ucCat":"html","chars":5235,"codes":1,"sections":["Default semantics via the ElementInternals ARIA mixin","Focus management and `delegatesFocus`","ARIA relationships across shadow roots","Fallback strategies"],"baselines":[{"feature":"ARIA attribute reflection","status":"Widely available"},{"feature":"the api.Element.ariaLabelledByElements capability","status":"Newly available"}],"tokens":["<button>","<nav>","<ul>","ElementInternals","delegatesFocus","ToggleSwitch","connectedCallback","document.createElement","tabindex","delegatesFocus: true","static formAssociated = true","<label>",":focus","tabindex=\"-1\"",".focus()","id","aria-labelledby","aria-describedby","aria-controls","ariaLabelledByElements","ariaDescribedByElements","aria-label","aria-*"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/html/accessible-web-components.md"},{"id":"custom-elements","cat":"html","title":"Custom Elements","kind":"usecase","desc":"Define, register, and manage the lifecycle of autonomous custom elements, covering constructor rules, lifecycle callbacks, upgrade timing, attribute/property reflection, and naming conventions.","ucCat":"html","chars":9438,"codes":3,"sections":["Lifecycle: the parts that get implemented wrong","Upgrade timing and `:defined`","Attribute ⇄ property reflection","Custom states","Naming conventions"],"baselines":[],"tokens":["customElements.define()","connectedCallback","connectedMoveCallback","Node.moveBefore()","disconnectedCallback","super()","this","ReferenceError","slotchange","attributeChangedCallback","observedAttributes","define()",":defined","HTMLElement","opacity","visibility: hidden",":has(:not(:defined))","body","getAttribute","ElementInternals",":state()","busy","expanded","invalid","CustomStateSet","error","data-status","styling-web-components","fields (","static","style","class","id","slot","part","title","lang","dir","disabled","my-toggle","lowerCamelCase"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/html/custom-elements.md"},{"id":"form-associated-custom-elements","cat":"html","title":"Form-Associated Custom Elements","kind":"usecase","desc":"Make a custom control participate natively in forms with formAssociated and ElementInternals, submitting its own value, integrating with constraint validation, and reacting to reset, disable, and state-restore.","ucCat":"html","chars":5006,"codes":2,"sections":["Accessibility considerations","Fallback strategies"],"baselines":[{"feature":"Form-associated custom elements","status":"Widely available"}],"tokens":["<input>","formAssociated","ElementInternals","required","disabled","this","<fieldset disabled>","static formAssociated = true","formXxxCallback","setFormValue(value)","FormData",":invalid",":valid",":user-valid",":user-invalid","formResetCallback","formDisabledCallback","formStateRestoreCallback","fieldset[disabled]","formDisabledCallback(disabled)","<fieldset>",":disabled","input","change","InputEvent","Event","for","static formAssociated"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/html/form-associated-custom-elements.md"},{"id":"html","cat":"html","title":"HTML","kind":"overview","desc":"3. Resource Prioritization and Performance","ucCat":"","chars":21310,"codes":11,"sections":["Table of Contents","1. Fundamental Semantics and Validation","2. Content Grouping and Attribution","3. Resource Prioritization and Performance","4. Native Overlays: Dialogs and Popovers","5. Disclosures: Details and Summary","6. Focus Boundaries and Visibility","7. HTML APIs and Forms Grouping","8. Native Media Elements","9. Dynamic Styles and Interactivity"],"baselines":[],"tokens":["lang","<html>","hyphens","<meta name=\"viewport\">","content","<h1>","<h2>","<h3>","<h4>","<header>","<nav>","<main>","<aside>","<footer>","<search>","role=\"search\"","<button>","<a>","type=\"button\"","<ul>","<ol>","<dl>","role","button","link","aria-hidden=\"true\"","<img>","alt","alt=\"\"","<div>","<span>","disabled","disabled=\"disabled\"","role=\"presentation\"","banner","main","contentinfo","<blockquote>","cite","<figure>","<figcaption>","<cite>","<code>","<pre>","tabindex=\"0\"","role=\"region\"","aria-labelledby","aria-label","fetchpriority=\"high\"","<link rel=\"preload\" as=\"image\">","loading=\"lazy\"","width","height","srcset","<picture>","fetchpriority=\"low\"","declarative-dialog-popover-control","<dialog>",".showModal()","Esc","closedby=\"any\"","popover","::backdrop","<form method=\"dialog\">","formmethod=\"dialog\"",".returnValue","show()","showModal()","<dialog popover=\"auto\">","closedby"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/html/html.md"},{"id":"prerendering-custom-elements","cat":"html","title":"Pre-rendering custom elements","kind":"usecase","desc":"Server-render a custom element, then hydrate it in place without re-rendering or a flash of unstyled content.","ucCat":"html","chars":3671,"codes":2,"sections":["Authoring a declarative shadow root","Hydration timing","Avoiding FOUC","Fallback strategies"],"baselines":[{"feature":"Declarative shadow DOM","status":"Widely available"}],"tokens":["<template>","shadowrootmode","shadowrootmode=\"open\"","closed","this.shadowRoot","serializable: true","<template shadowrootmode>","<style>","<link>",":host"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/html/prerendering-custom-elements.md"},{"id":"shadow-dom","cat":"html","title":"Shadow DOM, Templates & Slots","kind":"usecase","desc":"Encapsulate a component's DOM and styles with Shadow DOM, construct the tree efficiently with HTML templates, and project consumer content with slots.","ucCat":"html","chars":3922,"codes":4,"sections":["Attaching a shadow root","Templates: construct the tree efficiently","Slots: the parts that surprise people","Loading stylesheets into a shadow root"],"baselines":[],"tokens":["delegatesFocus: true",":focus","static formAssociated = true","<label>","mode: 'open'","element.shadowRoot","web-components","<template>","innerHTML",":first-child",":last-child","::slotted(*:first-child)","slotchange","connectedCallback","<style>","<link rel=\"stylesheet\">","adoptedStyleSheets","CSSStyleSheet","@import"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/html/shadow-dom.md"},{"id":"styling-web-components","cat":"html","title":"Styling Web Components","kind":"usecase","desc":"Style across the shadow boundary with :host selectors, inherited and custom properties for theming, ::slotted and ::part, and cascade layers and container queries inside components.","ucCat":"html","chars":8875,"codes":9,"sections":["`:host`, `:host()`, `:host-context()`","Inherited properties and custom properties cross the boundary","`::slotted()`: styling projected Light DOM","`::part()` and `exportparts`: expose internals for theming","Forwarding styles to a wrapped native element","`:state()`: style the component's own states","`@layer` and container queries inside components","Fallback strategies"],"baselines":[{"feature":"Shadow parts","status":"Widely available"},{"feature":"Cascade layers","status":"Widely available"},{"feature":"Container queries (size)","status":"Widely available"}],"tokens":[":host",":host()",":host-context()","color","font-family","line-height","var()","--card-bg","::slotted()","::slotted(selector)","::part()","exportparts","part=\"name\"","<div>","<my-button>","<button>","<input>","<select>","font","font: inherit","color: inherit","background","border","padding","::part","display: contents","all: inherit","revert","getBoundingClientRect()","getClientRects()",":state()","ElementInternals","this.#internals.states.add('busy')",".delete('busy')","custom-elements",":host(:state(name))","tag-name:state(name)","data-*","@layer","display: block","display: inline","inline","contents"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/html/styling-web-components.md"},{"id":"web-components","cat":"html","title":"Web Components Orientation","kind":"usecase","desc":"Orientation and cross-cutting principles for authoring and using Web Components, covering Custom Elements, Shadow DOM, templates and slots, Declarative Shadow DOM, styling across the shadow boundary, Form-Associated Custom Elements, and accessibility requirements. Use this guide when building reusable UI components, design systems, or server-rendered custom elements.","ucCat":"html","chars":6784,"codes":0,"sections":["Decide whether you even need a custom element","Match the tool to the codebase","Cross-cutting rules","Use-case guide matrix"],"baselines":[],"tokens":["<button>","<details>","@layer","@scope","<my-button>","styling-web-components","change","custom-elements","<template>","my-element","super()","this","<nav>","<ul>","id","aria-labelledby","aria-describedby","aria-controls","shadowrootmode=\"open\"","mode: 'closed'","element.shadowRoot","extends HTMLButtonElement","shadow-dom","prerendering-custom-elements","::part","<form>","form-associated-custom-elements","accessible-web-components"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/html/web-components.md"},{"id":"calculate-event-differentials","cat":"js","title":"Calculating Event Differentials and Formatting Durations with Temporal","kind":"usecase","desc":"Calculate elapsed or remaining time between dates and times, balance duration units, and format human-readable localized durations using Temporal.Duration and Intl.DurationFormat.","ucCat":"js","chars":8459,"codes":3,"sections":["How to Implement","Strategic Implementation & Best Practices","Fallback Strategy"],"baselines":[{"feature":"Intl.DurationFormat","status":"Newly available"}],"tokens":["Date","Temporal","Temporal.ZonedDateTime","Temporal.Duration","Intl.DurationFormat","Temporal.Now.zonedDateTimeISO()","Temporal.Now.zonedDateTimeISO(timeZone)",".since()",".until()","largestUnit","'year'","'month'","'day'","'hour'","smallestUnit","'minute'","relativeTo","or","as","years","months","weeks","duration.toString()","P1M2DT4H","round","timeZone",".round()","ZonedDateTime","duration.toLocaleString()","'long'","'short'","'narrow'","'digital'","PT1H30M","PlainTime","HH:MM","<input type=\"time\">","rather than string",".add()",".subtract()",".with()",".getTime()",".sign","Temporal.ZonedDateTime.compare()","sign < 0","temporal-polyfill","globalThis.Temporal"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/js/calculate-event-differentials.md"},{"id":"capture-location-agnostic-data","cat":"js","title":"Capturing Location-Agnostic Data and Partial Dates with Temporal","kind":"usecase","desc":"Model location-agnostic calendar dates, wall-clock times, partial dates (recurring birthdays, credit card expirations), and recurring monthly intervals without time zone drift using Temporal Plain types.","ucCat":"js","chars":9874,"codes":5,"sections":["How to Implement","Strategic Implementation & Best Practices","Fallback Strategy"],"baselines":[],"tokens":["Date","\"1990-01-01\"","\"1989-12-31\"","Temporal","Temporal.PlainDate","year","month","day","Temporal.PlainTime","hour","minute","second","Temporal.PlainDateTime","PlainDate","PlainTime","Temporal.PlainMonthDay","Temporal.PlainYearMonth","2027-12","Temporal.Plain*","Temporal.PlainDate.from()","Temporal.PlainTime.from()","Temporal.PlainDateTime.from()","plainDate.toPlainDateTime(plainTime)","Temporal.PlainMonthDay.from()","Temporal.PlainYearMonth.from()","calendar","'iso8601'","PlainMonthDay","PlainYearMonth",".add()","overflow","RangeError","PlainDateTime","overflow: 'constrain'","'reject'","\"31/12/1989\"","Temporal.Instant","overflow: 'reject'","calendar: 'iso8601'","Temporal.ZonedDateTime","). Produce a","from the","of a","or",".year",".month",".day",".equals()","America/New_York","\"UTC-5\"",".subtract()",".with()","temporal-polyfill","globalThis.Temporal"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/js/capture-location-agnostic-data.md"},{"id":"coordinate-global-events","cat":"js","title":"Coordinating Global Events with Temporal","kind":"usecase","desc":"Schedule future meetings or events by explicitly binding them to a geographical IANA time zone so that event times remain accurate regardless of Daylight Saving Time (DST) transitions, \"skipped\" or \"repeated\" hours during clock changes.","ucCat":"js","chars":4045,"codes":2,"sections":["How to Implement","Strategic Implementation & Best Practices","Fallback Strategy"],"baselines":[],"tokens":["Date","Temporal","Temporal.ZonedDateTime","Temporal.ZonedDateTime.from()","disambiguation",".withTimeZone()","disambiguation: 'reject'","disambiguation: 'compatible'","Temporal.PlainDateTime",".toLocaleString()","temporal-polyfill","globalThis.Temporal"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/js/coordinate-global-events.md"},{"id":"sort-high-precision-timestamps","cat":"js","title":"Sorting High-Precision Timestamps with Temporal.Instant","kind":"usecase","desc":"Parse, sort, and measure intervals between sub-millisecond or nanosecond ISO 8601 timestamps without Date truncation collisions using Temporal.Instant.","ucCat":"js","chars":6703,"codes":2,"sections":["How to Implement","Example Code: Sorting High-Precision Timestamps","Strategic Implementation & Best Practices","Fallback Strategy"],"baselines":[],"tokens":["2026-04-01T12:00:00.000123456Z","Date","new Date()","Date.parse()","Temporal.Instant","Temporal.Instant.from()","Temporal.Instant.compare()","Temporal.Duration","Temporal.Now.instant()","performance.now()","Temporal.Instant.from(isoString)","Array.prototype.sort()","Array.prototype.toSorted()","instant.since(previousInstant)","a.equals(b)","toLocaleString()","duration.toLocaleString()","Intl.DurationFormat","Number","Temporal.Instant.prototype.toString()","new Date(ts)","Temporal.PlainDateTime","performance.mark()",".toString()","duration.total('nanoseconds')","Number.MAX_SAFE_INTEGER","epochNanoseconds","BigInt",".toLocaleString()","Instant","Temporal.ZonedDateTime","instant.toZonedDateTimeISO(timeZone)","Temporal","temporal-polyfill","globalThis.Temporal"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/js/sort-high-precision-timestamps.md"},{"id":"support-global-calendar-systems","cat":"js","title":"Supporting Global Calendar Systems with Temporal","kind":"usecase","desc":"Display and calculate dates in non-Gregorian calendar systems (e.g., Islamic, Hebrew, or Chinese) accurately for international users.","ucCat":"js","chars":5961,"codes":2,"sections":["How to Implement","Example Code: Converting and Iterating Calendars","Strategic Implementation & Best Practices","Fallback Strategy"],"baselines":[],"tokens":["Date","Temporal","Temporal.PlainDate","withCalendar()","monthCode","month","monthsInYear","daysInMonth","Temporal.PlainDate.compare()","date.month === 12","date.month === date.monthsInYear","inLeapYear === true","toLocaleString()","Intl.supportedValuesOf('calendar')","Intl","temporal-polyfill","globalThis.Temporal"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/js/support-global-calendar-systems.md"},{"id":"batch-analytics-events","cat":"performance","title":"Debounce and batch multiple analytics events","kind":"usecase","desc":"Debounce and batch multiple analytics, telemetry, and Core Web Vitals events together in a single beacon to minimize network contention and reduce server load, while still delivering real-time updates.","ucCat":"performance","chars":6594,"codes":2,"sections":["How to implement","Example code","Best Practices","Browser support and fallback strategies"],"baselines":[],"tokens":["fetchLater()","activateAfter","activated","true","load","click","AbortController","try/catch","globalThis","ReadableStream","visibilityState","navigator.sendBeacon()"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/batch-analytics-events.md"},{"id":"break-up-long-tasks","cat":"performance","title":"Break Up Long Tasks","kind":"usecase","desc":"Break up heavy synchronous processing (complex computations and/or long loops) or DOM updates to improve Interaction to Next Paint (INP) responsiveness and let the browser handle user input and repaint the screen.","ucCat":"performance","chars":2287,"codes":2,"sections":[],"baselines":[],"tokens":["scheduler.yield()","scheduler","setTimeout"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/break-up-long-tasks.md"},{"id":"calculate-total-foreground-time","cat":"performance","title":"Calculate total foreground time","kind":"usecase","desc":"Calculate the total time a user actually spent viewing a page, excluding periods when the tab was in the background.","ucCat":"performance","chars":2978,"codes":2,"sections":["Implementing foreground time calculation","Fallbacks & browser support"],"baselines":[],"tokens":["VisibilityStateEntry","PerformanceTimeline","visibilitychange","visibility-state","performance.now()"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/calculate-total-foreground-time.md"},{"id":"conditional-async-dependencies","cat":"performance","title":"Conditional Async Dependencies","kind":"usecase","desc":"Conditionally load or initialize async dependencies (such as importing polyfills for missing web features) without requiring complex orchestration across all of a page's script dependencies.","ucCat":"performance","chars":5406,"codes":3,"sections":[],"baselines":[{"feature":"Top-level await","status":"Newly available"}],"tokens":["await","popover","HTMLElement.prototype","./app.js","a.js","b.js","./conditionally-load-polyfill.js","main.js","import()","async",".then()"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/conditional-async-dependencies.md"},{"id":"defer-rendering-heavy-content","cat":"performance","title":"Defer rendering heavy content","kind":"usecase","desc":"Reduce rendering times in content-heavy web pages (e.g. pages with long feeds, lots of articles, or complex dashboards), by deferring rendering for any content that is not immediately visible to the user.","ucCat":"performance","chars":6416,"codes":3,"sections":["When to use which","How to implement `content-visibility: auto`","How to implement `content-visibility: hidden`","Best Practices","Fallback strategies"],"baselines":[{"feature":"content-visibility","status":"Newly available"}],"tokens":["content-visibility","hidden=\"until-found\"","content-visibility: auto","content-visibility: hidden","display: none","search-hidden-content","contain-intrinsic-size","auto","visible"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/defer-rendering-heavy-content.md"},{"id":"defer-work-until-scroll-ends","cat":"performance","title":"Defer Work Until Scroll Ends","kind":"usecase","desc":"Defer expensive operations like DOM updates, data fetching, analytics tracking, or layout recalculation until after scrolling completes to maintain smooth scroll performance.","ucCat":"performance","chars":3376,"codes":3,"sections":["How to Implement","Example Code","Strategic Implementation & Best Practices","Fallback Strategy"],"baselines":[{"feature":"scrollend","status":"Newly available"}],"tokens":["scroll","setTimeout()","scrollend","overflow: auto","overflow: scroll","scrollSnapChange","scrollSnapChanging","setTimeout"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/defer-work-until-scroll-ends.md"},{"id":"deliver-optimized-decorative-images","cat":"performance","title":"Deliver Optimized Decorative Images","kind":"usecase","desc":"Deliver optimized decorative images (such as backgrounds, UI icons, or complex masks) by simultaneously providing next-generation image formats (like AVIF or WebP) alongside multiple pixel densities (like 1x and 2x) so the browser can dynamically negotiate the best combination of file size and visual quality for the user's device capabilities.","ucCat":"performance","chars":2918,"codes":2,"sections":[],"baselines":[{"feature":"image-set()","status":"Widely available"}],"tokens":["image-set()","1x","2x","<img>","<picture>","<link rel=preload>","media","<image>","background-image","content","mask-image","type()"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/deliver-optimized-decorative-images.md"},{"id":"deprioritize-background-fetches","cat":"performance","title":"Deprioritize background fetches","kind":"usecase","desc":"Deprioritize background data fetches made with the Fetch API to prevent network contention with user-initiated requests.","ucCat":"performance","chars":1870,"codes":1,"sections":["How to implement","Example code","Best practices","Fallback strategy"],"baselines":[{"feature":"Fetch priority","status":"Newly available"}],"tokens":["fetch()","priority: 'low'","importance","priority"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/deprioritize-background-fetches.md"},{"id":"detect-initial-visibility-state","cat":"performance","title":"Detect Initial Visibility State","kind":"usecase","desc":"Reliably determine whether a page was initially loaded in the background, even in cases where the script is loaded asynchronously after the user foregrounded the page.","ucCat":"performance","chars":4675,"codes":2,"sections":[],"baselines":[],"tokens":["VisibilityStateEntry","document.visibilityState","visibilitychange","'visible'"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/detect-initial-visibility-state.md"},{"id":"efficient-background-processing","cat":"performance","title":"Efficient Background Processing","kind":"usecase","desc":"Conserve system resources and battery life by pausing background JavaScript execution (such as `&lt;canvas&gt;` animations, WebGL rendering, or high-frequency WebSocket data polling) when the component is off-screen and then resume them just-in-time when they scroll back into view.","ucCat":"performance","chars":5141,"codes":3,"sections":["Overview","Implementation"],"baselines":[{"feature":"content-visibility","status":"Newly available"}],"tokens":["content-visibility: auto","contentvisibilityautostatechange","<canvas>","IntersectionObserver","content-visibility"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/efficient-background-processing.md"},{"id":"faster-spa-view-transitions","cat":"performance","title":"Faster SPA View Transitions via State Caching","kind":"usecase","desc":"Enable faster transitions back to previously visited views in a Single-Page Application (SPA) by preserving their structural DOM state instead of destroying and rebuilding them on every navigation.","ucCat":"performance","chars":3731,"codes":3,"sections":["Overview","Implementation"],"baselines":[{"feature":"content-visibility","status":"Newly available"}],"tokens":["display: none","content-visibility: hidden","inert","content-visibility"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/faster-spa-view-transitions.md"},{"id":"flicker-free-client-side-ab-testing","cat":"performance","title":"Flicker-Free Client-Side A/B Testing","kind":"usecase","desc":"Deliver and render A/B tests, multi-variate tests, or other experiments using client-side JavaScript to alter or inject HTML, CSS, and JavaScript without the original content showing first before flickering or flashing to show the experiment content.","ucCat":"performance","chars":8667,"codes":5,"sections":["The Problem","The Solution","Implementation Guide","Best Practices","Fallback Strategies","Other Considerations"],"baselines":[],"tokens":["opacity: 0","blocking=render","<script>","<link>","<head>","blocking=\"render\"","type=\"module\"","async","src","defer","<html>","<body>","blocking"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/flicker-free-client-side-ab-testing.md"},{"id":"full-session-analytics","cat":"performance","title":"Reliably measure full-session analytics and telemetry","kind":"usecase","desc":"Reliably track analytics, Core Web Vitals, errors, and telemetry data across the user's entire page visit, and defer sending of the data until the user leaves the page.","ucCat":"performance","chars":5838,"codes":2,"sections":["How to implement","Example code","Best Practices","Browser support and fallback strategies"],"baselines":[],"tokens":["fetchLater()","<img>","unload","AbortController","try/catch","globalThis","ReadableStream","fetch()","keepalive","navigator.sendBeacon()","sendBeacon()","visibilitychange"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/full-session-analytics.md"},{"id":"identify-heavy-scripts","cat":"performance","title":"Identify heavy-running JavaScript","kind":"usecase","desc":"Identify the scripts most responsible for long animation frames","ucCat":"performance","chars":4333,"codes":1,"sections":["How to implement","Best Practices","Browser support and fallback strategies"],"baselines":[],"tokens":["PerformanceObserver","long-animation-frame","scripts","PerformanceScript","sourceURL","duration"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/identify-heavy-scripts.md"},{"id":"identify-inp-causes","cat":"performance","title":"Identify causes of poor INP","kind":"usecase","desc":"Identify slow-running JavaScript and other causes of poor Interaction to Next Paint (INP) responsiveness.","ucCat":"performance","chars":8912,"codes":1,"sections":["How to implement","Get attributions for INP interactions using web-vitals library","Best Practices","Browser support and fallback strategies"],"baselines":[{"feature":"Event timing performance entries","status":"Newly available"}],"tokens":["forcedStyleDuration","forcedLayoutDuration","getComputedStyle()","getBoundingClientRect()","offsetWidth","styleDuration","layoutDuration","web-vitals","onINP()","long-animation-frames","PerformanceLongAnimationFrameTiming","PerformanceScriptTiming","script.forcedStyleAndLayoutDuration","in","(or compute","on each"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/identify-inp-causes.md"},{"id":"improve-next-page-load-performance","cat":"performance","title":"Improve next page load performance","kind":"usecase","desc":"Improve page load performance by prefetching or prerendering pages that the user is likely to visit next.","ucCat":"performance","chars":7333,"codes":4,"sections":["How it works","When to use it","How to use it","Best Practices","Browser support and fallback strategies"],"baselines":[],"tokens":["urls","where","document","eagerness","immediate","eager","moderate","conservative","<script type=\"speculationrules\">","<head>","<body>","tag","Sec-Speculation-Tags","/logout","/add-to-cart"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/improve-next-page-load-performance.md"},{"id":"interaction-paint-timing","cat":"performance","title":"Measure interaction and soft-navigation paint timing","kind":"usecase","desc":"Measure the time it takes for user interactions and client-side navigations to render new contentful updates on screen.","ucCat":"performance","chars":11506,"codes":3,"sections":["How to implement","Best practices","Fallback strategies"],"baselines":[],"tokens":["LargestContentfulPaint","largest-contentful-paint","PerformanceEventTiming","event","fetch()","InteractionContentfulPaint","interaction-contentful-paint","PerformanceSoftNavigation","soft-navigation","fetch","await","setTimeout","PerformanceObserver","type: 'interaction-contentful-paint'","buffered: true","interactionId","PerformanceEventTiming.interactionId","PerformanceSoftNavigation.interactionId","startTime","paintTime","presentationTime","duration","presentationTime - startTime","largestContentfulPaint","element","size","url","id","renderTime","loadTime","'soft-navigation'","'interaction-contentful-paint'","history.pushState()","navigationId",". Using","web-vitals","before calling","when handling a new","entry.duration","entry.presentationTime - entry.startTime","entry.presentationTime","PerformanceEntry","and","'largest-contentful-paint'","'event'","'layout-shift'"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/interaction-paint-timing.md"},{"id":"interactions-in-complex-layouts","cat":"performance","title":"Optimizing Interactions in Complex Layouts","kind":"usecase","desc":"Make interactions snappier and more responsive (reducing Interaction to Next Paint (INP) scores) by avoiding layout re-calculations in complex layouts, such as data-heavy dashboards or spreadsheet-style grids.","ucCat":"performance","chars":3428,"codes":3,"sections":["Overview","Implementation"],"baselines":[{"feature":"content-visibility","status":"Newly available"}],"tokens":["content-visibility: auto"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/interactions-in-complex-layouts.md"},{"id":"lazy-load-video-and-audio","cat":"performance","title":"Lazy load video and audio","kind":"usecase","desc":"Defer downloading offscreen video and audio assets, including video poster images and preloaded media data, until the media player approaches the viewport to conserve bandwidth and reduce network contention during initial page load.","ucCat":"performance","chars":9555,"codes":3,"sections":["How to implement","Example code","Best practices","Fallback strategy"],"baselines":[],"tokens":["<video>","<audio>","<video poster>","preload=\"metadata\"","preload=\"none\"","poster","loading=\"lazy\"","preload","autoplay","loading","eager","width","height","controls","<audio loading=\"lazy\">","<video loading=\"lazy\">","none","metadata","auto","<audio controls>","@media (prefers-reduced-motion: reduce)","loading=\"eager\"","window","load","IntersectionObserver"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/lazy-load-video-and-audio.md"},{"id":"optimize-image-priority","cat":"performance","title":"Optimize image priority","kind":"usecase","desc":"Optimize the loading priority of Largest Contentful Paint (LCP) candidate images and deprioritize non-critical images to reduce critical resource load delays.","ucCat":"performance","chars":4592,"codes":1,"sections":["How to implement","Example code","Best practices","Fallback strategy"],"baselines":[{"feature":"Fetch priority","status":"Newly available"}],"tokens":["fetchpriority","<img>","loading=lazy","fetchpriority=\"high\"","fetchpriority=\"low\"","loading=\"lazy\"","auto","fetchpriority=\"auto\"","importance","loading=\"auto\""],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/optimize-image-priority.md"},{"id":"optimize-preload-priority","cat":"performance","title":"Optimize preload priority","kind":"usecase","desc":"Optimize the relative priority of preloaded content to reduce critical resource load delays.","ucCat":"performance","chars":3357,"codes":1,"sections":["How to implement","Example code","Best Practices","Fallback strategy"],"baselines":[{"feature":"Fetch priority","status":"Newly available"}],"tokens":["<link rel=\"preload\">","fetchpriority","<link rel=\"preload\" fetchpriority=\"high\">","<link rel=\"preload\" fetchpriority=\"low\">","as","fetchpriority=\"high\"","fetchpriority=\"low\"","<img>","crossorigin","importance","type"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/optimize-preload-priority.md"},{"id":"optimize-script-priority","cat":"performance","title":"Optimize script priority","kind":"usecase","desc":"Optimize the loading priority of scripts by boosting critical asynchronous scripts and deprioritizing non-essential or late-body scripts to improve sequencing and reduce delays.","ucCat":"performance","chars":2650,"codes":1,"sections":["How to implement","Example code","Best Practices","Fallback strategy"],"baselines":[{"feature":"Fetch priority","status":"Newly available"}],"tokens":["async","defer","fetchpriority","fetchpriority=\"high\"","fetchpriority=\"low\"","module","importance"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/optimize-script-priority.md"},{"id":"out-of-order-html-streaming","cat":"performance","title":"Out-of-Order (OOO) HTML Streaming","kind":"usecase","desc":"Declaratively update a page with content streamed later into the same HTML document or via imperative JavaScript APIs.","ucCat":"performance","chars":12432,"codes":3,"sections":["Quick Overview","Best Practices","Accessibility Considerations","Implementation Details","Use Case Reference Matrix","Anti-Patterns & Warnings (DO NOT DO THIS)","Fallback strategies"],"baselines":[],"tokens":["<template for>","streamHTML()","setHTMLUnsafe()","aspect-ratio","role=\"alert\"","aria-busy","true","false","aria-busy=\"true\"","aria-busy=\"false\"","<template>","setHTML()","streamHTMLUnsafe()","replaceWithHTML()","streamReplaceWithHTML()","replaceWithHTMLUnsafe()","streamReplaceWithHTMLUnsafe()","beforeHTML()","streamBeforeHTML()","beforeHTMLUnsafe()","streamBeforeHTMLUnsafe()","prependHTML()","streamPrependHTML()","prependHTMLUnsafe()","streamPrependHTMLUnsafe()","appendHTML()","streamAppendHTML()","appendHTMLUnsafe()","streamAppendHTMLUnsafe()","afterHTML()","streamAfterHTML()","afterHTMLUnsafe()","streamAfterHTMLUnsafe()","<script>","Sanitizer","TrustedHTML","WritableStream","fetch","textStream()","TextDecoderStream()","*Unsafe","html-setters-polyfill","template-for-polyfill","html-processing-instructions"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/out-of-order-html-streaming.md"},{"id":"performance","cat":"performance","title":"Performance","kind":"overview","desc":"The Critical Rendering Path dictates how quickly the browser converts HTML, CSS, and JavaScript into painted pixels.","ucCat":"","chars":21118,"codes":11,"sections":["Critical Rendering Path (CRP) Optimization","Largest Contentful Paint (LCP) & Resource Fetching","Interaction to Next Paint (INP) & Main Thread Unblocking","Third-Party Script Management","CSS Rendering & Containment Optimization","Modern Image & Media Optimization","Service Workers & Caching Strategies","Web Fonts Optimization","Video Performance & Metrics","JavaScript Code-Splitting"],"baselines":[],"tokens":["<head>","async","defer","type=\"module\"","media","<link>","preconnect","dns-prefetch","@import","preload","prefetch","<img>","<link rel=\"preload\" as=\"image\">","fetchpriority=\"high\"","<img fetchpriority=\"high\">","fetchpriority=\"low\"","overflow:scroll","loading=\"lazy\"","scheduler.yield()","setTimeout","scroll","resize","input","offsetHeight","getBoundingClientRect","style.height","setInterval","scheduler.yield","Cache-Control","content-visibility: auto","content-visibility","contain-intrinsic-size","auto","rem","lh","cap","ch","px","contain","contain: layout style paint","will-change","will-change: transform","aria-hidden","<picture>","width","height","srcset","sizes","loading=\"eager\"","100vw","CacheFirst","StaleWhileRevalidate","NetworkFirst","Cache-Control: no-store","Cache-Control: no-cache","Cache-Control: max-age=0","crossorigin","poster","preload=\"none\"","import()","app.js"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/performance.md"},{"id":"resolution-optimized-pseudo-elements","cat":"performance","title":"Resolution Optimized Pseudo Elements","kind":"usecase","desc":"Use resolution-optimized images in CSS pseudo-elements (such as `::before` and `::after`) to reduce the number of DOM nodes.","ucCat":"performance","chars":2378,"codes":2,"sections":[],"baselines":[{"feature":"image-set()","status":"Widely available"}],"tokens":["::before","::after","image-set()","1x","2x","content","background-image","content: \"\"","type()"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/resolution-optimized-pseudo-elements.md"},{"id":"schedule-tasks-by-priority","cat":"performance","title":"Schedule Tasks By Priority","kind":"usecase","desc":"Schedule tasks with different priorities to ensure critical work runs first while background work is deferred.","ucCat":"performance","chars":2315,"codes":2,"sections":[],"baselines":[],"tokens":["scheduler.postTask()","user-blocking","user-visible","background"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/schedule-tasks-by-priority.md"},{"id":"privacy","cat":"privacy","title":"Web Privacy Guidelines for Developers","kind":"usecase","desc":"Action-oriented guidelines for web developers to implement privacy by design, data minimization, third-party audits, and secure data handling. Use this skill when designing applications, integrating third-party services, handling user data, or configuring security headers.","ucCat":"privacy","chars":11211,"codes":13,"sections":["High-Level Overview","Detailed Guidelines"],"baselines":[],"tokens":["<permission>","Clear-Site-Data","HttpOnly","Partitioned","localStorage","SameSite=None","youtube-nocookie.com","Permissions-Policy","Referrer-Policy","navigator.userAgent"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/privacy/privacy.md"},{"id":"install-web-app","cat":"pwa","title":"Installing web applications","kind":"usecase","desc":"Install web applications from a page using browser-controlled consent UI.","ucCat":"pwa","chars":15335,"codes":11,"sections":["Choose which install approach to use: HTML element or JavaScript method","Prepare the web app","Use the HTML `<install>` element","Use the JavaScript `navigator.install()` method","Fallback strategies"],"baselines":[],"tokens":["<install>","navigator.install()","web-app-installation","id","Content-Type","application/manifest+json","start_url","manifest","manifestid","with no","installresult","event.result","\"success\"","\"aborted\"","\"invalid-data\"","manifestId","AbortError","DataError","NotAllowedError","TypeError","InvalidStateError","SecurityError","hidden","beforeinstallprompt"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/pwa/install-web-app.md"},{"id":"migrate-web-app-origin","cat":"pwa","title":"Migrating the Origin of an Installed Web App","kind":"usecase","desc":"Transfer an installed web app to a new origin while preserving user configuration and OS-level shortcuts.","ucCat":"pwa","chars":3700,"codes":4,"sections":["Implementation steps","Fallbacks & browser support"],"baselines":[],"tokens":["app.example.com","new.example.com","example.com","example.com/app1","example.com/app2","example.org","id","manifest.json","migrate_from",".well-known","migrate_to","behavior","force","behavior: \"force\""],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/pwa/migrate-web-app-origin.md"},{"id":"client-side-encryption","cat":"security","title":"Encrypt data client-side with WebCrypto","kind":"usecase","desc":"Establish shared secrets using public-key encapsulation or key agreement—including hybrid and post-quantum protection—and encrypt sensitive data in the browser with authenticated encryption.","ucCat":"security","chars":15159,"codes":7,"sections":["1. Choose a KEM algorithm and generate a recipient key pair","2. Export and import keys","3. Encapsulate and decapsulate a shared key","4. Encrypt and decrypt payloads (`'ChaCha20-Poly1305'` and `'AES-GCM'`)","Fallback strategies"],"baselines":[{"feature":"Web Cryptography","status":"Widely available"},{"feature":"the api.SubtleCrypto.deriveBits.x25519 capability","status":"Newly available"}],"tokens":["crypto.subtle","digital-signatures","CryptoKeyPair","'raw-public'","encapsulateKey()","deriveKey()","decapsulateKey()","'MLKEM768-X25519'","'X25519'","'ML-KEM-768'","'ML-KEM-1024'","'raw-seed'","'X-Wing'","'X25519MLKEM768'","'ML-KEM-512'","NotSupportedError","extractable: false","CryptoKey","'ChaCha20-Poly1305'","'raw'","importKey()","exportKey()","['encapsulateKey']","['encapsulateBits']","['decapsulateKey']","['decapsulateBits']","getPublicKey()","SyntaxError","'raw-private'","'jwk'","'spki'","'pkcs8'","'raw-secret'","'AES-GCM'","'HKDF'","crypto.subtle.getPublicKey()","sharedKeyAlgorithm","info","salt","['deriveKey']","crypto.subtle.deriveKey()","iv","takes a string or","with **no","property**). The","generateKey()","encrypt()","decrypt()","additionalData","OperationError","SubtleCrypto.supports()","'ECDH'","'P-256'","SubtleCrypto","crypto.subtle.supports","undefined","'encapsulateKey'","'decapsulateKey'","'generateKey'","'importKey'","'exportKey'","'getPublicKey'","'encrypt'","'decrypt'","false","(",") to derive a 256-bit"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/client-side-encryption.md"},{"id":"digital-signatures","cat":"security","title":"Sign and verify data with WebCrypto","kind":"usecase","desc":"Sign and verify messages, tokens, or artifacts in the browser using classical or quantum-resistant (post-quantum) asymmetric keys to ensure data integrity and authenticity.","ucCat":"security","chars":10170,"codes":6,"sections":["1. Choose an algorithm and generate a key pair","2. Export and import keys","3. Sign and verify payloads","Fallback strategies"],"baselines":[{"feature":"Web Cryptography","status":"Widely available"},{"feature":"the api.SubtleCrypto.sign.ed25519 capability","status":"Newly available"}],"tokens":["crypto.subtle","'Ed25519'","'ECDSA'","client-side-encryption","'ML-DSA-65'","'ML-DSA-44'","'ML-DSA-87'","'raw-public'","'Dilithium'","'CRYSTALS-Dilithium'","NotSupportedError","hash","generateKey()","'raw'","importKey()","exportKey()","['verify']","'raw-seed'","'raw-private'","'pkcs8'","'jwk'","kty: 'AKP'","['sign']","SyntaxError","'spki'","CryptoKey","extractable: false","crypto.subtle.getPublicKey()","crypto.subtle.sign()","crypto.subtle.verify()","ContextParams","context","sign()","verify()","BufferSource","Uint8Array","ArrayBuffer","to","bytes (omitting","is equivalent to passing an empty","). Passing more than","bytes rejects with","true","SubtleCrypto.supports()","'P-256'","'SHA-256'","SubtleCrypto","crypto.subtle.supports","undefined","'sign'","'verify'","'generateKey'","'importKey'","'exportKey'","'getPublicKey'","Algorithm","EcdsaParams"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/digital-signatures.md"},{"id":"local-network-access","cat":"security","title":"Local Network Access","kind":"usecase","desc":"Access resources on a user's local network or loopback interface from a public web application.","ucCat":"security","chars":12608,"codes":6,"sections":["Implementation Steps","Fallback Strategies"],"baselines":[],"tokens":["public","local","192.168.1.x","device.local","127.0.0.1","[::1]","localhost","Permissions-Policy","loopback","local-network","10.0.0.0/8","172.16.0.0/12","192.168.0.0/16","169.254.0.0/16","fe80::/10","fc00::/7",".local","loopback-network","127.0.0.0/8","::1/128","http://localhost","Ask","Allow","Block","https://","http://","Access-Control-Request-Private-Network: true","Access-Control-Allow-Private-Network: true","Access-Control-Allow-Origin","DOMContentLoaded","'prompt'","Document","'granted'","navigator.permissions.query()","'local-network'","'loopback-network'","state === 'granted'","state === 'prompt'","state === 'denied'","targetAddressSpace","fetch()","Request","targetAddressSpace: 'local'","targetAddressSpace: 'loopback'","'loopback'","TypeError","WebSocket","WebTransport","SyntaxError","ws://","ws://192.168.1.100:8080","ws://127.0.0.1:8080","ws://[::1]:8080","*.localhost","ws://device.local:8080","wss://","serverCertificateHashes","transport.ready","'self'","<iframe>","allow","in a",". If the browser throws a","because","or","is an unrecognized","try / catch","'local-network-access'"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/local-network-access.md"},{"id":"passkey-authentication","cat":"security","title":"Passkey Authentication","kind":"usecase","desc":"Authenticate a returning user with a passkey for primary sign-in.","ucCat":"security","chars":11774,"codes":5,"sections":["Server-Side","Client-Side Logic","Fallback Strategies"],"baselines":[{"feature":"the api.PublicKeyCredential.getClientCapabilities_static capability","status":"Newly available"},{"feature":"the api.PublicKeyCredential.parseRequestOptionsFromJSON_static capability","status":"Newly available"}],"tokens":["rpId","publicKey.rpId","[]","allowCredentials","userVerification: \"preferred\"","\"required\"","userVerification","expectedUserVerification","\"preferred\"","requireUserVerification: false","autofocus","aria-describedby","PublicKeyCredential.getClientCapabilities()","conditionalGet","navigator.credentials.get()","mediation: \"conditional\"","AbortController","navigator.credentials.get","NotAllowedError","AbortError","fetch()","signalUnknownCredential()","rpId: publicKey.rpId","window.location.hostname","example.com","login.example.com","credentialId","encoded.id","credential.rawId","AuthenticatorAssertionResponse",".toJSON()","webauthn-polyfills","PublicKeyCredential","npm install webauthn-polyfills","https://esm.sh/webauthn-polyfills@0.1.7","integrity","<script>","import","webauthn-signals","and","are available whenever"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/passkey-authentication.md"},{"id":"passkey-conditional-create","cat":"security","title":"Passkey Conditional Create (Post-Login Promotion)","kind":"usecase","desc":"Silently register a passkey for an existing user after a successful password login.","ucCat":"security","chars":8040,"codes":4,"sections":["The Right Trigger Moment","Implementation Steps","Code Example","Fallback Strategies"],"baselines":[{"feature":"the api.PublicKeyCredential.getClientCapabilities_static capability","status":"Newly available"},{"feature":"the api.PublicKeyCredential.parseCreationOptionsFromJSON_static capability","status":"Newly available"}],"tokens":["abortController.abort()","AbortController","navigator.credentials.get()","navigator.credentials.create()","conditionalCreate","PublicKeyCredential.getClientCapabilities()","rp.id","publicKey.rp.id","in WebAuthn creation options leaves","excludeCredentials","mediation: 'conditional'","navigator.credentials.create","InvalidStateError","NotAllowedError","AbortError","requireUserPresence: false","rpId","window.location.hostname","webauthn-polyfills","PublicKeyCredential","npm install webauthn-polyfills","https://esm.sh/webauthn-polyfills@0.1.7","integrity","<script>","import","webauthn-signals","and","are available whenever"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/passkey-conditional-create.md"},{"id":"passkey-management","cat":"security","title":"Passkey Management","kind":"usecase","desc":"Let users view and manage the passkeys registered to their account.","ucCat":"security","chars":17757,"codes":8,"sections":["Server-Side Operations","Client-Side Management UI","Signal API Synchronization","Determine the passkey provider from AAGUID {: #aaguid }","Fallback Strategies"],"baselines":[{"feature":"the api.PublicKeyCredential.getClientCapabilities_static capability","status":"Newly available"}],"tokens":["StoredPasskeyCredential","rpId","passkeyUserId","window.location.hostname","id","[A-Za-z0-9_-]","Buffer.from('cred-1').toString('base64url')","'dGVzdC1jcmVkLTE'","'passkey-1'","'cred_yubikey_01'","name","displayName","aaguid","registeredAt","lastUsedAt","PUT /api/credential/:id","signalCurrentUserDetails()","DELETE /api/credential/:id","signalAllAcceptedCredentials()","PUT /api/user","PublicKeyCredential.getClientCapabilities()","on","'cred:01'","rp.id","example.com","accounts.example.com","/.well-known/webauthn","SecurityError","and","userId","signalAllAcceptedCredentials","signalCurrentUserDetails","allAcceptedCredentialIds","DOMContentLoaded","useEffect","console.warn","console.error","try...catch","errors-in-console","providerIcon","'00000000-0000-0000-0000-000000000000'","undefined","webauthn-polyfills","PublicKeyCredential","npm install webauthn-polyfills","https://esm.sh/webauthn-polyfills@0.1.7","integrity","<script>","import","webauthn-signals"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/passkey-management.md"},{"id":"passkey-reauthentication","cat":"security","title":"Passkey Reauthentication","kind":"usecase","desc":"Verify a signed-in user's identity using their existing passkeys before a sensitive action.","ucCat":"security","chars":6510,"codes":5,"sections":["Delta Flow Architecture","Server-Side","Client-Side Flow Deltas","Fallback Strategies"],"baselines":[{"feature":"the api.PublicKeyCredential.getClientCapabilities_static capability","status":"Newly available"},{"feature":"the api.PublicKeyCredential.parseRequestOptionsFromJSON_static capability","status":"Newly available"}],"tokens":["allowCredentials","PublicKeyCredentialDescriptor","rpId: publicKey.rpId","rpId","window.location.hostname","webauthn-polyfills","PublicKeyCredential.getClientCapabilities()","PublicKeyCredential","npm install webauthn-polyfills","https://esm.sh/webauthn-polyfills@0.1.7","integrity","<script>","import","webauthn-signals","and","are available whenever"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/passkey-reauthentication.md"},{"id":"passkey-registration","cat":"security","title":"Passkey Registration","kind":"usecase","desc":"Register a passkey for an existing user account.","ucCat":"security","chars":10583,"codes":4,"sections":["Database Requirements","Server-Side","Client-Side Logic","Fallback Strategies"],"baselines":[{"feature":"the api.PublicKeyCredential.parseCreationOptionsFromJSON_static capability","status":"Newly available"}],"tokens":["rp.id","publicKey.rp.id","excludeCredentials","requireResidentKey: true","residentKey: \"required\"","authenticatorSelection","userVerification: \"preferred\"","userVerification: \"required\"","'required'","authenticatorAttachment: \"platform\"","authenticatorAttachment","promotion: boolean","true","requireUserVerification: false","PublicKeyCredential.getClientCapabilities()","conditionalGet","passkeyPlatformAuthenticator","and pass the resulting configuration to","credential.toJSON()","AuthenticatorAttestationResponse","InvalidStateError","NotAllowedError","AbortError","SecurityError","fetch()","(gated on","response.ok === false","rpId","window.location.hostname","example.com","accounts.example.com","webauthn-signals","PublicKeyCredential.signalUnknownCredential","webauthn-polyfills","and","are available whenever","npm install webauthn-polyfills","https://esm.sh/webauthn-polyfills@0.1.7","integrity","<script>","import"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/passkey-registration.md"},{"id":"passkeys","cat":"security","title":"Passkeys Orientation","kind":"usecase","desc":"Comprehensive orientation and cross-cutting principles for implementing WebAuthn and Passkeys in web applications. Use this guide when handling passkey registration, authentication, management, or reauthentication.","ucCat":"security","chars":4959,"codes":0,"sections":["1. Core Prerequisites for Passkeys","2. The AAGUID UX Caveat","3. Decoupled Library Recommendations","4. Use Case Reference Matrix"],"baselines":[],"tokens":["navigator.credentials.create","navigator.credentials.get","https://","http://localhost","example.com","login.example.com","/.well-known/webauthn","SecurityError","rpId","window.location.hostname","publicKey.rp.id","publicKey.rpId","startAuthentication","startRegistration","passkey-registration","passkey-conditional-create","passkey-authentication","quick-sign-ins","passkey-management","passkey-reauthentication"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/passkeys.md"},{"id":"quick-sign-ins","cat":"security","title":"Quick sign-ins with immediate UI mode","kind":"usecase","desc":"Authenticate returning users in place with their saved passkeys or passwords before navigating to a sign-in page or interrupting their workflow.","ucCat":"security","chars":17874,"codes":5,"sections":["Recommended UX patterns and anti-patterns","Privacy and security constraints","Server-side setup","Client-side implementation","Fallback strategies"],"baselines":[{"feature":"the api.PublicKeyCredential.getClientCapabilities_static capability","status":"Newly available"},{"feature":"the api.PublicKeyCredential.parseRequestOptionsFromJSON_static capability","status":"Newly available"}],"tokens":["uiMode: 'immediate'","navigator.credentials.get()","publicKey","password: true","NotAllowedError","event.preventDefault()","aria-pressed=\"true\"","mediation: 'conditional'","autocomplete=\"username webauthn\"","passkey-authentication","allowCredentials","passkey-reauthentication","click","<button>","<a>","DOMContentLoaded","publicKey.allowCredentials","AbortSignal","signal","abort()","AbortController","rpId","publicKey.rpId","userVerification: 'preferred'","expectedUserVerification: 'preferred'","can resolve with either a passkey (",") or a saved password (","/api/login/verify","/api/login/password","username","cred.id","password","cred.password","and call","inside a user-initiated click handler with","(without passing","cred.type","cred.type === 'public-key'","cred.toJSON()",". Always use","window.location.hostname","example.com","shop.example.com","cred.type === 'password'","/signin","role=\"status\"","document.body","capabilities.immediateGet","PublicKeyCredential.getClientCapabilities()","'webauthn-polyfills'","PublicKeyCredential","PasswordCredential","<input autocomplete=\"username webauthn\">","and","webauthn-signals"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/quick-sign-ins.md"},{"id":"restrict-outbound-connections","cat":"security","title":"Restrict outbound network connections with Connection Allowlists","kind":"usecase","desc":"Restrict a page or worker to communicating only with an explicit allowlist of network endpoints to prevent unauthorized third-party requests and client-side data exfiltration.","ucCat":"security","chars":13533,"codes":4,"sections":["How to implement","Example code","Best practices","Fallback strategy"],"baselines":[],"tokens":["Connection-Allowlist","connect-src","img-src","script-src","font-src","form-action","<link rel=\"dns-prefetch\">","<link rel=\"preconnect\">","fetch()","XMLHttpRequest","navigator.sendBeacon()","<a ping>","WebSocket","WebTransport","(...)","Connection-Allowlist-Report-Only","response-origin","URLPattern","<a href>","<form action>","URL","ws:","wss:","http:","https:","new URL('https://api.example.com').href","matching to the root path","Sec-Fetch-Dest","document","iframe","worker","sharedworker","serviceworker","Vary: Sec-Fetch-Dest","worker.postMessage()","Reporting-Endpoints","report-to","on every","or","\"type\": \"connection-allowlist\"","connection","\"webrtc\"","disposition","\"enforce\"","\"report\"","3xx","redirects=block","RTCPeerConnection","webrtc=block","try...catch","error","TypeError","net::ERR_NETWORK_ACCESS_REVOKED","'...'","Connection-Allowlist: ()","data:","blob:","about:","filesystem:","\"https://api.example.com\"","\"https://api.example.com/*\"","/v1/users","new URL(origin).href","ws://","wss://","\"http://...\"","\"https://...\"","\"/api/*\"","<iframe connectionAllowlist=\"...\">","Allow-Connection-Allowlist-From"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/restrict-outbound-connections.md"},{"id":"sanitize-untrusted-html","cat":"security","title":"Sanitizing Untrusted HTML","kind":"usecase","desc":"Safely parse and display untrusted HTML content from user input by removing unsafe elements and attributes.","ucCat":"security","chars":5745,"codes":4,"sections":["1. Safely Inserting HTML with `setHTML()`","2. Using Custom Sanitizer Configurations","3. Parsing User Input with `Document.parseHTML()`","Fallbacks & browser support for Sanitizer API"],"baselines":[],"tokens":["<script>","on*","setHTML()","Element","Sanitizer","Element.setHTML()","Document.parseHTML()","elements","div","replaceWithChildrenElements","Element.setHTMLUnsafe()","Document.parseHTMLUnsafe()","Document","innerHTML","in","aria-*","data-*","ALLOWED_ATTR","ALLOW_ARIA_ATTR: false","ALLOW_DATA_ATTR: false","KEEP_CONTENT: false","#text","require-trusted-types-for 'script'","RETURN_TRUSTED_TYPE: true","DOMPurify.sanitize()","dompurify","trusted-types"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/sanitize-untrusted-html.md"},{"id":"secure-external-subresources","cat":"security","title":"Secure external subresources with Subresource Integrity, CORS, and Referrer Policy","kind":"usecase","desc":"Verify the cryptographic integrity of external scripts, stylesheets, fonts, and images loaded from third-party origins, and control whether those requests send credentials or referrer URLs.","ucCat":"security","chars":14835,"codes":7,"sections":["1. Generate cryptographic integrity digests for immutable assets","2. Secure HTML scripts, stylesheets, and preloads","3. Secure CSS images, fonts, and imported stylesheets with `url()` modifiers","Fallback strategies"],"baselines":[],"tokens":["integrity","integrity()","url()","crossorigin","cross-origin()","Referer","referrerpolicy","referrer-policy()","security",") and","(via","sha384-","<algorithm>-<base64-digest>","sha512-","sha256-","https://cdn.example.com/ui@2.4.0/app.min.js","latest/app.min.js","strict-dynamic","Access-Control-Allow-Origin: *","Access-Control-Allow-Credentials: true","HTTP response header (or include","in","<script>","<link rel=\"stylesheet\">","<link rel=\"preload\">","<link rel=\"modulepreload\">","integrity=\"sha384-...\"","linkElement.sheet","null","error","crossorigin=\"anonymous\"","crossorigin=\"use-credentials\"","no-cors","referrerpolicy=\"no-referrer\"","fetch()","mode","credentials","referrerPolicy","TypeError","background-image","content","mask-image","border-image-source","filter","@font-face","src","@import","cross-origin(<ident>)","anonymous","use-credentials","referrer-policy(<ident>)","no-referrer","strict-origin-when-cross-origin","origin","same-origin","strict-origin","origin-when-cross-origin","no-referrer-when-downgrade","unsafe-url","integrity(\"<string>\")","\"sha384-<base64>\"","\"sha384-... sha384-...\"","url(\"...\")","url(...)","<string>","url(\"...\" ...)","integrity(\"sha384-... sha384-...\")","cross-origin(anonymous)","cors","cross-origin(use-credentials)"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/secure-external-subresources.md"},{"id":"security","cat":"security","title":"Web Security","kind":"overview","desc":"Guidelines for implementing preventative security measures on the web safely and incrementally.","ucCat":"","chars":29978,"codes":16,"sections":["Table of Contents","When to apply this skill","Phase 1: Quick Wins & Obvious Anti-Patterns","Phase 2: Discovery & Data Collection (Prerequisites)","Phase 3: Interpreting Results & Enforcement"],"baselines":[],"tokens":["Reporting-Endpoints","report-to","Content-Security-Policy","'strict-dynamic'","'report-sample'","object-src 'none'","base-uri 'none'","frame-ancestors 'none'","'self'","require-trusted-types-for 'script'","X-Content-Type-Options","Referrer-Policy","Permissions-Policy","<script>","max-age","textContent","innerText","innerHTML","setHTML()","sanitize-untrusted-html","setHTMLUnsafe","document.createElement","outerHTML","document.write","eval","setTimeout","script.src","Set-Cookie","__Host-","name: '__Host-session'","Secure","secure: true","Path=/","path: '/'","Domain","__Secure-","HttpOnly","httpOnly: true","SameSite=Lax","sameSite: 'lax'","SameSite=None","alongside","and **omit","** (","or","X-Frame-Options","frame-ancestors","window.postMessage","event.origin","Origin","validate-origins",")). Do **not** trust wildcards (",") when calling","postMessage","Strict-Transport-Security","Cross-Origin-*","Access-Control-*","Timing-Allow-Origin","script-src","SRI","Fetch Metadata","Content-Security-Policy-Report-Only","Cross-Origin-Opener-Policy-Report-Only","Cross-Origin-Embedder-Policy-Report-Only","Document-Policy-Report-Only","default","https:","'unsafe-inline'","Clear-Site-Data","<object>"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/security.md"},{"id":"trusted-types","cat":"security","title":"Prevent DOM-based XSS attacks with Trusted Types","kind":"usecase","desc":"Prevent DOM-based XSS attacks by defining a Trusted Types policy to sanitize untrusted HTML, using the policy when writing to DOM sinks like innerHTML, and enforcing Trusted Types via Content Security Policy.","ucCat":"security","chars":7431,"codes":7,"sections":["Key Implementation Details","Fallback strategies"],"baselines":[{"feature":"Trusted types","status":"Newly available"}],"tokens":["TrustedHTML","innerHTML","document.write","trustedTypes.createPolicy()","escapePolicy","element.textContent","escapePolicy.createHTML()","javascript:","DOMPurify","element.setHTML()","sanitize-untrusted-html","default","element.innerHTML","element.outerHTML","document.write()","element.setHTMLUnsafe()","Document.parseHTMLUnsafe()","<script>","eval()","<script src>","Worker()","SharedWorker()","Document.parseHTML()","TrustedScript","Content-Security-Policy-Report-Only","sanitize-html","escape-html","dompurify","DOMPurify.sanitize()","trusted-types","<meta>","<head>"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/trusted-types.md"},{"id":"validate-origins","cat":"security","title":"Compare and validate web origins and sites","kind":"usecase","desc":"Compare and validate web origins and sites safely across cross-document messages and URLs without error-prone string parsing.","ucCat":"security","chars":13006,"codes":4,"sections":["Choosing the right comparison for your scenario","1. Verify Exact Origins for Privileged Actions (`Origin.from()` and `isSameOrigin()`)","2. Validate Cross-Subdomain Redirects and Links (`isSameSite()`)","3. Distinguish and Pin Opaque Origins (`origin.opaque` and `Origin.from(event)`)","Best practices","Fallback strategy"],"baselines":[],"tokens":["event.origin","event.origin === 'https://app.example.com'","url.startsWith('https://app.example.com')","'https://app.example.com.attacker.example'","'https://app.example.com:443/path'","'https://app.example.com'",".co.uk",".github.io","http:","https:","\"null\"","<iframe sandbox=\"allow-scripts\">","data:","originA === originB","\"null\" === \"null\"","Origin","Origin.from()","isSameOrigin()","isSameSite()","opaque","postMessage","https://blog.example.com","https://app.example.com","origin.opaque","Origin.from(event)","origin.opaque === true","isSameOrigin(other)","isSameSite(other)","TypeError","'example'","'null'","URL","HTMLAnchorElement","<a>","HTMLAreaElement","<area>","Window","WorkerGlobalScope","Origin.from(self)","MessageEvent","Location","WorkerLocation","Document","Request","Response","self","request.url","response.url","Origin.from(event.origin)","try...catch","https://app.example.co.uk","https://billing.example.co.uk:8443","https://sub.example.com","http://sub.example.com","https://tenant-a.github.io","https://tenant-b.github.io","https://a.co.uk","https://b.co.uk","false","new Origin()","true","Origin.from('data:...')","url.origin","startsWith()","includes()","endsWith()",".split('.')","'Origin' in globalThis","new URL()","candidate.href"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/validate-origins.md"},{"id":"verify-email-ownership","cat":"security","title":"Verify email address ownership","kind":"usecase","desc":"Verify that a user owns an email address during account creation, sign-in, or recovery without sending a one-time passcode or magic link email.","ucCat":"security","chars":14862,"codes":5,"sections":["1. Enable the Origin Trial and Render the Verification Form","2. Verify the Submitted Token on the Server","Best practices","Fallback strategy"],"baselines":[],"tokens":["<input>","autocomplete=\"email-verification-token\"","nonce","<form>","_email-verification.<domain>","TXT","EVT + KB-JWT","Origin-Trial","<meta http-equiv=\"origin-trial\">","https://issuer.example","randomBytes(32).toString('base64url')","node:crypto","HttpOnly","Secure","SameSite=Lax","Cache-Control: no-store","autocomplete=\"email\"","token","@sd-jwt/core","jose","sd-jwt-python","jwcrypto","sd-jwt-java","verifyEmailVerificationToken","expectedNonce","jwt","kbJwt","iss","evtPayload.email_verified === true","evtPayload.email","toLowerCase()","iss=<issuer-host>","https://<issuer-host>","metadata.issuer === iss","kid","ERR_JWKS_MULTIPLE_MATCHING_KEYS","AsyncIterable","CryptoKey","for await (const publicKey of err)","KB-JWT","verifier","issuerJwks","maxTokenAge: '5m'","clockTolerance: '1m'","kbVerifier","sdJwt.verify","evtPayload.cnf.jwk","cnf.jwk.alg","decoded.kbJwt.header.alg","ALLOWED_ALGS","'Ed25519'","'EdDSA'","typ: 'kb+jwt'","keyBindingNonce: expectedNonce","expectedKeyBindingAudience: expectedAudience","keyBindingMaxAgeSeconds: 300","sdJwt.verify()","aud","iat","sd_hash","keyBindingNonce","POST","email.toLowerCase()",".well-known/email-verification","_email-verification","handleSignupSubmission"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/verify-email-ownership.md"},{"id":"carousel-slide-effects","cat":"ui-atoms","title":"Build Carousel Slide Effects","kind":"usecase","desc":"Create a carousel of slides with images or other visual elements, where each slide animates as they enter/center/exit their scroller. For example, the slides may fade-in/fade-out, rotate, get bigger or smaller, etc.","ucCat":"ui-atoms","chars":10352,"codes":3,"sections":["How to implement","Example code","Best Practices","Browser support and fallback strategies"],"baselines":[{"feature":"Scroll-driven animations","status":"Newly available"}],"tokens":["overflow-x: scroll","tabindex=\"0\"","<ul>","list","<div>","role=\"region\"","scroll-snap-type: x mandatory","scroll-snap-align: center","scale","view-timeline","view()","block","inline","view(inline)","auto","(animation-range: entry)","scroll-timeline-polyfill","prefers-reduced-motion","transform","opacity","width","height","animation","animation-timeline","animation-range","timeline-scope","scroll(nearest)","view(block)","<dashed-ident>","view-timeline: --my-custom-name","view-timeline-axis","Element.animate()","scroll","currentTime","matchMedia()"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-atoms/carousel-slide-effects.md"},{"id":"component-specific-light-dark-theme","cat":"ui-atoms","title":"Component-specific light/dark themes","kind":"usecase","desc":"Force certain elements to be in light mode or dark mode (e.g. code blocks, media players, etc) independently of the page's color-scheme.","ucCat":"ui-atoms","chars":9733,"codes":4,"sections":["When to change colors vs. when to force `color-scheme`?","Basic implementation","Best practices","Known issues to be aware of","Fallback strategies"],"baselines":[{"feature":"color-scheme","status":"Widely available"},{"feature":"light-dark()","status":"Newly available"}],"tokens":["color-scheme","color-scheme: dark","light-dark()","dark-mode","only","<color>","color","accent-color","fill","stroke","text-shadow","caret-color","syntax: <color>","inherits: true","inherit","--surface-color","@property","prefers-color-scheme","postMessage()","<html>",":root","postMessage","html"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-atoms/component-specific-light-dark-theme.md"},{"id":"icons","cat":"ui-atoms","title":"Using and managing icons","kind":"usecase","desc":"Display and manage icons that can be set and parameterized from CSS, are fast to load, crisp at any resolution and are properly exposed to (or hidden from) assistive technologies.","ucCat":"ui-atoms","chars":18341,"codes":13,"sections":["Choosing an Icon Technique","Primary Approach: CSS-Driven Icon Engine","Usage Examples","Working with SVG directly","Fallback Strategies"],"baselines":[{"feature":"Registered custom properties","status":"Newly available"},{"feature":"Container style queries","status":"Newly available"}],"tokens":["<use>","<img>","color","--icon-start","--icon-end","@property","@container style(...)","currentColor","--icon-style-*","--icon-style-","--icon-*","url(\"/icons/trash.svg\")","<url>","<image>","initial-value",":root","CSS.registerProperty","\"*\"","inherits: false","inherit","vertical-align","middle","0.5cap","--icon-style-size","--icon-style-voffset","flex: none","pointer-events: none","event.target","forced-color-adjust: none","background-color","--icon-style-alt","::after","::before","mask: var(--icon-end)","margin-inline-start","margin-inline-end",".icon","--icon",".icon:empty","--icon-style-color","--icon-style-spacing","aria-label","role=\"img\"","<use href=\"#id\">","<use href=\"/icons.svg#id\">","viewBox","<symbol>","<svg>","width","height","<style>","id","aria-hidden=\"true\"",".icon-end",".icon-start","image-set()","content","none","@supports","@layer"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-atoms/icons.md"},{"id":"position-aware-tooltips","cat":"ui-atoms","title":"Position Aware Tooltips","kind":"usecase","desc":"Build tooltips and popovers with directional arrows (or other visual styling) that automatically point the correct way when the element flips to a fallback position.","ucCat":"ui-atoms","chars":8448,"codes":11,"sections":["The problem","The solution: Anchored Container Queries","4. Styling the container itself","5. Styling the inner container (optional)","Best practices","Accessibility considerations","Fallback strategies"],"baselines":[{"feature":"Popover","status":"Newly available"}],"tokens":["viewport-aware-dropdowns","container-type: anchored","@container anchored()","popovertarget","anchor-name","position-anchor","position-try-fallbacks","@container anchored(fallback: <value>)","@container","::before","::after","margin","background-color","position-try: flip-block","flip-block","flip-inline","popover=auto","@supports (container-type: anchored)","popover","@oddbird/popover-polyfill","HTMLElement.prototype","setAttribute()","removeAttribute()",":popover-open",":is()",":where()"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-atoms/position-aware-tooltips.md"},{"id":"pull-to-reveal","cat":"ui-atoms","title":"Pull to Reveal","kind":"usecase","desc":"Build a pull-to-reveal feature that would enable the user to pull down on the screen to reveal more content, like a search bar.","ucCat":"ui-atoms","chars":5143,"codes":2,"sections":["How to Implement","Example Code: Pull to Reveal Search","Strategic Implementation & Best Practices","Fallback Strategy"],"baselines":[],"tokens":["scroll-initial-target","scroll-initial-target: nearest","Element.scrollIntoView()","#content-id","overflow: auto","<html>","scroll-snap-type: y mandatory","scroll-snap-align: start","element.focus()","example.com/#top","scroll-start","start"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-atoms/pull-to-reveal.md"},{"id":"responsive-table","cat":"ui-atoms","title":"Responsive tables","kind":"usecase","desc":"Build a data table that presents tabular data with proper header semantics, and remains readable and navigable on small screens and with assistive technologies.","ucCat":"ui-atoms","chars":4556,"codes":3,"sections":["Recommended Approach","Implementation Steps"],"baselines":[],"tokens":["<table>","<thead>","<tbody>","<th>","position: sticky","@container","@media","::before","single-line-overflow",".table-wrapper","tabindex=\"0\"","role=\"region\"","aria-labelledby","id","aria-label"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-atoms/responsive-table.md"},{"id":"scroll-position-aware-elements","cat":"ui-atoms","title":"Scroll Position Aware Elements","kind":"usecase","desc":"Build floating buttons or widgets (back-to-top, scroll-to-bottom, chat launchers, etc.) that appear and disappear based on whether the user has scrolled at all.","ucCat":"ui-atoms","chars":3718,"codes":7,"sections":["Overview","Implementation","Fallback strategies"],"baselines":[],"tokens":["container-scroll-state-queries","@container","scroll-state","visibility: hidden","IntersectionObserver"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-atoms/scroll-position-aware-elements.md"},{"id":"scroll-progress-indicator","cat":"ui-atoms","title":"Build a Scroll Progress Indicator","kind":"usecase","desc":"Create a scroll progress bar, stepped progress tracker, or any visual affordance that communicates how far through a page or section the user has scrolled.","ucCat":"ui-atoms","chars":6770,"codes":4,"sections":["How to implement","Example code","Best Practices","Fallback strategies"],"baselines":[{"feature":"Scroll-driven animations","status":"Newly available"}],"tokens":["position: fixed","position: absolute","@keyframes","scaleX(0)","scaleX(1)","animation-timeline","#progress","scroll()","block","scroll-timeline","@supports (animation-timeline: scroll())","scroll-timeline-polyfill","aria-hidden=\"true\"","prefers-reduced-motion","transform","opacity","width","height","animation","scroll(root)","scroll(self)","root","nearest","self","scroll(block)","scroll(inline)","<dashed-ident>","scroll-timeline-axis","timeline-scope"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-atoms/scroll-progress-indicator.md"},{"id":"scrollability-affordance-hints","cat":"ui-atoms","title":"Scrollability Affordance Hints","kind":"usecase","desc":"Build scroll shadows or fading edges that appear only when there's actually more content to scroll to in that direction.","ucCat":"ui-atoms","chars":12224,"codes":9,"sections":["Overview","Choosing between a shadow and a fade","Shadows","Fades","Accessibility considerations","Fallback strategies"],"baselines":[{"feature":"Scroll-driven animations","status":"Newly available"}],"tokens":["::before","::after","position: sticky","--fade-start","--fade-end","@property","scroll-padding-inline","scroll-padding-block","to bottom","0 0","scroll(self block)","overflow-y","--fade-dir",":dir(rtl)","scroll()","scroll","local","IntersectionObserver","threshold: 1"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-atoms/scrollability-affordance-hints.md"},{"id":"shrinking-header-on-scroll","cat":"ui-atoms","title":"Shrinking header on scroll","kind":"usecase","desc":"Smoothly animate a fixed header or full-page cover on scroll to dynamically shrink, gain shadows, and transform its layout over a predefined scroll distance.","ucCat":"ui-atoms","chars":7179,"codes":2,"sections":["How to implement","Example code","Best Practices","Browser support and fallback strategies"],"baselines":[{"feature":"Scroll-driven animations","status":"Newly available"}],"tokens":["scroll()","animation-range","position: sticky","scroll-padding-top","scroll-timeline","padding-top","body","animation-range-end","200px","50px","150px","scroll-timeline-polyfill","prefers-reduced-motion","transform","opacity","width","height","animation","animation-timeline","scroll(root)","scroll(self)","root","nearest","self","block","scroll(block)","scroll(inline)","position: static","position: relative"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-atoms/shrinking-header-on-scroll.md"},{"id":"single-line-overflow","cat":"ui-atoms","title":"Single-line text overflow","kind":"usecase","desc":"Show text that must stay on one line, such as a tab label, table cell, navigation item, or file name, in a space it may not fit, without breaking the layout or losing the text.","ucCat":"ui-atoms","chars":16464,"codes":15,"sections":["How to display truncated text","Reveal full text on demand","Detecting whether the text is truncated","Fallback strategies"],"baselines":[{"feature":"Scroll-driven animations","status":"Newly available"},{"feature":"Container style queries","status":"Newly available"},{"feature":"Container queries (size)","status":"Widely available"},{"feature":"Masks","status":"Widely available"}],"tokens":["overflow: hidden","clip","hidden","min-inline-size: auto","min-inline-size: 0","table-layout: fixed","outline-offset: -2px","--fade-size","display: none",":hover",":focus-visible","prefers-reduced-motion","no-preference","min-inline-size","max-inline-size","span","--scroll-width","scrollWidth - clientWidth","ResizeObserver","ease-in","interpolate-size: allow-keywords","max-content","aria-hidden=\"true\"","title","interest-triggered-tooltips","text-overflow","animation","scrollable","scrollWidth","clientWidth","CSS.supports","interpolate-size","mask-composite","mask-clip: no-clip"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-atoms/single-line-overflow.md"},{"id":"state-aware-sticky-headers","cat":"ui-atoms","title":"State-Aware Sticky Headers","kind":"usecase","desc":"Build sticky section headers or navbars that visually transform when they're actually \"stuck\" at the top, changing their color scheme or gaining a shadow.","ucCat":"ui-atoms","chars":6885,"codes":7,"sections":["Implementation Steps"],"baselines":[],"tokens":["container-type: scroll-state","position: sticky","container-name","container-type: scroll-state inline-size","@container",".sticky-container",".sticky-header","scroll-padding-top","@container scroll-state(...)","stuck: block-start","stuck: inline-start","overflow-anchor: none",":root","body","@supports","@supports (container-type: scroll-state)","IntersectionObserver",".is-stuck","getComputedStyle","@container scroll-state(stuck: top)","scroll-state(scrollable)"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-atoms/state-aware-sticky-headers.md"},{"id":"viewport-aware-dropdowns","cat":"ui-atoms","title":"Viewport-Aware Dropdowns","kind":"usecase","desc":"Position dropdowns, flyouts, or contextual action panels tethered to a trigger button so they automatically flip axes at viewport edges instead of getting clipped.","ucCat":"ui-atoms","chars":10145,"codes":9,"sections":["Fallback strategies"],"baselines":[{"feature":"Popover","status":"Newly available"}],"tokens":["role=\"menu\"","role=\"menuitem\"","aria-haspopup","menu","listbox","tree","grid","true","popover=\"auto\"","anchor-name","position-anchor","position-area","top","left","span-inline-end","block-start","position-aware-tooltips","declarative-dialog-popover-control","popovertarget","popover","@oddbird/popover-polyfill","HTMLElement.prototype","setAttribute()","removeAttribute()",":popover-open",":is()",":where()","[popover]","@supports","@oddbird/css-anchor-positioning","CSS.supports(\"anchor-name: --a\")","<script type=\"module\">","commandfor","interestfor","position-try-fallbacks","anchor()","right","bottom","inset: auto","@supports (position-area: ...)","@supports (anchor-name: --a)","false","margin: 0","@supports (position-area: block-end)","@supports (top: anchor(bottom))","@supports not (...)"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-atoms/viewport-aware-dropdowns.md"},{"id":"2d-panning","cat":"ui-behaviors","title":"Two-Dimensional Panning","kind":"usecase","desc":"Allow users to freely pan or scroll two-dimensional surfaces—such as maps, zoomed images, infinite canvases, or large data grids—across both directions (whether diagonally or changing direction mid-gesture) without the gesture locking to a single horizontal or vertical axis.","ucCat":"ui-behaviors","chars":9419,"codes":4,"sections":["Implementation","Example Code","Best Practices & Constraints","Fallback strategies"],"baselines":[],"tokens":["scroll-axis-lock","scroll-axis-lock: none","overflow: auto","overflow: scroll","auto","overscroll-behavior: none","overscroll-behavior: contain","tabindex=\"0\"","role",":focus-visible","none","contain",".pan-viewport","scroll-axis-lock: auto","touch-action","@supports not (scroll-axis-lock: none)","touch-action: pinch-zoom","scrollLeft","scrollTop","transform","scroll","IntersectionObserver","wheel","pointermove","e.deltaX","e.deltaY","e.clientX","e.clientY","pointerup","pinch-zoom","touch-action: none"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/2d-panning.md"},{"id":"anchor-positioning-tab-underline","cat":"ui-behaviors","title":"Anchor Positioning Tab Underline","kind":"usecase","desc":"Transition an element seamlessly between two target element positions. For example, moving a selected tab underline between the previously selected tab and the currently selected tab.","ucCat":"ui-behaviors","chars":3130,"codes":8,"sections":["Fallback strategies"],"baselines":[],"tokens":["::before","<ul>","<li>","anchor-name","--","position-anchor","position: absolute","anchor()","box-shadow","inset","aria-current=\"page\"","aria-selected","border-bottom"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/anchor-positioning-tab-underline.md"},{"id":"animate-element-entry-exit","cat":"ui-behaviors","title":"Animate Element Entry and Exit","kind":"usecase","desc":"Smoothly hide/show elements as they are added/removed from the DOM or as their display values are toggled.","ucCat":"ui-behaviors","chars":7838,"codes":5,"sections":["Implementation","Constraints & Accessibility","Fallback strategies"],"baselines":[{"feature":"@starting-style","status":"Newly available"},{"feature":"transition-behavior","status":"Newly available"}],"tokens":["display","none","@starting-style","transition-behavior: allow-discrete","display: none","hidden","opacity: 1","transition","appendChild()","remove()","element.remove()","allow-discrete","overlay","<dialog>","popover","prefers-reduced-motion","returns",") without actually transitioning the","[data-closing]","[hidden]","opacity","translate",".card[hidden]"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/animate-element-entry-exit.md"},{"id":"animate-to-from-top-layer","cat":"ui-behaviors","title":"Animate Elements To and From Top Layer","kind":"usecase","desc":"Animate elements such as dialogs, popovers, and tooltips as they're entering/exiting the top layer.","ucCat":"ui-behaviors","chars":10932,"codes":6,"sections":["Implementation","Example","Constraints & Accessibility","Fallback strategies"],"baselines":[{"feature":"@starting-style","status":"Newly available"},{"feature":"transition-behavior","status":"Newly available"},{"feature":"Popover","status":"Newly available"}],"tokens":["<dialog>","popover","display: none","@starting-style","transition-behavior: allow-discrete","overlay","display","transition","none","::backdrop","allow-discrete","@media (prefers-reduced-motion: reduce)","returns",") without actually transitioning the",".is-opening",":is()",":where(:not([data-closing]))","data-closing","getAnimations()",".close()",".hidePopover()","popovertarget","beforetoggle","closeTopLayer()","@oddbird/popover-polyfill","HTMLElement.prototype","setAttribute()","removeAttribute()",":popover-open",":where()"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/animate-to-from-top-layer.md"},{"id":"carousel-snap-highlights","cat":"ui-behaviors","title":"Carousel Snap Highlights","kind":"usecase","desc":"Visually highlight the currently snapped non-interactive item in scroll-snapping carousels, galleries, or full-page swipe experiences. For example, expanding a card when snapped, or revealing hidden content.","ucCat":"ui-behaviors","chars":7676,"codes":7,"sections":["Fallback strategies"],"baselines":[],"tokens":["scroll-snap-type","scroll-state","snapped","scroll-state(snapped: x)","tabindex=\"0\"","role=\"region\"","@supports","IntersectionObserver","rootMargin"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/carousel-snap-highlights.md"},{"id":"consistent-cross-document-transitions","cat":"ui-behaviors","title":"Consistent Cross-Document Transitions","kind":"usecase","desc":"Ensure critical page state is loaded and stable before initiating a cross-document view transition. This means critical CSS styles are loaded and applied, critical JavaScript is loaded and run, and the HTML visible for the user's initial view of the page has been parsed before the transition runs.","ucCat":"ui-behaviors","chars":14266,"codes":7,"sections":["The Problem","The Solution","Implementation Guide","Best Practices","Fallback Strategies","Other Considerations"],"baselines":[],"tokens":["blocking=\"render\"","<link>","<script>","<head>","<link rel=\"expect\">","@view-transition","navigation: auto","async","defer","type=\"module\"","<body>","id","href","#hero","<img>","view-transition-name","root","<link rel=\"preload\" as=\"image\">","width","height","aspect-ratio","media","pagereveal","ready","viewTransition.ready","InvalidStateError","finished"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/consistent-cross-document-transitions.md"},{"id":"cross-document-transitions","cat":"ui-behaviors","title":"Cross-Document Transitions","kind":"usecase","desc":"Create smooth, seamless transitions between full page navigations, such as cross-fades, custom reveal effects, or morphing of content from one page to the next.","ucCat":"ui-behaviors","chars":4555,"codes":7,"sections":[],"baselines":[{"feature":"View transitions","status":"Newly available"},{"feature":"Navigation API","status":"Newly available"}],"tokens":["types","@view-transition","pagereveal",":active-view-transition-type()"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/cross-document-transitions.md"},{"id":"custom-button-actions","cat":"ui-behaviors","title":"Custom Button Actions","kind":"usecase","desc":"Declaratively connect a button to any element to trigger custom, application-specific actions using declarative button commands, invoker commands, button commands, custom commands, or declarative toggle actions.","ucCat":"ui-behaviors","chars":8361,"codes":4,"sections":["Implementation steps","Example: Custom Animation Controls","Key constraints","Accessibility considerations","Fallback strategies"],"baselines":[{"feature":"Invoker commands","status":"Newly available"}],"tokens":["--","id","commandfor","command","target","aria-pressed","aria-expanded","command=\"--my-action\"","event.composedPath()[0]","event.target","aria-expanded=\"false\"","aria-expanded=\"true\"","aria-pressed=\"false\"","aria-pressed=\"true\"","menu","listbox","tree","grid","dialog","aria-haspopup","disabled","aria-disabled=\"true\"","npm install"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/custom-button-actions.md"},{"id":"declarative-dialog-popover-control","cat":"ui-behaviors","title":"Declarative Dialog and Popover Control","kind":"usecase","desc":"Toggle the visibility of a dialog or popover from a button without writing JavaScript.","ucCat":"ui-behaviors","chars":7736,"codes":8,"sections":["Implementing Declarative Popovers","Implementing Declarative Modal Dialogs","Fallback strategies"],"baselines":[{"feature":"Invoker commands","status":"Newly available"},{"feature":"Popover","status":"Newly available"}],"tokens":["<dialog>","[popover]","commandfor","command","<button>","aria-expanded","show-popover","hide-popover","popovertarget","show-modal","commandForElement","HTMLButtonElement","npm install invokers-polyfill","<script type=\"module\">","popover","@oddbird/popover-polyfill","HTMLElement.prototype","setAttribute()","removeAttribute()",":popover-open",":is()",":where()"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/declarative-dialog-popover-control.md"},{"id":"directional-navigation-transitions","cat":"ui-behaviors","title":"Directional Navigation Transitions","kind":"usecase","desc":"Animate visual state changes to reflect the direction of a user's navigational flow, such as sliding new content in from the right when advancing forward or from the left when returning to a previous screen.","ucCat":"ui-behaviors","chars":5225,"codes":6,"sections":[],"baselines":[{"feature":"View transitions","status":"Newly available"},{"feature":"Active view transition","status":"Newly available"}],"tokens":["types","document.startViewTransition()",":active-view-transition-type()","transform","scale","rotate","translate","opacity","::view-transition-group(root)","ease","cubic-bezier()","linear","active-view-transition-type","startViewTransition","document.startViewTransition","undefined"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/directional-navigation-transitions.md"},{"id":"drag-and-drop","cat":"ui-behaviors","title":"Rearrange Items with Drag and Drop","kind":"usecase","desc":"Support dragging to rearrange the children of a container along one axis (horizontal or vertical) while preserving their state and accessible order.","ucCat":"ui-behaviors","chars":16798,"codes":1,"sections":["Keep movement active while reordering","Scroll while dragging","Support keyboard reordering","Decide on fallback behavior","Browser support and fallback strategies"],"baselines":[],"tokens":["order","flex-direction: *-reverse","drag","cursor: grab","grabbing","touch-action: none","user-select: none",":active","cursor: grabbing","handle.setPointerCapture(event.pointerId)","pointerdown","lostpointercapture","before()","moveBefore()","pointerId","pointermove","pointerup","pointercancel","Escape","translate","event.target","offsetTop + offsetHeight / 2","position: relative","clientTop","scrollTop","offsetLeft + offsetWidth / 2","clientLeft","scrollLeft","offsetLeft","document.elementFromPoint()","data-drop","::before","::after","<body>","--drop-x","--drop-y","--drop-w","--drop-h","getBoundingClientRect()","transform","filter","contain","--drop-marker-color","Highlight","forced-colors: active","0 0","prefers-reduced-motion: reduce","z-index","scale","pointer-events: none","idref","requestAnimationFrame","scroll-behavior: smooth","scale(1.02)","overflow-y: auto","Alt","<button>","Space","Enter","aria-pressed","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","scroll-margin","Tab","block","inline","'nearest'","focusin"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/drag-and-drop.md"},{"id":"drag","cat":"ui-behaviors","title":"Build a Draggable Element","kind":"usecase","desc":"Support dragging to move a floating element around the page.","ucCat":"ui-behaviors","chars":6992,"codes":5,"sections":["Use a dedicated handle","Preserve pointer position and reachability","Provide keyboard movement","Dialog-specific note","Accessibility requirements","Fallback strategies"],"baselines":[],"tokens":["button","cursor: grab","grabbing","touch-action: none","user-select: none","-webkit-user-select: none","position: fixed","event.button === 0","pointerdown","setPointerCapture()","lostpointercapture","pointermove","pointerup","pointercancel","left","top","preventDefault()","<dialog>","[popover]","margin: 0","declarative-dialog-popover-control",") and","(via","<input>"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/drag.md"},{"id":"dynamic-sibling-animations","cat":"ui-behaviors","title":"Creating a stagger animation","kind":"usecase","desc":"Stagger animation or transition timing across sibling elements so each one starts after a computed delay based on its position in the sibling list.","ucCat":"ui-behaviors","chars":2682,"codes":4,"sections":["Stagger animations with `sibling-index()`","Fallback strategies"],"baselines":[{"feature":"sibling-count() and sibling-index()","status":"Newly available"}],"tokens":["sibling-index()","animation-delay","or JavaScript with","--sibling-index","@supports"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/dynamic-sibling-animations.md"},{"id":"dynamic-sort","cat":"ui-behaviors","title":"Handling dynamic user-triggered changes to sort order","kind":"usecase","desc":"Best practices for handling dynamic user-triggered reordering of a container's children (e.g. list items, table rows, or a card grid), with optional animated reordering that respects user preferences, good screen reader UX, and optimal performance for large lists.","ucCat":"ui-behaviors","chars":7039,"codes":7,"sections":["Reorder the existing nodes","Optionally animate the reorder with view transitions","Announce the change once","Performance on large lists","Fallbacks"],"baselines":[{"feature":"View transitions","status":"Newly available"}],"tokens":["innerHTML","moveBefore()","append()","<iframe>","orderedNodes","order","flex-direction: row-reverse","<table>","<tr>","<tbody>","<thead>","view-transition-name","view-transition-name: match-element","match-element","list.startViewTransition()","scoped-component-transitions","aria-live","role=\"status\"","<select>","aria-pressed","offsetTop","getBoundingClientRect()","content-visibility: auto","contain-intrinsic-size","element.startViewTransition()","document.startViewTransition()"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/dynamic-sort.md"},{"id":"group-element-transitions","cat":"ui-behaviors","title":"Smoothly rearrange cards, lists, and groups of elements on add, remove, or reorder","kind":"usecase","desc":"Smoothly rearrange and animate list items, cards, or grid elements into their new positions simultaneously when adding, removing, shuffling, or reordering—such as removing a product from a shopping cart.","ucCat":"ui-behaviors","chars":6365,"codes":1,"sections":["Implementation steps","Fallback strategies"],"baselines":[{"feature":"View transitions","status":"Newly available"},{"feature":"view-transition-class","status":"Newly available"}],"tokens":["view-transition-name","view-transition-class","::view-transition-group()","root",":only-child","::view-transition-new()","::view-transition-old()","::view-transition-image-pair()","ease-out","ease-in","document.startViewTransition()",":root","document.startViewTransition","::view-transition-group(.class)"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/group-element-transitions.md"},{"id":"highlight-text-ranges","cat":"ui-behaviors","title":"Highlight Text Ranges","kind":"usecase","desc":"Highlight arbitrary text ranges on a page such as search results, spelling errors, or collaborative editing cursors.","ucCat":"ui-behaviors","chars":6523,"codes":7,"sections":["Core implementation","Accessibility","Fallback strategies"],"baselines":[{"feature":"Custom highlights","status":"Newly available"}],"tokens":["innerHTML","Range","Highlight","HighlightRegistry","::highlight()","TreeWalker","CSS.highlights","Map","priority","color","background-color","text-decoration","text-shadow","-webkit-text-stroke-color","-webkit-text-fill-color","-webkit-text-stroke-width","background-image","font-size","padding","<mark>","text-decoration: wavy underline"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/highlight-text-ranges.md"},{"id":"interactive-content-reveal","cat":"ui-behaviors","title":"Interactive Content Reveal","kind":"usecase","desc":"Create interactive reveal effects, such as a spotlight that follows the user's pointer to uncover details within an image or UI section.","ucCat":"ui-behaviors","chars":5846,"codes":5,"sections":["Implementation","Fallback strategies"],"baselines":[{"feature":"Registered custom properties","status":"Newly available"},{"feature":"Masks","status":"Widely available"}],"tokens":["@property","mask-image","radial-gradient","pointer-events: none","var()","-webkit-mask-image"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/interactive-content-reveal.md"},{"id":"interest-triggered-action-previews","cat":"ui-behaviors","title":"Interest Triggered Action Previews","kind":"usecase","desc":"Show a live preview of a button's effect when a user signals interest (e.g. hovering, focusing, or long-pressing) but before they commit to clicking.","ucCat":"ui-behaviors","chars":4970,"codes":7,"sections":["How to implement"],"baselines":[],"tokens":["interest","loseinterest","interestfor","InterestEvent","source","event.source",":interest-source",":interest-target","interest-delay-start","interest-delay-end","interest-delay","interestForElement","HTMLButtonElement.prototype",".interest-source",".interest-target",":is()"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/interest-triggered-action-previews.md"},{"id":"interest-triggered-tooltips","cat":"ui-behaviors","title":"Show a tooltip when hovering","kind":"usecase","desc":"Show a tooltip or supplemental information when a user hovers over, focuses on, or long-presses an interactive element, without requiring a click.","ucCat":"ui-behaviors","chars":20307,"codes":14,"sections":["Should you use a tooltip?","Creating the tooltip","Toggletips: an \"i\" or \"?\" button","Fallback strategies"],"baselines":[{"feature":"Popover","status":"Newly available"}],"tokens":["popover=\"hint\"","<div>","auto","manual","id","<a>","<button>","interestfor","tooltip","aria-expanded","aria-details","aria-label=\"Bold\"","aria-label","aria-labelledby","popovertarget","popovertargetaction=\"show\"","role=\"tooltip\"","toggle","aria-describedby","Enter","autofocus","focus()","interest","focus","load","[interestfor]","alt","title","commandfor",":popover-open","document","loseinterest","Escape","aria-haspopup","popover","anchor-name","position-anchor","position-area","position-try-fallbacks","interestForElement","HTMLButtonElement.prototype",":interest-source",":interest-target",".interest-source",".interest-target",":is()","interest-delay","interest-delay-start","interest-delay-end","@oddbird/popover-polyfill","HTMLElement.prototype","setAttribute()","removeAttribute()",":where()","\"hint\"","popover=\"manual\"","hint","popover=\"auto\"","beforetoggle","[popover]","@supports","@oddbird/css-anchor-positioning","CSS.supports(\"anchor-name: --a\")","<script type=\"module\">","anchor()","top","left","right","bottom","inset: auto"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/interest-triggered-tooltips.md"},{"id":"light-dismiss-a-dialog","cat":"ui-behaviors","title":"Light-Dismiss a Dialog","kind":"usecase","desc":"Create a modal dialog that can be closed via light dismiss (i.e. clicking or tapping outside of the dialog)","ucCat":"ui-behaviors","chars":4244,"codes":3,"sections":["Implementation","Example","Constraints & Accessibility","Fallback strategies"],"baselines":[],"tokens":["closedby","closedby=\"any\"","<dialog>","dialog.showModal()","any","Esc","dialog.close()","closerequest","none","showModal()","::backdrop","aria-labelledby","aria-label","show()","click","close","cancel"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/light-dismiss-a-dialog.md"},{"id":"motion","cat":"ui-behaviors","title":"Motion","kind":"usecase","desc":"Animate UI with CSS transitions, animations, scroll-driven animations, and view transitions while keeping motion on the compositor and respecting reduced-motion preferences.","ucCat":"ui-behaviors","chars":7785,"codes":4,"sections":["Performance","Accessibility","Working with animation and transition events in JavaScript"],"baselines":[],"tokens":["clip-path","mask-image","tabindex=\"0\"","animation-timeline: scroll()","opacity","transform","translate","left/right/top/bottom","transition-behavior: allow-discrete","@starting-style","<dialog>","[popover]","overlay","animate-element-entry-exit",") and","(via","<button>","prefers-reduced-motion","aria-pressed","opacity: 0","and","animation: none","@media (prefers-reduced-motion: reduce)","animation-duration","@media","color","background-color","instead of setting","and overriding it with","AnimationEvent","animationstart","animationiteration","animationend","animationcancel","TransitionEvent","transitionrun","transitionstart","transitionend","transitioncancel","event.target","Animation","CSSAnimation","CSSTransition","event.animation","event.target.getAnimations()","event.animationName","event.propertyName","element.animate()","animationName","transitionProperty","event.animation.effect.pseudoElement","'animation' in AnimationEvent.prototype","'animation' in TransitionEvent.prototype","element.getAnimations()"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/motion.md"},{"id":"move-dom-element-without-losing-state","cat":"ui-behaviors","title":"Move DOM Element Without Losing State","kind":"usecase","desc":"Move or reparent a DOM element without losing important element state, such as interactivity states (:focus/:active), `&lt;iframe&gt;` loading state, animation/transition state, etc","ucCat":"ui-behaviors","chars":3855,"codes":3,"sections":["Moving an element with state","Moving custom elements (Web Components)","Fallback strategies","Accessibility considerations"],"baselines":[],"tokens":["appendChild()","insertBefore()","<iframe>","moveBefore()","null","connectedCallback","disconnectedCallback","connectedMoveCallback()","<body>"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/move-dom-element-without-losing-state.md"},{"id":"parallax-scroll-effects","cat":"ui-behaviors","title":"Build a Parallax Effect on Scroll","kind":"usecase","desc":"Create scroll-based effects (such as parallax) where foreground and background layers move at different rates, creating a sense of depth as the user scrolls.","ucCat":"ui-behaviors","chars":9747,"codes":3,"sections":["How to implement","Example code","Best Practices","Browser support and fallback strategies"],"baselines":[{"feature":"Scroll-driven animations","status":"Newly available"}],"tokens":["height","transform","translateY","view-timeline","animation-range","sibling-index()","sibling-count()","(animation-range: entry)","scroll-timeline-polyfill","prefers-reduced-motion","opacity","width","animation","animation-timeline","IntersectionObserver",".wrapper","matchMedia()"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/parallax-scroll-effects.md"},{"id":"persistent-top-layer-ui","cat":"ui-behaviors","title":"Persistent Top Layer UI","kind":"usecase","desc":"Keep a modal dialog, fullscreen element, or native popover visibly open and functionally active when its underlying DOM node is moved or reparented in the DOM.","ucCat":"ui-behaviors","chars":2345,"codes":2,"sections":[],"baselines":[],"tokens":["<dialog>","popover","appendChild()","insertBefore()","moveBefore()","null"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/persistent-top-layer-ui.md"},{"id":"physics-based-easing","cat":"ui-behaviors","title":"Physics Based Easing","kind":"usecase","desc":"Create custom, physics-based animation and transition effects, like bounce and spring, that feel more natural and engaging than traditional easing curves.","ucCat":"ui-behaviors","chars":5954,"codes":6,"sections":[],"baselines":[{"feature":"linear() easing","status":"Widely available"}],"tokens":["ease-in","cubic-bezier()","linear()","transition-timing-function","animation-timing-function","transition","animation","duration","transform","opacity","CSS.supports()","@supports"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/physics-based-easing.md"},{"id":"platform-controls-dismiss-dialog","cat":"ui-behaviors","title":"Platform Controls Dismiss Dialog","kind":"usecase","desc":"Create a modal dialog that can be closed via standard platform-specific user actions, such as pressing the `Esc` key on desktop platforms, or a \"back\" or \"dismiss\" gesture on mobile platforms","ucCat":"ui-behaviors","chars":2674,"codes":3,"sections":["Fallback strategies"],"baselines":[],"tokens":["<dialog>","closedby","showModal()","show-modal","closerequest","any","closedby=\"any\""],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/platform-controls-dismiss-dialog.md"},{"id":"prevent-page-scroll-under-modal-dialog","cat":"ui-behaviors","title":"Prevent the Page Underneath a Modal Dialog from Scrolling","kind":"usecase","desc":"Prevent the underlying page from scrolling while a modal dialog is open.","ucCat":"ui-behaviors","chars":5087,"codes":1,"sections":["Implementation","Example Code","Best Practices & Constraints","Fallback Strategies"],"baselines":[],"tokens":["<dialog>","showModal()","::backdrop","overscroll-behavior","overflow: hidden","overflow: auto","overscroll-behavior: contain","dialog::backdrop","none","dialog:modal","dialog","overflow: visible","overflow: clip","position: fixed","<html>","<body>","position: sticky","@supports (overscroll-behavior: contain)",". All modern browsers support the","property syntax and return","inert"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/prevent-page-scroll-under-modal-dialog.md"},{"id":"same-document-transitions","cat":"ui-behaviors","title":"Same Document Transitions","kind":"usecase","desc":"Visually connect persisting elements across different page states or navigations in a Single Page Application (SPA) (e.g. expanding a product thumbnail into a full-bleed hero image) by smoothly morphing their size, position, or other styling properties.","ucCat":"ui-behaviors","chars":8485,"codes":9,"sections":["The Problem","The Solution","Implementation Guide","Best Practices","Fallback Strategies"],"baselines":[{"feature":"View transitions","status":"Newly available"}],"tokens":["document.startViewTransition()","view-transition-name","z-index","startViewTransition","document.startViewTransition","none","#hero",".thumbnail",".selected","finished","fit-content","::view-transition-pair()","object-fit","object-position","prefers-reduced-motion","tabindex=\"-1\""],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/same-document-transitions.md"},{"id":"scoped-component-transitions","cat":"ui-behaviors","title":"Scoped Component Transitions","kind":"usecase","desc":"Animate state changes inside a single component (a card, list, panel, or other subtree) while the rest of the page remains interactive, and other transitions run concurrently.","ucCat":"ui-behaviors","chars":12014,"codes":7,"sections":["Implementation","Example","Running an outer transition","Constraints & Accessibility","Fallback strategies"],"baselines":[{"feature":"View transitions","status":"Newly available"}],"tokens":["document.startViewTransition()","::view-transition",":root","position: fixed","[popover]","element.startViewTransition()","startViewTransition()","view-transition-name","view-transition-name: match-element","view-transition-scope: all","view-transition-name: root","view-transition-group: contain","overflow: hidden","scroll","clip","::view-transition-group-children(root)","overflow: clip","root","<ul>",".card",".card ul","document","ready","match-element","listEl","cardEl","::view-transition-group-children()","innerHTML","@media (prefers-reduced-motion: reduce)","::view-transition-group(*)","::view-transition-old(*)","::view-transition-new(*)","view-transition-name: none"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/scoped-component-transitions.md"},{"id":"scroll-completion-effects","cat":"ui-behaviors","title":"Triggering Effects After Programmatic Scrolling Completes","kind":"usecase","desc":"Trigger visual effects, animations, or focus changes on a target element only after a smooth programmatic scroll to that element has finished.","ucCat":"ui-behaviors","chars":7624,"codes":3,"sections":["Implementation","Interrupted Scrolls & Focus Management","Constraints & Best Practices","Accessibility considerations","Fallback strategies"],"baselines":[],"tokens":["behavior: 'smooth'","setTimeout()","scrollend","Promise","Element","scrollIntoView()","scroll()","scrollTo()","scrollBy()","Window","async","(or","await","tabindex=\"-1\"","await targetElement.scrollIntoView(...)","focus()","new Promise()",".focus()","div","overflow-y: auto","<a>","href","link","undefined","await undefined","scroll-promises","result instanceof Promise"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/scroll-completion-effects.md"},{"id":"scroll-entry-exit-effects","cat":"ui-behaviors","title":"Add entry and exit effects to elements as they enter or exit the scrollport","kind":"usecase","desc":"Create fade-in, scale-up, or other complex reveal-type effects on elements as they enter and exit the scrollport (or viewport) while the user is scrolling.","ucCat":"ui-behaviors","chars":10053,"codes":4,"sections":["How to implement","Example code","Best Practices","Browser support and fallback strategies"],"baselines":[{"feature":"Scroll-driven animations","status":"Newly available"}],"tokens":["@keyframes","animation","animation-fill-mode","backwards","forwards","view()","animation-timeline","block","inline","view(inline)","entry","exit","animation-range","<timeline-range-name>","animation-fill-mode: both","fade-in","fade-out","grow","shrink","both","contain","(animation-range: entry)","scroll-timeline-polyfill","prefers-reduced-motion","transform","opacity","width","height","view-timeline","timeline-scope","scroll(nearest)","view(block)","<dashed-ident>","view-timeline-axis","IntersectionObserver",".scroller > *","scale","intersectionRatio","matchMedia()"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/scroll-entry-exit-effects.md"},{"id":"scroll-snap-realtime-feedback","cat":"ui-behaviors","title":"Scroll Snap Real-Time Feedback","kind":"usecase","desc":"Provide real-time visual feedback in linked UI elements while a user scrolls through snap-aligned content, before the scroll gesture completes.","ucCat":"ui-behaviors","chars":10983,"codes":5,"sections":["Overview","Implementation","Accessibility considerations","Fallback strategies"],"baselines":[{"feature":"Scroll snap","status":"Widely available"}],"tokens":["scrollsnapchanging","snapTargetInline","snapTargetBlock","scrollsnapchange","scroll","position: relative","aria-current=\"true\"","<section>","focusgroup=\"toolbar wrap\"","tabindex=\"0\"","role=\"region\"","requestAnimationFrame","scrollend","scrollIntoView","'focusGroup' in HTMLElement.prototype","role=\"toolbar\""],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/scroll-snap-realtime-feedback.md"},{"id":"scroll-snap-state-sync","cat":"ui-behaviors","title":"Scroll Snap State Sync","kind":"usecase","desc":"Synchronize navigation indicators, linked content panels, and analytics tracking with the actively snapped item in a scrollable container.","ucCat":"ui-behaviors","chars":4952,"codes":5,"sections":["Implementation","Accessibility","Fallback strategies"],"baselines":[],"tokens":["scrollsnapchange","scroll-snap-type","scroll-snap-align","aria-current=\"true\"","aria-current=\"location\"","mandatory","tabindex=\"-1\"","tabindex=\"0\"","role=\"region\"","<main>","IntersectionObserver"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/scroll-snap-state-sync.md"},{"id":"scroll-target-on-load","cat":"ui-behaviors","title":"Set a scroll target for the initial render","kind":"usecase","desc":"Build a scrollable list of elements (e.g. a carousel of images or a chat conversation thread) that can be displayed with a particular element scrolled into view on the initial render.","ucCat":"ui-behaviors","chars":3439,"codes":2,"sections":["How to Implement","Example Code: Vertical Media Feed","Strategic Implementation & Best Practices","Fallback Strategy"],"baselines":[],"tokens":["scroll-initial-target","Element.scrollIntoView()","#item-id","overflow: auto","<html>","scroll-initial-target: nearest","element.focus()","aspect-ratio","height","width","example.com/#top","scroll-start","DOMContentLoaded","<body>"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/scroll-target-on-load.md"},{"id":"scrollytelling","cat":"ui-behaviors","title":"Scrollytelling","kind":"usecase","desc":"Animate visual properties on a target element — such as fading a backdrop, shifting a background color, or to create scrollytelling experiences — driven entirely by the scrollport position of a completely different element.","ucCat":"ui-behaviors","chars":9011,"codes":7,"sections":["How to implement","Example code","Best Practices","Fallback strategies"],"baselines":[{"feature":"Scroll-driven animations","status":"Newly available"}],"tokens":["view-timeline","animation-timeline","timeline-scope",":root","animation-range","scroll-timeline-polyfill","prefers-reduced-motion","transform","opacity","width","height","animation","<dashed-ident>","block","view-timeline-axis","IntersectionObserver","#tracked section","#animated section"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/scrollytelling.md"},{"id":"search-hidden-content","cat":"ui-behaviors","title":"Search hidden content","kind":"usecase","desc":"Hide content from view using patterns such as accordions, tabs, and \"Read more\" sections, while ensuring the hidden text reveals itself during native \"Find in page\" searches, allows search engine indexing, supports URL fragment deep links, and maintains ARIA accessibility.","ucCat":"ui-behaviors","chars":6967,"codes":6,"sections":["How to implement","Example code","Best practices for `hidden=\"until-found\"`","Browser support and fallback strategies"],"baselines":[{"feature":"<details>","status":"Widely available"}],"tokens":["display: none","visibility: hidden","<details>","hidden=\"until-found\"","beforematch","name","aria-expanded=\"true\"","display","visibility"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/search-hidden-content.md"},{"id":"sortable-table","cat":"ui-behaviors","title":"Sortable Table","kind":"usecase","desc":"Progressively enhance a data table with behaviors that allow users to sort rows by clicking on column headers.","ucCat":"ui-behaviors","chars":7893,"codes":6,"sections":["Header markup","Wire buttons with invoker commands","Compare values correctly","Reorder the existing rows","Optionally animate the reorder","Narrow screens","Common mistakes","Fallbacks"],"baselines":[{"feature":"Invoker commands","status":"Newly available"}],"tokens":["<table>","move-dom-element-without-losing-state","responsive-table","dynamic-sort","<button type=\"button\">","<th scope=\"col\">","<th>","<a>","role=\"button\"","aria-sort=\"ascending\"","aria-sort=\"descending\"","aria-sort=\"none\"","aria-sort","th:has(> button)","<caption>","<tbody>","<thead>","aria-hidden=\"true\"","currentColor","icons",")). Drive its appearance from",":focus-visible","commandfor","--sort","--","command","event.source","Intl.Collator","or","data-value","<time datetime>","data-type","Array.prototype.sort","<tr>","innerHTML","order","aria-live","role=\"status\"","display: none","overflow-x: auto","role=\"region\"","aria-labelledby","tabindex=\"0\"","min-inline-size","click","moveBefore()"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/sortable-table.md"},{"id":"spatial-navigation","cat":"ui-behaviors","title":"Spatial Navigation (Directional Keypad Focus)","kind":"usecase","desc":"Implement accessible spatial navigation using arrow keys that works correctly in different layout modes (grid etc)","ucCat":"ui-behaviors","chars":6933,"codes":0,"sections":[],"baselines":[],"tokens":["accessibility","getBoundingClientRect()","css-layout","tabindex=\"0\"","tabindex=\"-1\"","focus()","grid","tablist","combobox","listbox","tree","treegrid","checkVisibility()","up","left","right","candidate.left >= current.right - tolerance","gap + w * perpendicularCentreOffset","w >= 2","preventDefault()","e.defaultPrevented","e.composedPath()[0]","e.target","closest()","tabindex","or"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/spatial-navigation.md"},{"id":"swipe-to-remove","cat":"ui-behaviors","title":"Swipe to remove","kind":"usecase","desc":"Let users act on items in a list (remove, archive, mark as read, etc.) with a horizontal swipe gesture, so they can process entries quickly without tapping a separate control.","ucCat":"ui-behaviors","chars":34684,"codes":9,"sections":["How to implement","Best practices and pitfalls","Accessibility considerations","Fallback strategies"],"baselines":[{"feature":"Scroll snap","status":"Widely available"},{"feature":"Intersection observer","status":"Widely available"},{"feature":"MutationObserver","status":"Widely available"},{"feature":"Resize observer","status":"Widely available"},{"feature":"Web animations","status":"Widely available"},{"feature":"scrollbar-width","status":"Newly available"}],"tokens":["swipe-to-reveal","<ul>","<li>","::before","::after",".is-initialized","mandatory","scroll-snap-align","start","center","end","scroll-initial-target",":focus-visible","contain: content",".SwipeableList-item","fill='white'","width","left","right","background-size: contain","scale",".is-activating","opacity",".is-removing","is-removing","transition","data-swipe-direction","IntersectionObserver","activateThreshold","commitThreshold","clientWidth","MutationObserver","commit","setupItem","observer.observe(content)","GestureEvent","commit()",".unread","removeItem(...)","direction","data-direction","removeItem","dismissItem","--left-*","--right-*","background-color","proximity","overscroll-behavior-x: none","pointerdown","pointermove","pointerup","role=\"status\"","tabindex","overscroll-behavior","scrollbar-width","CSS.supports","ResizeObserver","scrollLeft","track.clientWidth","viewportObserver.unobserve(item)"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/swipe-to-remove.md"},{"id":"swipe-to-reveal","cat":"ui-behaviors","title":"Swipe to reveal","kind":"usecase","desc":"Let users swipe horizontally on a list item or content pane to reveal contextual action buttons or a side menu without automatically triggering an action.","ucCat":"ui-behaviors","chars":14509,"codes":3,"sections":["How to implement","Best practices and pitfalls","Accessibility considerations","Fallback","Progressive enhancement"],"baselines":[{"feature":"Scroll snap","status":"Widely available"},{"feature":"scrollbar-width","status":"Newly available"}],"tokens":["swipe-to-remove","pull-to-reveal","scroll-snap-type: x mandatory","overscroll-behavior: chain",".SwipeReveal","overscroll-behavior","auto","chain","contain","none",".SwipeReveal-content","start",".SwipeReveal-panel","end","overscroll-behavior: auto","inline-start",") or two columns (","before",". Because","has","tabindex=\"-1\"","tabindex","tabindex=\"0\"","aria-expanded","aria-expanded=\"true\"","scroll-snap-realtime-feedback","proximity",".SwipeReveal-content.is-scrollable","<button>","<a>","focusin","event.target.matches(':focus-visible')","wheel","touchmove","pointermove","scroll-initial-target: nearest","scroll-initial-target","and call","with","on","scrollbar-width: none","overscroll-behavior: contain"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-behaviors/swipe-to-reveal.md"},{"id":"accordion","cat":"ui-components","title":"Accordion","kind":"usecase","desc":"Build an accordion component with animation, optional exclusive (one-open-at-a-time) behavior, and brand-consistent styling.","ucCat":"ui-components","chars":15088,"codes":14,"sections":["Exclusive accordions","Optional: Expand/Collapse All button","Styling","Excluding a `details` element’s contents from find-in-page","Custom accordion","Fallback strategies"],"baselines":[{"feature":"Mutually exclusive <details> elements","status":"Newly available"},{"feature":"Invoker commands","status":"Newly available"},{"feature":"transition-behavior","status":"Newly available"}],"tokens":["details","section","summary","region","tabindex","Home","End","aria-label","name","aria-expanded","::details-content","content-visibility: hidden","display: none","details::details-content","::marker","list-style: none","::before","icons","block-size","animate-to-intrinsic-sizes","@starting-style","animate-element-entry-exit","button","hidden=\"until-found\"","hidden","aria-controls","custom-button-actions",") for more details on custom commands and","(via",") for","and fall back to a","listener that runs the same loop. See","interpolate-size","transition-behavior","until-found"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/accordion.md"},{"id":"app-menus","cat":"ui-components","title":"Build an application menu bar","kind":"usecase","desc":"Build an application menu bar where several top-level menus (such as File, Edit, and View) act as a single keyboard stop and switch between each other on hover or arrow keys.","ucCat":"ui-components","chars":16091,"codes":7,"sections":["Structure","Keyboard and focus","Implementing the bar","Verify before finishing","Fallback strategies"],"baselines":[{"feature":"Popover","status":"Newly available"},{"feature":"the api.HTMLElement.showPopover.options_source_parameter.implicit_anchor_reference capability","status":"Newly available"},{"feature":"Invoker commands","status":"Newly available"},{"feature":"abs() and sign()","status":"Newly available"}],"tokens":["Tab","ArrowLeft","ArrowRight","menu","role=\"menubar\"","aria-label","aria-expanded=\"true\"","Home","End","Shift","toggle-popover","ArrowDown","tabindex=\"0\"","-1","focus","blur","pointerenter",":hover","trigger.click()","document","focusin","showPopover()",":has()","focusgroup=\"menu nomemory\"","'focusGroup' in HTMLElement.prototype","role=\"menu\"","role=\"menuitem\"","<hr>","role=\"group\"","popovertarget","popover","@oddbird/popover-polyfill","HTMLElement.prototype","setAttribute()","removeAttribute()",":popover-open",":is()",":where()","@supports (position-area: block-end)","toggle","left","top","position: fixed","inset: auto","margin: 0","@supports not (position-area: block-end)","source","ToggleEvent.prototype","anchor-name","position-anchor","viewport-aware-dropdowns","command=\"toggle-popover\"","click","preventDefault()","closeAndRestore(menu)","enterOnOpen","pointerTrigger","Enter","Space","sign()","--bridge-side","clamp()","--pointer-x"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/app-menus.md"},{"id":"breadcrumbs","cat":"ui-components","title":"Build breadcrumbs","kind":"usecase","desc":"Build a breadcrumb trail that shows the user's location within a site hierarchy and lets them navigate to ancestor pages.","ucCat":"ui-components","chars":12634,"codes":6,"sections":["1. Semantics","2. Styling","3. Optional UX enhancements","Fallback strategy"],"baselines":[{"feature":"sibling-count() and sibling-index()","status":"Newly available"}],"tokens":["<nav aria-label=\"Breadcrumbs\">","<ol>","<li>","<a>","ol","ul","<nav>","aria-current=\"page\"","icons","on the","overflow: clip","border-block-start","border-radius","999px","border-radius: 999px","border-inline-start",":focus-visible","3:1","outline-offset","a:focus-visible","forced-colors: active","[aria-current=\"page\"]","forced-color-adjust: none","CanvasText",".breadcrumb","> ol > li > a","clamp()","cqi","sibling-index()","sibling-count()","corner-shape","corner-shape: bevel","border-shape",":dir(rtl)","--shape","polygon()","menu","single-line-overflow","li + li::before","content: none","@supports (corner-shape: bevel)","@supports (z-index: sibling-index())","clip-path: var(--shape)","by setting","and applying","clip-path"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/breadcrumbs.md"},{"id":"card","cat":"ui-components","title":"Build a Card","kind":"usecase","desc":"Build a card component that adapts its presentation to its own available space and contents.","ucCat":"ui-components","chars":8413,"codes":5,"sections":["Overview","Guidelines","Implementation","Interaction models"],"baselines":[],"tokens":["<article>","<label>","option","<select>","order","css-layout",".card__body","<p>","<img>","<picture>","<video>","<svg>",".media","<hgroup>","<header>","<ul>","<dl>","<div>","<footer>","Read more<span> about poached eggs</span>","aspect-ratio","object-fit: cover","alt=\"\"","container-type: inline-size","@container",":has()",".card:has(> img)","grid-column","subgrid","<span>","<button>",".card-link","::after","z-index","<label class=\"card\">",":has(:checked)","border-width","padding","font-weight","outline","box-shadow","display: none","appearance: base-select","::picker(select)","<option>","custom-select-picker-layouts"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/card.md"},{"id":"carousel","cat":"ui-components","title":"Build a carousel","kind":"usecase","desc":"Build a carousel component that displays a set of items in a horizontal or vertical layout.","ucCat":"ui-components","chars":15462,"codes":4,"sections":["Structure and accessibility","Scrolling and controls","Related patterns","Example: horizontal carousel","Fallback strategies","Controls and status updates","Looping (continuous navigation)"],"baselines":[{"feature":"scroll-behavior","status":"Widely available"},{"feature":"scrollend","status":"Newly available"},{"feature":"Scroll snap","status":"Widely available"},{"feature":"sibling-count() and sibling-index()","status":"Newly available"},{"feature":"Scroll-driven animations","status":"Newly available"}],"tokens":["region","aria-roledescription=\"carousel\"","role=\"group\"","aria-roledescription=\"slide\"","aria-label","aria-label=\"2 of 4\"","<button>","::scroll-button()","::scroll-marker",":focus-visible","sibling-index()","carousel-snap-highlights","scroll-progress-indicator","carousel-slide-effects","scroll-snap-state-sync","position: absolute","z-index","pointer-events: none","pointer-events: auto","data-marker-name","[aria-current=\"true\"]","touch-action: manipulation","scroll-behavior: smooth","scrollend","scroll","scrollsnapchange","<script type=\"module\">","@supports","track.scrollBy()","scrollIntoView()","requestAnimationFrame","aria-current=\"true\"","order","--current","order: -1","or",") when","is the last or second-to-last index. Set","only on the first and last slides (","and","scroll-snap-type: none","overflow-x: hidden","overflow-y: hidden","inert","prefers-reduced-motion: no-preference"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/carousel.md"},{"id":"checkbox","cat":"ui-components","title":"Styling Checkboxes","kind":"usecase","desc":"Style checkboxes, including custom icons, layout, colors, check/uncheck animations, while preserving native functionality and accessibility.","ucCat":"ui-components","chars":5870,"codes":3,"sections":["Native customization with `accent-color`","Fully custom styling with `appearance: none`","The indeterminate state","Accessibility and interaction","Fallback strategies"],"baselines":[{"feature":"Masks","status":"Widely available"}],"tokens":["<input>","<label>","for","id","accent-color","appearance: none","<input type=\"checkbox\">","--checkbox-size","--checkbox-icon-size","indeterminate","checkbox.indeterminate = true",":indeterminate",":checked","--checkbox-icon","var(--icon-dash)",".checkbox-custom:indeterminate",":focus-visible",":focus","outline: none","3:1","44px x 44px",":disabled","cursor: not-allowed"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/checkbox.md"},{"id":"copy-button","cat":"ui-components","title":"Copy button","kind":"usecase","desc":"Build a copy button that copies text from arbitrary elements to the clipboard.","ucCat":"ui-components","chars":14886,"codes":9,"sections":["Implementation","Fallbacks and browser support"],"baselines":[{"feature":"Invoker commands","status":"Newly available"},{"feature":"the api.Clipboard.writeText capability","status":"Widely available"},{"feature":"Popover","status":"Newly available"}],"tokens":["command","commandfor","type=\"button\"","min-inline-size","min-block-size","inline-size","block-size","aria-label","icons","report()","data-copied","data-failed","opacity","display: none","visibility: hidden","prefers-reduced-motion: reduce","popover=\"manual\"","selectionchange","pointerup","getBoundingClientRect()","matchMedia('(pointer: fine)').matches","selectedText","copy()","--copy-selection","preventDefault()","pointerdown",":focus-within","pointercancel","Escape","Tab","tabindex=\"-1\"","blur",":hover","<pre tabindex=\"0\">","(hover: none)","aria-hidden","inert","hidden","padding-inline-end","<pre>","navigator.clipboard","https:","localhost","try","document.execCommand('copy')","popovertarget","popover","@oddbird/popover-polyfill","HTMLElement.prototype","setAttribute()","removeAttribute()",":popover-open",":is()",":where()","ariaNotify()","const message","let message"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/copy-button.md"},{"id":"dark-mode-toggle","cat":"ui-components","title":"Dark mode toggles","kind":"usecase","desc":"Build a dark mode toggle component that allows users to override their system color scheme preference for the current site.","ucCat":"ui-components","chars":9378,"codes":2,"sections":["Persistent toggle, settings control, or no toggle at all?","Implementation","User Interface"],"baselines":[],"tokens":["<meta name=\"color-scheme\">","light dark","light","dark","light-dark()","color-scheme","<meta>","dark-mode","\"light\"","\"dark\"","localStorage",") sets","on","color-scheme: light","color-scheme: dark","type=module","defer","try .. catch","window","storage","matchMedia()","font-weight","(prefers-color-scheme: dark)","<picture>","<video>",".dark","(or","selector-atrule-combinations","display: none","<source>"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/dark-mode-toggle.md"},{"id":"dialog","cat":"ui-components","title":"Dialog","kind":"usecase","desc":"Build a modal or non-modal dialog component that is accessible, manages focus appropriately, and can be dismissed the way users expect on each platform.","ucCat":"ui-components","chars":12392,"codes":8,"sections":["Overview","Choose the overlay type","Choose how it can be dismissed","Guidelines","Fallback strategies"],"baselines":[{"feature":"Invoker commands","status":"Newly available"},{"feature":"Popover","status":"Newly available"}],"tokens":["<dialog>","Esc","command=\"show-modal\"","declarative-dialog-popover-control",")) or from script with","::backdrop","role=\"dialog\"","aria-modal","inert","show()","open","prevent-page-scroll-under-modal-dialog","overflow: hidden","position: fixed","html","body","<dialog popover>","auto","manual","dialog.show()","showModal()","popover","closedby","closerequest","none","closedby=\"closerequest\"","closedby=\"any\"","closedby=\"none\"","aria-labelledby","aria-label","autofocus","commandfor","<button>","dialog.showModal()","<form method=\"dialog\">","command=\"close\"","any","command=\"request-close\"","requestClose()","cancel","dialog.returnValue","close","dialog.returnValue = ''","''","request-close","preventDefault()","aria-describedby","visibility","display","hidden","dialog:modal","animate-to-from-top-layer","(via","dialog","dialog[open]","dialog-closedby","overscroll-behavior","@supports","command","popovertarget","@oddbird/popover-polyfill","HTMLElement.prototype","setAttribute()","removeAttribute()",":popover-open",":is()",":where()"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/dialog.md"},{"id":"hovercard","cat":"ui-components","title":"Build an interactive hovercard","kind":"usecase","desc":"Build a hovercard component that displays an interactive structured preview of the page a certain type of link (e.g. a user profile) will navigate to when hovered over.","ucCat":"ui-components","chars":21350,"codes":17,"sections":["1. Triggering the hovercard","2. Positioning with Anchor Positioning","3. Animating entry and exit","4. OPTIONAL: Seamlessly morphing to the next page","Fallback strategies"],"baselines":[{"feature":"Popover","status":"Newly available"}],"tokens":["interest-triggered-tooltips","popover=\"hint\"","hint","interestfor","id","tooltip","aria-expanded","aria-details","aria-label=\"Bold\"","aria-label","aria-labelledby","popovertarget","popovertargetaction=\"show\"","role=\"tooltip\"","toggle","aria-describedby","Enter","autofocus","focus()","interest","focus","load","[interestfor]","alt","title","commandfor",":popover-open","document","loseinterest","Escape","aria-haspopup","interest-delay","0s","@starting-style","transition-behavior: allow-discrete","display","overlay",". Declare","as a separate property after","rather than inside the","transition","consistent-cross-document-transitions","view-transition-name","blocking=\"render\"","<link rel=\"expect\">","old","<a href=\"...\">","popover","@oddbird/popover-polyfill","HTMLElement.prototype","setAttribute()","removeAttribute()",":is()",":where()","auto","manual","\"hint\"","popover=\"manual\"","interestForElement","HTMLButtonElement.prototype",":interest-source",":interest-target",".interest-source",".interest-target","interest-delay-start","interest-delay-end","[popover]","@supports","@oddbird/css-anchor-positioning","CSS.supports(\"anchor-name: --a\")"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/hovercard.md"},{"id":"menu","cat":"ui-components","title":"Build a popup menu","kind":"usecase","desc":"Build a menu component that displays a list of options or actions, with support for nested submenus.","ucCat":"ui-components","chars":31791,"codes":10,"sections":["Commands, links, and what makes a menu","Open and position the menu","Keyboard and focus","Implementing the interaction","Verify before finishing","Align menu item content","Fallback strategies"],"baselines":[{"feature":"Popover","status":"Newly available"},{"feature":"the api.HTMLElement.showPopover.options_source_parameter.implicit_anchor_reference capability","status":"Newly available"},{"feature":"Invoker commands","status":"Newly available"},{"feature":"abs() and sign()","status":"Newly available"}],"tokens":["Tab","ArrowLeft","ArrowRight","app-menus","<button type=\"button\">","<a href>","Home","End","Esc","menuitem","role=\"menu\"","role=\"menuitem\"","aria-haspopup=\"menu\"","navbar","<div focusgroup=\"menu nomemory\">","<menu>","nomemory","commandfor","command=\"toggle-popover\"","popovertarget","popovertargetaction","aria-details","source","position: fixed","left","top","aria-label","aria-labelledby","aria-hidden=\"true\"","aria-expanded=\"true\"","role=\"menubar\"","anchor-name","position-anchor","--below","min-inline-size: 0","max-inline-size","viewport-aware-dropdowns","opacity","translate",". Focus moves on","@starting-style","[popover]","display: none","display","overlay","transition-behavior: allow-discrete","transition","Enter","Space","ArrowDown","ArrowUp","toggle-popover","command","toggle","popover=\"auto\"","keydown","trigger.click()","pointerdown","Escape","blur","focus","hidePopover()","event.detail === 0","stopPropagation()","preventDefault()",":hover",":focus-visible","pointermove","matchMedia('(hover: hover)').matches","pointerleave"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/menu.md"},{"id":"navbar","cat":"ui-components","title":"Responsive Site Navigation","kind":"usecase","desc":"Build a site navigation bar that adapts across screen sizes and indicates the current page.","ucCat":"ui-components","chars":18271,"codes":8,"sections":["Core Markup","Narrow Layout: Popover Navigation","Wide Layout: Inline Navigation","Nested Site Navigation","Indicating the Current Page","Transitions and Accessibility","Fallbacks"],"baselines":[{"feature":"Popover","status":"Newly available"},{"feature":"@starting-style","status":"Newly available"},{"feature":"transition-behavior","status":"Newly available"},{"feature":"content-visibility","status":"Newly available"}],"tokens":["Tab","focusgroup","role=\"menubar\"","role=\"menu\"","role=\"menuitem\"","aria-haspopup=\"menu\"","menu","(via","size-aware-styling","<nav>","<header>","is-wide","popovertarget","aria-controls","nav","icons","declarative-dialog-popover-control","aria-details","popover=\"auto\"","anchor()","viewport-aware-dropdowns","popover","scrollWidth","clientWidth","is-measuring","transition: none","requestAnimationFrame","showPopover()","ResizeObserver","<button>","aria-expanded","<details>","<summary>","button","hidden","toggle","setAttribute()","removeAttribute()","position-area","anchor-name","position-anchor","pointerenter","<li>","matchMedia(\"(hover: hover)\").matches","pointerleave","event.preventDefault()","Enter","Space","focusout","relatedTarget","Shift","position-area: block-end span-inline-end","). Add a","overflow: visible","height: auto","aria-current=\"page\"","[aria-current=\"page\"]","3:1","@starting-style","display","overlay","transition","transition-behavior: allow-discrete","allow-discrete","opacity","translate","prefers-reduced-motion","animate-element-entry-exit","[hidden]","display: grid"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/navbar.md"},{"id":"navigation-drawer","cat":"ui-components","title":"Navigation Drawer","kind":"usecase","desc":"Create a navigation drawer component that, when triggered from a menu button, slides in from the side overlaid on top of existing page content, and slides out when dismissed (by swiping away, tapping outside, or pressing escape).","ucCat":"ui-components","chars":20802,"codes":10,"sections":["Overview","Implementation with `<dialog>`","Implementation for a drawer that also acts as a sidebar","Fallback strategies"],"baselines":[{"feature":"Scroll snap","status":"Widely available"},{"feature":"Intersection observer","status":"Widely available"},{"feature":"Scroll-driven animations","status":"Newly available"},{"feature":"Registered custom properties","status":"Newly available"},{"feature":"the api.HTMLElement.showPopover capability","status":"Widely available"},{"feature":"inert","status":"Widely available"}],"tokens":["<dialog>","popover=\"manual\"","::backdrop","IntersectionObserver","transform","showModal()","role=\"dialog\"","role","autofocus","icons","--drawer-width","mandatory","svh","vh","dvh","--drawer-backdrop","--drawer-fade","<number>","scroll-initial-target","behavior: 'auto'","scroll-behavior","aria-expanded","cancel","matchMedia()",".","or","showPopover()","hidePopover()","close()","inert","aria-modal=\"true\"","keydown","document","animation-timeline","CSS.supports('animation-timeline: scroll()')","scroll","@supports","and inside","scrollTo","@property","popovertarget","position: fixed","z-index","openDrawer()","preventScroll"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/navigation-drawer.md"},{"id":"persistent-app-tours","cat":"ui-components","title":"Creating Persistent App Tours","kind":"usecase","desc":"Create persistent onboarding walkthroughs using tethered native overlays that stay open during user interaction.","ucCat":"ui-components","chars":11497,"codes":9,"sections":["Recommended Implementation","Implementation Guidelines","Accessibility considerations","Fallback strategies"],"baselines":[{"feature":"Popover","status":"Newly available"}],"tokens":["popover=\"manual\"","role=\"dialog\"","aria-labelledby","popovertargetaction=\"hide\"","inert","popovertarget","popover","@oddbird/popover-polyfill","HTMLElement.prototype","setAttribute()","removeAttribute()",":popover-open",":is()",":where()","[popover]","@supports","@oddbird/css-anchor-positioning","CSS.supports(\"anchor-name: --a\")","<script type=\"module\">","commandfor","interestfor","anchor-name","position-anchor","position-area","position-try-fallbacks","anchor()","top","left","right","bottom","inset: auto","@supports (position-area: ...)","@supports (anchor-name: --a)","false","margin: 0","@supports (position-area: block-end)","@supports (top: anchor(bottom))","@supports not (...)"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/persistent-app-tours.md"},{"id":"persistent-toast-notifications","cat":"ui-components","title":"Creating Toast Notifications","kind":"usecase","desc":"Create non-intrusive toast and overlay notifications for persistent, stackable messaging and state communication.","ucCat":"ui-components","chars":14078,"codes":8,"sections":["When to use","Implementation guidelines","Optional: Usability & accessibility improvements","Fallback strategies"],"baselines":[{"feature":"Popover","status":"Newly available"},{"feature":"ariaNotify()","status":"Newly available"},{"feature":"ariaNotify()","status":"Newly available"}],"tokens":["ariaNotify()","transition-behavior: allow-discrete","transition","prefers-reduced-motion","popovertarget","popover","@oddbird/popover-polyfill","HTMLElement.prototype","setAttribute()","removeAttribute()",":popover-open",":is()",":where()","[popover]","@supports","@oddbird/css-anchor-positioning","CSS.supports(\"anchor-name: --a\")","<script type=\"module\">","commandfor","interestfor","anchor-name","position-anchor","position-area","position-try-fallbacks","anchor()","top","left","right","bottom","inset: auto","@supports (position-area: ...)","@supports (anchor-name: --a)","false","margin: 0","@supports (position-area: block-end)","@supports (top: anchor(bottom))","@supports not (...)","operator to add margin manually. I.e."],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/persistent-toast-notifications.md"},{"id":"progress-ring","cat":"ui-components","title":"Progress ring","kind":"usecase","desc":"Build a progress ring component that visually represents the completion status of a task or process, with support for content in the center and brand-consistent styling.","ucCat":"ui-components","chars":7080,"codes":7,"sections":["Implementation","Fallback strategies"],"baselines":[{"feature":"Registered custom properties","status":"Newly available"}],"tokens":["<progress>","conic-gradient()","mask-image","@property","spinner","aria-hidden=\"true\"","aria-valuetext","@media (forced-colors: active)","forced-color-adjust: none","radial-gradient","--value","prefers-reduced-motion","value",".progress-ring-content","requestAnimationFrame()","background-clip: border-area","attr()","MutationObserver"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/progress-ring.md"},{"id":"progress","cat":"ui-components","title":"Build a Styled Progress Bar","kind":"usecase","desc":"Build a styled progress bar that communicates completion of a task or process, in both determinate and indeterminate states.","ucCat":"ui-components","chars":10861,"codes":4,"sections":["Progress bar or progress ring?","Markup","What type of customization is needed?","Fully custom styling","Fallback strategies"],"baselines":[{"feature":"revert-rule","status":"Newly available"}],"tokens":["<progress>","role=\"progressbar\"","progress-ring","spinner","max","value","<label for=\"...\">","aria-labelledby","aria-label","accent-color","width","inline-size","height","block-size","writing-mode: vertical-lr","opacity","filter","clip-path","box-shadow","border-radius","background","border","appearance: none","border: 0 solid","overflow: clip","border-radius: inherit","progress","::-webkit-progress-value","::-moz-progress-bar","-webkit-","-moz-",":is()",":where()","translate","scale","cqi","margin-right: auto","margin-inline-start","margin-left",":dir(rtl)","--progress-bar-indeterminate-*",":indeterminate","--progress-bar-indeterminate-animation","animation-timing-function","--progress-bar-animation","revert-rule","animation: none","tabindex",".focus()","role=\"status\"","aria-live=\"polite\"","aria-busy","aria-describedby","<div>","hidden","aria-hidden=\"true\"","falls back to","with a","duration when","@keyframes revert-rule"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/progress.md"},{"id":"scrollspy","cat":"ui-components","title":"Build a Scrollspy Navigation","kind":"usecase","desc":"Highlight the currently visible section of a page in a navigation menu","ucCat":"ui-components","chars":7034,"codes":4,"sections":["How to implement","Example code","Accessibility considerations","Best Practices","Fallback strategies"],"baselines":[],"tokens":["IntersectionObserver","scroll-target-group",":target-current","<a>","<a href=\"#section-1\">","id","scroll-target-group: auto","aria-current=\"true\"","<script type=\"module\">","DOMContentLoaded","tabindex=\"-1\"","<body>","tabindex=\"0\"","role=\"region\"","<main>","href","aria-current"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/scrollspy.md"},{"id":"spinner","cat":"ui-components","title":"Loading spinner","kind":"usecase","desc":"Build a loading spinner that communicates busy state to all users, respects reduced-motion preferences, and animates efficiently.","ucCat":"ui-components","chars":6025,"codes":5,"sections":["Implementation","Fallback strategies"],"baselines":[{"feature":"Registered custom properties","status":"Newly available"}],"tokens":["<progress>","value","conic-gradient()","background-clip: border-area","prefers-reduced-motion","progress-ring","conic-gradient","@media (forced-colors: active)","forced-color-adjust: none","--_used-spinner-duration","--spinner-duration","@property","--progress-dash-animation","initial-value","mask-image"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/spinner.md"},{"id":"stack-drill-down","cat":"ui-components","title":"Stack Drill Down","kind":"usecase","desc":"Build full-screen hierarchical navigation that lets users drill down into nested views and swipe or navigate back to return, with browser history kept in sync.","ucCat":"ui-components","chars":37268,"codes":13,"sections":["Overview","Implementation"],"baselines":[{"feature":"Scroll snap","status":"Widely available"},{"feature":"Intersection observer","status":"Widely available"},{"feature":"inert","status":"Widely available"},{"feature":"Scroll-driven animations","status":"Newly available"}],"tokens":["scrollsnapchange","popstate","inert","pushState","view()","transform",".Stack-view",".Stack",".Stack-viewContent","currentDepth + 1","mandatory","always","view(inline)","to","/view/:id","title","scroll-behavior","history.back()",".go()","event.snapTargetInline","onActiveViewChanged","currentDepth","behavior: 'instant'","depth","IntersectionObserver","entriesByDepth","tabindex=\"-1\"","<body>","document.title","preventScroll: false","toIdx > fromIdx","overscroll-behavior-x: none","drillDown","prefers-reduced-motion","scroll-behavior: smooth","and call","/","with","(not","behavior: 'smooth'","<a href>","<button onclick>","<div>","history.pushState","scroll","view: null","updateFromHistoryState","HTMLElement.prototype","window","document","@supports (animation-timeline: view())","filter"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/stack-drill-down.md"},{"id":"tabs","cat":"ui-components","title":"Tabbed interfaces","kind":"usecase","desc":"Build a responsive tabbed interface with good UX when not all tabs fit on screen.","ucCat":"ui-components","chars":22166,"codes":12,"sections":["Basic markup","Keyboard interaction","Styling","Handling tabs that don’t fit","Fallback strategies"],"baselines":[{"feature":"Scroll-driven animations","status":"Newly available"}],"tokens":["tablist","focusgroup","tab","<button>","type=button","aria-labelledby","aria-label","aria-selected","role=tabpanel","aria-controls","hidden=\"until-found\"","hidden","beforematch","tabindex=0","aria-selected=\"true\"","nomemory","focusgroupstart","padding","border","margin","font-size","font-weight","box-shadow","anchor-positioning-tab-underline","hidden=until-found","display: none","gap","search-hidden-content","display: flex","overflow-x: auto","flex: none","scroll-snap-type: inline proximity","scroll-snap-align: start","proximity","mandatory","scrollability-affordance-hints",".","--fade-start","--fade-end","@property","scroll-padding-inline","scroll-padding-block","to bottom","0 0","scroll(self block)","overflow-y","--fade-dir",":dir(rtl)","menu","Tab","ArrowRight","End","ArrowLeft","IntersectionObserver","threshold: 1","visibility: hidden","overflow: clip","menuitem","order","flex: 0 1 auto","min-inline-size: max-content","max-inline-size","flex-shrink: 0","min-inline-size","text-overflow: ellipsis","overflow: hidden","single-line-overflow","interpolate-size: allow-keywords","max-content","prefers-reduced-motion"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/tabs.md"},{"id":"toolbar","cat":"ui-components","title":"Build a toolbar","kind":"usecase","desc":"Build a toolbar component that displays a set of controls for performing actions.","ucCat":"ui-components","chars":22040,"codes":13,"sections":["Structure and semantics","Action buttons and feedback","Keyboard navigation","Vertical toolbar","Visible states","Tooltips for icon-only buttons","Overflow menu for secondary actions (optional)","Fallback strategies"],"baselines":[{"feature":"Popover","status":"Newly available"},{"feature":"the api.Clipboard.writeText capability","status":"Widely available"}],"tokens":["Tab","navbar","menu","role=\"toolbar\"","aria-label","role=\"group\"","role=\"separator\"","aria-orientation=\"vertical\"","opacity: 0","display: none","visibility: hidden","aria-controls","<button type=\"button\">","<svg aria-hidden=\"true\">","currentColor","mask","background-color: currentColor","forced-color-adjust: none","icons","aria-pressed","true","aria-disabled=\"true\"","disabled","focusgroup=\"toolbar wrap\"","Home","End","focusgroup","focusgroup=\"toolbar wrap block\"","ArrowDown","ArrowUp","flex-direction: column","aria-orientation=\"horizontal\"","vertical","position-area: inline-end","min-inline-size","min-block-size","inline-size","block-size","@media (pointer: coarse)","2.5rem","3rem",":focus-visible","[aria-pressed=\"true\"]","color","forced-colors: active","ButtonText","Highlight","transparent","background","@media (hover: hover)","title","popover=\"hint\"","position-area: block-end","flip-block","flip-inline","interestfor","tooltip","aria-expanded","aria-details","aria-label=\"Bold\"","aria-labelledby","popovertarget","popovertargetaction=\"show\"","role=\"tooltip\"","toggle","aria-describedby","Enter","autofocus","focus()","interest"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/toolbar.md"},{"id":"content-first-noise-reduction","cat":"user-experience","title":"Maximize content and reduce noise","kind":"usecase","desc":"Maximize content and reduce noise by removing blocking popups, keeping persistent navigation compact, and moving secondary content behind on-demand disclosure.","ucCat":"user-experience","chars":8469,"codes":7,"sections":["Implementation","Fallback strategies"],"baselines":[{"feature":"Popover","status":"Newly available"},{"feature":"Invoker commands","status":"Newly available"}],"tokens":["width","height","shrinking-header-on-scroll","popover","popovertarget","popover=\"auto\"","viewport-aware-dropdowns","commandfor","command=\"toggle-popover\"","declarative-dialog-popover-control","navigation-drawer","details","summary","scrolled","@oddbird/popover-polyfill","HTMLElement.prototype","setAttribute()","removeAttribute()",":popover-open",":is()",":where()","invokers-polyfill"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/content-first-noise-reduction.md"},{"id":"form-factor-adaptation","cat":"user-experience","title":"Adapt to the form factor","kind":"usecase","desc":"Adapt layouts, controls, and text to any device or container so touch targets stay usable, content fits its space, and nothing collides with system UI.","ucCat":"user-experience","chars":6120,"codes":4,"sections":["Implementation","Fallback strategies"],"baselines":[{"feature":"text-wrap","status":"balance: Newly available"}],"tokens":["responsive-design","<label>","pointer: coarse","prefers-color-scheme","height","block-size","inline-size","container-type: size","size-aware-styling","content-based-styling","safe-area-inset-top","text-wrap: balance","text-wrap: pretty","improve-text-layout-and-legibility","). DO NOT apply either property to","aria-label","<img alt>","aria-hidden=\"true\"","accessibility","min-block-size","text-overflow: ellipsis","overflow: hidden","respect-os-text-scale","form-fields-automatically-fit-contents"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/form-factor-adaptation.md"},{"id":"natural-interactions","cat":"user-experience","title":"Implement natural interactions","kind":"usecase","desc":"Implement natural interactions with clear hover, focus, and press feedback, motion that opens from its trigger, swipeable content, and keyboard-reachable actions.","ucCat":"user-experience","chars":9975,"codes":7,"sections":["Implementation","Fallback strategies"],"baselines":[{"feature":"Popover","status":"Newly available"},{"feature":"the html.elements.button.popovertarget.implicit_anchor_reference capability","status":"Newly available"},{"feature":"linear() easing","status":"Widely available"}],"tokens":[":focus-visible","outline: none","outline: 0","CanvasText","color-scheme","color-scheme: light dark","currentColor","menu",") and","(via","transform-origin","viewport-aware-dropdowns","transform","opacity","motion","animate-to-from-top-layer","<button popovertarget=\"dropdown-id\">","declarative-dialog-popover-control","linear()","physics-based-easing","carousel-snap-highlights","swipe-to-reveal","navigation-drawer","carousel","filter","<button>","<a>","href","interest-triggered-tooltips","popovertarget","popover","@oddbird/popover-polyfill","HTMLElement.prototype","setAttribute()","removeAttribute()",":popover-open",":is()",":where()","inset: auto","CSS.supports('position-area: bottom')","top","left","getBoundingClientRect()","beforetoggle","ease-out"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/user-experience/natural-interactions.md"},{"id":"adapt-scrollbar-to-contrast-preferences","cat":"visual-design","title":"Adapt scrollbar to high-contrast preferences","kind":"usecase","desc":"Enhance scrollbar visibility for users who prefer high-contrast interfaces","ucCat":"visual-design","chars":3699,"codes":2,"sections":["Enhance Legibility","Fallbacks & Browser Support"],"baselines":[{"feature":"scrollbar-color","status":"Newly available"}],"tokens":["@media (prefers-contrast: more)","scrollbar-color","::-webkit-scrollbar","scrollbar-width","thin","auto","scrollbar-gutter: stable","@supports not (scrollbar-color: auto)"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/adapt-scrollbar-to-contrast-preferences.md"},{"id":"apply-webgl-shaders","cat":"visual-design","title":"Apply WebGL shaders to HTML content","kind":"usecase","desc":"Apply custom visual effects with WebGL shaders to HTML content.","ucCat":"visual-design","chars":13404,"codes":8,"sections":["How to implement","Example code","Best Practices"],"baselines":[],"tokens":["content=\"drawable\"","<canvas>","drawable","texImage2D","canvas.getContext(\"webgl2\")","texImage2D()","null","canvas.captureElementImage(element)","width","height","Math.ceil()","captureElementImage()","requestPaint()","paint","texStorage2D()","state","canvas.onpaint","texElementSubImage2D","canvas.requestPaint()","requestAnimationFrame","event.changedElements","DOMMatrix","mvp","canvas.updateElementGeometry()","canvasTransform","updateElementGeometry()","canvas.clearElementGeometry(element)","DOMRectInit","onpaint","TEXTURE_MIN_FILTER","LINEAR","ResizeObserver","installHtmlInCanvasPolyfill()"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/apply-webgl-shaders.md"},{"id":"browser-ui-theming","cat":"visual-design","title":"Theming browser-generated UI","kind":"usecase","desc":"Theme browser-generated UI such as text selection, scrollbars, form controls, and pickers with CSS instead of re-creating it with custom elements.","ucCat":"visual-design","chars":4221,"codes":0,"sections":[],"baselines":[],"tokens":["::selection","user-select: none","accent-color","color-scheme","scrollbar-color","scrollbar-width","auto","scrollbar-width: thin",":user-invalid",":user-valid",":invalid",":valid","input","input:not(input[type=\"range\"]):user-valid","<textarea>","font-size","3:1","<input>",":placeholder-shown","::placeholder","field-sizing: content","resize: vertical","resize: none","<select>","appearance: base-select","::picker(select)","branded-select-styling","<input type=checkbox>","<input type=radio>","<label>","label:has(:checked)","appearance: none","::before","::after","::file-selector-button","type","button","submit","reset","<button>","::-webkit-slider-thumb","::-moz-range-thumb","::-webkit-slider-runnable-track","::-moz-range-track"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/browser-ui-theming.md"},{"id":"color","cat":"visual-design","title":"Color","kind":"usecase","desc":"Color guidance for the web, including contrast requirements, light and dark color schemes, Forced Colors Mode, and generating tints and shades from a base color.","ucCat":"visual-design","chars":4479,"codes":1,"sections":["Accessible color","Generating tints"],"baselines":[],"tokens":["prefers-contrast","@media (prefers-contrast: more)","@media (prefers-color-scheme: dark)","color-scheme","dark-mode","box-shadow","text-shadow","border-image","url()","@media (forced-colors: active)","forced-color-adjust: none","Canvas","background-image","outline","border","CanvasText","LinkText","ButtonText","Highlight","GrayText","oklch","oklab","lch","lab","oklab(from var(--primary) 0.9 a b)","color-mix()"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/color.md"},{"id":"complex-shapes","cat":"visual-design","title":"Complex Shapes","kind":"usecase","desc":"Clip elements and their content to any free-form shape, like a symbol, brush stroke, or organic texture for more expressive designs.","ucCat":"visual-design","chars":3592,"codes":3,"sections":["Overview","Implementation"],"baselines":[{"feature":"Masks","status":"Widely available"}],"tokens":["mask-image","clip-path","<mask>","maskContentUnits=\"objectBoundingBox\"","to","(like","mask-type=\"alpha\""],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/complex-shapes.md"},{"id":"contrast-color","cat":"visual-design","title":"Ensure text readability with dynamic background colors","kind":"usecase","desc":"Select a readable text color with sufficient contrast on a dynamic background color.","ucCat":"visual-design","chars":7259,"codes":10,"sections":["Determine optimal text color","Integrate with theming","Fallback strategies"],"baselines":[{"feature":"contrast-color()","status":"Newly available"},{"feature":"Relative colors","status":"Newly available"},{"feature":"Text stroke and fill  (compatibility prefixes)","status":"Widely available"},{"feature":"paint-order","status":"Widely available"},{"feature":"SVG filters","status":"Widely available"}],"tokens":["contrast-color()","black","white","<color>","color","background-color","color(xyz)","paint-order","value. Note that","is","<span>"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/contrast-color.md"},{"id":"custom-text-decorations","cat":"visual-design","title":"Custom text decorations","kind":"usecase","desc":"Add text decorations such as underlines, overlines, strikethroughs, or entirely custom shapes, with reveal animations, custom offsets and end insets, and flexible ink skipping.","ucCat":"visual-design","chars":16762,"codes":12,"sections":["Style the line","Control where the line is skipped","Trim or extend the line with an inset","Draw a custom line with a pseudo-element","Outline text with a box instead","Choose a technique","Fallback Strategies"],"baselines":[{"feature":"text-decoration-skip-ink","status":"all: Newly available"}],"tokens":["text-decoration","<a href>","target=\"_blank\" rel=\"noopener\"","href=\"javascript:void(0)\"","text-underline-offset",":where()","text-decoration-style","solid","double","dotted","dashed","wavy","0.06em","0.1em","0.15em","0.25em","currentColor","text-decoration-skip-ink","auto","all","none","text-decoration-skip-spaces","start end","text-decoration-inset","<a>","border-shape","corner-shape","border-radius","clip-path","background-clip: border-area","border-color","text-decoration-skip-ink: all","@supports","evenodd","clip-path: polygon(...)","border-block-end",".draw::after","block-size","border","box-shadow",":focus-visible"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/custom-text-decorations.md"},{"id":"customize-scrollbar-color-and-thickness","cat":"visual-design","title":"Customize the color or thickness of a scrollbar","kind":"usecase","desc":"Customize the color or thickness of a scrollbar","ucCat":"visual-design","chars":2771,"codes":2,"sections":["Apply `scrollbar-color` and `scrollbar-width`","Fallback strategies"],"baselines":[{"feature":"scrollbar-width","status":"Newly available"},{"feature":"scrollbar-color","status":"Newly available"}],"tokens":["scrollbar-color","scrollbar-width","<color>","auto","thin","none","::-webkit-scrollbar","@supports not (scrollbar-color: auto)"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/customize-scrollbar-color-and-thickness.md"},{"id":"dark-mode","cat":"visual-design","title":"Dark mode","kind":"usecase","desc":"Implement dark mode support in a way that respects the user's light/dark theme preference and adapts browser UI (e.g. scrollbars, form controls, etc)","ucCat":"visual-design","chars":17162,"codes":10,"sections":["Implementation","Fine-grained browser UI customization","4. Varying images for light and dark mode","JS-based theme detection","OPTIONAL: Implementing a color-scheme toggle","OPTIONAL: Component-specific overrides","Known issues to be aware of","Fallback strategies"],"baselines":[{"feature":"color-scheme","status":"Widely available"},{"feature":"light-dark()","status":"Newly available"},{"feature":"light-dark() image values","status":"Newly available"},{"feature":"the css.types.gradient.linear-gradient.single_color_stop capability","status":"Newly available"},{"feature":"scrollbar-color","status":"Newly available"}],"tokens":["color-scheme","<meta>","<head>","html",":root","body","light-dark()","accent-color","scrollbar-color","canvas","canvastext","accentcolor","buttonborder","prefers-color-scheme","dark","light","::-webkit-scrollbar","scrollbar-width","thin","auto","scrollbar-gutter: stable","::placeholder","::spelling-error","::grammar-error","::selection","::search-text","::target-text","::file-selector-button","image(<color>)","MUST also handle its","dark-mode-toggle","component-specific-light-dark-theme","postMessage()","<html>","postMessage","image-set()","type()","type(\"\")","--light-type","--dark-type","linear-gradient(blue)","@supports not (scrollbar-color: auto)"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/dark-mode.md"},{"id":"equal-width-text-lines","cat":"visual-design","title":"Equal-Width Text Lines","kind":"usecase","desc":"Make every line of a multi-line heading or lockup span the same width, as in poster-style or stacked-headline typography. Unlike justified text, the text itself is sized to the width rather than the spacing stretched","ucCat":"visual-design","chars":6539,"codes":2,"sections":["Basic implementation","Visual design","Fallback strategies"],"baselines":[{"feature":"text-wrap","status":"balance: Newly available"}],"tokens":["text-fit","<span>","display: block","white-space: nowrap","text-fit: grow per-line-all <percentage>","per-line-all","per-line","grow","shrink","font-size","fit-content","max-content","precise-text-alignment","line-height","em","text-wrap: balance","text-wrap: pretty","text-box: trim-both cap alphabetic","gap","text-box","text-transform: uppercase","font-weight","fitty"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/equal-width-text-lines.md"},{"id":"export-html-media-from-canvas","cat":"visual-design","title":"Export HTML content from canvas","kind":"usecase","desc":"Capture and export dynamic HTML content as images or video frames from within canvas.","ucCat":"visual-design","chars":17549,"codes":9,"sections":["How to implement","Example code","Best Practices","Fallback strategies"],"baselines":[],"tokens":["toDataURL()","toBlob()","captureStream()","content=\"drawable\"","<canvas>","drawable","canvas.onpaint","drawElementImage","canvas.captureElementImage(element)","width","height","Math.ceil()","captureElementImage()","requestPaint()","paint","texImage2D","canvas.getContext(\"webgl2\")","texImage2D()","null","texStorage2D()","state","texElementSubImage2D","drawElementImageToTexture","COPY_DST","RENDER_ATTACHMENT","TEXTURE_BINDING","size","requestAnimationFrame","canvas.requestPaint()","event.changedElements","drawElementImage()","updateElementGeometry()","style.transform","canvas.updateElementGeometry()","DOMMatrix","mvp","canvasTransform","canvas.clearElementGeometry(element)","onpaint","TEXTURE_MIN_FILTER","LINEAR","ResizeObserver","html2canvas","dom-to-image","snapdom","rrweb"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/export-html-media-from-canvas.md"},{"id":"expose-canvas-content-to-browser-features","cat":"visual-design","title":"Expose canvas content to browser features","kind":"usecase","desc":"Expose content rendered in a canvas to browser features like assistive technologies, translation, or reading mode.","ucCat":"visual-design","chars":20075,"codes":14,"sections":["How to implement","Example code","Best Practices","Fallback strategies"],"baselines":[],"tokens":["<canvas>","HTML in canvas","content=\"drawable\"","drawable","canvas.onpaint","canvas.requestPaint()","paint","drawElementImage","canvas.captureElementImage(element)","width","height","Math.ceil()","captureElementImage()","requestPaint()","texImage2D","canvas.getContext(\"webgl2\")","texImage2D()","null","texStorage2D()","state","texElementSubImage2D","drawElementImageToTexture","COPY_DST","RENDER_ATTACHMENT","TEXTURE_BINDING","size","requestAnimationFrame","event.changedElements","drawElementImage()","updateElementGeometry()","style.transform","canvas.updateElementGeometry()","DOMMatrix","mvp","canvasTransform","canvas.clearElementGeometry(element)","onpaint","TEXTURE_MIN_FILTER","LINEAR","ResizeObserver","installHtmlInCanvasPolyfill()"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/expose-canvas-content-to-browser-features.md"},{"id":"improve-text-layout-and-legibility","cat":"visual-design","title":"Improve Text Layout and Legibility","kind":"usecase","desc":"Improve the layout and legibility of short standalone text content, such as headings no longer than a few lines, by enabling the browser to apply evenly balanced line breaks when wrapping text.","ucCat":"visual-design","chars":5207,"codes":2,"sections":["Implementation"],"baselines":[{"feature":"text-wrap","status":"balance: Newly available"}],"tokens":["text-wrap: balance","text-wrap: pretty","<p>","<blockquote>","<li>","text-wrap: wrap","h1","h6","wrap","inline-size","pretty"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/improve-text-layout-and-legibility.md"},{"id":"interactive-content-in-3d-scenes","cat":"visual-design","title":"Enable interactive HTML content in 3D scenes","kind":"usecase","desc":"Integrate interactive HTML elements into a 3D scene.","ucCat":"visual-design","chars":19625,"codes":16,"sections":["How to implement","Example code","Best Practices"],"baselines":[],"tokens":["content=\"drawable\"","drawable","<canvas>","canvas.onpaint","canvas.requestPaint()","paint","canvas.captureElementImage(element)","width","height","Math.ceil()","captureElementImage()","requestPaint()","texImage2D","canvas.getContext(\"webgl2\")","texImage2D()","null","texStorage2D()","state","texElementSubImage2D","drawElementImageToTexture","COPY_DST","RENDER_ATTACHMENT","TEXTURE_BINDING","size","requestAnimationFrame","event.changedElements","DOMMatrix","mvp","canvas.updateElementGeometry()","canvasTransform","updateElementGeometry()","canvas.clearElementGeometry(element)","InteractionManager","interactions.update()","onpaint","TEXTURE_MIN_FILTER","LINEAR","ResizeObserver","installHtmlInCanvasPolyfill()"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/interactive-content-in-3d-scenes.md"},{"id":"precise-text-alignment","cat":"visual-design","title":"Precise Text Alignment","kind":"usecase","desc":"Achieve precise vertical alignment with text of any font. For example, exactly equal visual padding above and below text, or aligning text perfectly flush with adjacent icons or images.","ucCat":"visual-design","chars":4872,"codes":3,"sections":["The Problem","The Solution","Implementation Guide","Best Practices","Other Considerations"],"baselines":[],"tokens":["align-items: center","padding: 12px","text-box-trim","text-box-edge","text-box","text-box-trim: trim-both","cap alphabetic","padding","text-box: trim-both cap alphabetic","trim-start cap alphabetic","text-box: <trim-direction> <edges>","text","line-height","ex"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/precise-text-alignment.md"},{"id":"shaped-cutouts","cat":"visual-design","title":"Shaped Cutouts","kind":"usecase","desc":"Combine multiple shapes to create complex cutouts or 'knockout' effects in elements, such as adding a notch to an element.","ucCat":"visual-design","chars":7311,"codes":3,"sections":["Overview","Implementation","Fallback strategies"],"baselines":[{"feature":"Masks","status":"Widely available"}],"tokens":["fill=\"white\"","fill=\"black\"","mask-type=\"alpha\"","<mask>","maskContentUnits=\"objectBoundingBox\"",".card-body","div",".card-accent","mask-image"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/shaped-cutouts.md"},{"id":"soft-edge-content-fade","cat":"visual-design","title":"Soft Edge Content Fade","kind":"usecase","desc":"Apply a transparency gradient to content edges to indicate further scrollable areas or to obscure payment-walled text.","ucCat":"visual-design","chars":2659,"codes":3,"sections":["Overview","Implementation","Fallback strategies"],"baselines":[{"feature":"Masks","status":"Widely available"}],"tokens":["mask-image","pointer-events: none"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/soft-edge-content-fade.md"},{"id":"typography","cat":"visual-design","title":"Typography","kind":"usecase","desc":"Typography best practices for the web, including font sizing units, line height, text wrapping and balancing, and fluid type that scales with the viewport.","ucCat":"visual-design","chars":3676,"codes":1,"sections":["Overall best practices","Readability","Text wrapping","Responsive Typography"],"baselines":[],"tokens":["line-height","1.5","overflow-wrap: break-word","anywhere","px","rem","em","height","block-size","min-block-size","text-align: justify","hyphens: auto","lang","<html lang=\"en\">","<em>","<strong>","white-space: nowrap","text-wrap: balance","<th>","text-wrap: pretty","clamp()","vw"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/typography.md"},{"id":"visual-effects","cat":"visual-design","title":"Visual effects","kind":"usecase","desc":"Visual effects with CSS such as layered shadows, blend modes, gradients with predictable color interpolation, and patterns like stripes, checkerboards, dots, and pie charts built from gradients alone.","ucCat":"visual-design","chars":3595,"codes":8,"sections":[],"baselines":[],"tokens":["filter: drop-shadow()","box-shadow","mix-blend-mode","background-blend-mode","isolation: isolate","color-mix()","in oklch","in oklab","in srgb","in <color-space>","or","1em",".5em","2em","sqrt(2)","accessibility"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/visual-effects.md"},{"id":"visually-stable-font-fallbacks","cat":"visual-design","title":"Visually Stable Font Fallbacks","kind":"usecase","desc":"Define font styles such that text remains readable and visually consistent in the event that there's a swap between the preferred font and one of the fallbacks (or vice versa).","ucCat":"visual-design","chars":2978,"codes":2,"sections":["Implementation steps","Fallback strategies"],"baselines":[{"feature":"font-size-adjust","status":"Newly available"}],"tokens":["font-size","font-size-adjust","from-font","cap-height","ch-width","font-family","@font-face","size-adjust","ascent-override","descent-override"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/visually-stable-font-fallbacks.md"},{"id":"visually-stable-mixed-fonts","cat":"visual-design","title":"Visually Stable Mixed Fonts","kind":"usecase","desc":"Define font styles such that text remains readable and visually consistent in situations where multiple fonts are used to render a single block of text.","ucCat":"visual-design","chars":2914,"codes":3,"sections":[],"baselines":[{"feature":"font-size-adjust","status":"Newly available"}],"tokens":["font-size-adjust","from-font","font-size-adjust: 0.5","font-size","@supports","@supports not (font-size-adjust: from-font)","line-height"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/visually-stable-mixed-fonts.md"},{"id":"visually-texture-content","cat":"visual-design","title":"Visually Texture Content","kind":"usecase","desc":"Apply realistic weathering and texture patterns to elements to give them an organic, aged, or physical material appearance.","ucCat":"visual-design","chars":3814,"codes":3,"sections":["Overview","Implementation","Fallback strategies"],"baselines":[{"feature":"Masks","status":"Widely available"}],"tokens":["mask-image","mask-mode: match-source","<mask>","luminance","alpha","black","mask-mode"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/visually-texture-content.md"},{"id":"cpp-on-the-web","cat":"wasm","title":"Compiling C and C++ to WebAssembly with Emscripten","kind":"usecase","desc":"Compile C/C++ to WebAssembly using Emscripten","ucCat":"wasm","chars":8186,"codes":4,"sections":["1. Recommended Emscripten Compilation Flags","2. JavaScript-WebAssembly Boundary Efficiency","3. Avoid Blocking the Main Thread","4. Test Runtime Execution and Memory Limits","5. Avoid Dynamic Linking if Possible","6. Porting Existing C/C++ Libraries and Build Integration"],"baselines":[],"tokens":["emcc","em++","-sSTRICT","-sEXPORT_ES6","import","export","-sMODULARIZE","-sENVIRONMENT=web","-sENVIRONMENT=worker","-sALLOW_MEMORY_GROWTH","-Werror -Wall","-O3","-Os","-Oz","-flto","-sWASM","=1","-s","-sSTRICT=1","-sEXPORT_ES6=1","-sALLOW_MEMORY_GROWTH=1","-pthread","-sUSE_PTHREADS","-m64","-sMEMORY64","-sEXPORTED_RUNTIME_METHODS=HEAPU8","@filename","-sEXPORTED_FUNCTIONS=@exported_funcs.txt",".c",".cpp",".o","em++ -c","-g","-sASSERTIONS","--closure=1","-gline-tables-only","-gsource-map","-O2","wasm.HEAPU8.buffer","wasm.HEAPU8","ArrayBuffer","postMessage","SharedArrayBuffer","Cross-Origin-Opener-Policy: same-origin","Cross-Origin-Embedder-Policy: require-corp","emscripten_set_main_loop","-sJSPI","-sASYNCIFY","-sSTACK_SIZE","-sSTACK_SIZE=1MB",".a",".so",".dylib",".dll","-sMAIN_MODULE","-sSIDE_MODULE","\"build\"","package.json","cmake","make","emcmake","emmake","emconfigure"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/wasm/cpp-on-the-web.md"},{"id":"agentic-forms","cat":"webmcp","title":"Agentic Forms","kind":"usecase","desc":"Expose client-side functionality as tools to AI agents by annotating standard HTML forms with WebMCP attributes.","ucCat":"webmcp","chars":6382,"codes":4,"sections":["Form Attributes","Handling Submissions in JavaScript","Lifecycle Events","Visual Feedback (CSS)","Form Suitability (When to Avoid)","When to use toolautosubmit","When to omit toolautosubmit","Fallback strategies"],"baselines":[],"tokens":["<form>","toolname","tooldescription","form()","@angular/forms/signals","provideExperimentalWebMcpForms()","option to","toolautosubmit","toolparamdescription","textContent","<label>","aria-description","<input type=\"radio\">","<fieldset>","SubmitEvent","agentInvoked","respondWith(promise)","document.modelContext","toolactivated","toolcancel","window",":tool-form-active",":tool-submit-active","tool*"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/webmcp/agentic-forms.md"},{"id":"agentic-javascript-tools","cat":"webmcp","title":"Agentic JavaScript Tools","kind":"usecase","desc":"Programmatically register client-side JavaScript functions as tools for AI agents using the WebMCP Imperative API.","ucCat":"webmcp","chars":22663,"codes":16,"sections":["Registration and Lifecycle","Defining Parameters","Writing Tool and Parameter Descriptions","Execution Patterns","Flagging Consequential Tools","Flagging Debugging Tools","In-Page Agents and Testing (`getTools` and `executeTool`)","Tool Factory Pattern","TypeScript Types","Framework support","API Notes","Fallback strategies"],"baselines":[],"tokens":["document.modelContext.registerTool()","getTools()","executeTool()","<iframe>","ModelContextRegisterToolOptions","signal","AbortSignal","exposedTo","AbortController","unregisterTool()","fromOrigins","and execute it via","registerTool()","SecurityError","inputSchema","description","enum","default","minimum","maximum","execute","async execute","async","localStorage","throw new Error(...)","signal.aborted","true","fetch()","addEventListener()","ReadableStream","setTimeout","setInterval","await","signal.throwIfAborted()","annotations","consequentialHint","debugging","annotations.debugging","false","RegisteredTool.annotations.debugging","getTools","executeTool","document.modelContext.getTools()","RegisteredTool","RegisteredTool.inputSchema","inputObject","BigInt","undefined","options.signal","document.modelContext","webmcp-types","npm install --save-dev webmcp-types","tsconfig.json","if (document.modelContext)","WebMCP.ModelContextTool","use-webmcp-tool","useWebMCP(options)","@angular/core","@angular/forms/signals","provideExperimentalWebMcpTools([...])","declareExperimentalWebMcpTool(...)","provideExperimentalWebMcpForms()","experimentalWebMcpTool","@vueuse/core","name","enabled","ModelContextGetToolOptions","navigator.modelContext","provideContext()","clearContext()"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/webmcp/agentic-javascript-tools.md"},{"id":"webmcp","cat":"webmcp","title":"WebMCP","kind":"usecase","desc":"Use this guide to implement WebMCP in browser applications, exposing client-side functionality as tools to AI agents via declarative or imperative APIs.","ucCat":"webmcp","chars":4367,"codes":0,"sections":["Quick Overview","Best Practices","Implementation Status"],"baselines":[],"tokens":["146.0.7672.0","#enable-webmcp-testing","stdio","document.modelContext.registerTool()","<form>","toolname","tooldescription","useWebMCP","use-webmcp-tool","provideExperimentalWebMcpTools","declareExperimentalWebMcpTool","@angular/core","@vueuse/core","registerTool()","create-event","start-event-creation-process","inputSchema","execute","AbortSignal","unregisterTool","chrome://flags/#enable-webmcp-testing","edge://flags/#enable-webmcp-testing"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/webmcp/webmcp.md"},{"id":"chrome-extensions","cat":"chrome-extensions","title":"Chrome Extensions","kind":"overview","desc":"Build and publish Chrome Extensions using Manifest V3 best practices. Use this skill","ucCat":"","chars":26273,"codes":15,"sections":["Part 1 — Building Extensions","Part 2 — Publishing to the Chrome Web Store","Reference Files","Output Checklist"],"baselines":[],"tokens":["references/extensions/icons.md","chrome.sidePanel.open()","default_popup","setPanelBehavior","references/extensions/side-panel.md","eval()","new Function()","<script>","references/extensions/csp-sandbox.md","tab.url","tabs","undefined","references/extensions/permissions.md",".then()","runtime.onMessage","requestAnimationFrame","references/extensions/content-scripts.md","chrome.alarms","setTimeout","setInterval","references/extensions/service-worker.md","\"key\"","\"key\": \"MIIBIjANBgkqh...\"","references/extensions/auth-identity.md","references/extensions/context-menus.md","LanguageModel","LanguageModel.params()","modern-web-guidance","references/extensions/prompt-api.md","chrome.action","action","chrome.action.setBadgeText","chrome.action.setIcon","chrome.action.onClicked","\"action\"","activeTab","host_permissions","chrome.devtools.panels.create()","references/extensions/devtools.md","chrome.offscreen","chrome.*","chrome.downloads","chrome.tabs","chrome.runtime.sendMessage","chrome.runtime.onMessage","chrome.runtime.getURL","references/extensions/message-passing.md","chrome.notifications.create()","iconUrl","\"Unable to download all specified images.\"","chrome.tabCapture.getMediaStreamId()","\"Cannot capture a tab with an active stream\"","chrome.tabCapture","chrome.desktopCapture","chrome.offscreen.createDocument","references/extensions/media-capture.md","chrome.desktopCapture.chooseDesktopMedia()","targetTab","url","\"tabs\"","chrome.userScripts","isUserScriptsAvailable()","chrome.userScripts.*","chrome.storage","runtime.onInstalled","\"update\"","runtime.onUserScriptMessage","ScriptSource","js","code"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/chrome-extensions/SKILL.md"},{"id":"ext-api-calling","cat":"chrome-extensions","title":"Calling External APIs from Extensions","kind":"overview","desc":"Ordinarily, fetch requests made by extensions follow normal CORS rules.","ucCat":"","chars":2188,"codes":4,"sections":["Permissions","Where to Make API Calls","Error Handling Pattern","API Keys","Service Worker Considerations"],"baselines":[],"tokens":["curl","or","as the value for the","<all_urls>","chrome.storage.local","chrome.identity","chrome.offscreen","chrome.alarms"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/chrome-extensions/references/extensions/api-calling.md"},{"id":"ext-auth-identity","cat":"chrome-extensions","title":"Authentication with chrome.identity","kind":"overview","desc":"\"client_id\": \"YOUR_CLIENT_ID.apps.googleusercontent.com\",","ucCat":"","chars":4030,"codes":8,"sections":["Setup","Getting an OAuth Token","Fetching User Profile","Sign Out","Error Handling","Setting Up Google Cloud Console","Non-Google OAuth (launchWebAuthFlow)"],"baselines":[],"tokens":["client_id","\"key\"","chrome://extensions",".crx","key"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/chrome-extensions/references/extensions/auth-identity.md"},{"id":"ext-content-scripts","cat":"chrome-extensions","title":"Content Scripts & DOM Manipulation","kind":"overview","desc":"// Requires \"scripting\" permission and host access","ucCat":"","chars":3496,"codes":5,"sections":["Two Ways to Inject","Isolated World","Message Passing from Content Scripts","DOM Manipulation Best Practices","`run_at` Timing"],"baselines":[],"tokens":["activeTab","window","requestAnimationFrame","scheduler.yield()","MutationObserver","myext-highlight","chrome.runtime.onMessage","TreeWalker","document.createNodeIterator","innerHTML","run_at","document_start","document_idle","document_end"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/chrome-extensions/references/extensions/content-scripts.md"},{"id":"ext-context-menus","cat":"chrome-extensions","title":"Context Menus","kind":"overview","desc":"Create in the service worker, typically in `onInstalled` (menus persist, but re-creating is idempotent):","ucCat":"","chars":1844,"codes":5,"sections":["Setup","Creating Menus","Handling Clicks","Context Types","Submenus","Dynamic Updates"],"baselines":[],"tokens":["onInstalled","all","page","frame","selection","link","editable","image","video","audio","launcher","browser_action","action","tab"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/chrome-extensions/references/extensions/context-menus.md"},{"id":"ext-csp-sandbox","cat":"chrome-extensions","title":"CSP & Sandboxed Code Execution","kind":"overview","desc":"Chrome Extensions enforce a strict Content Security Policy that cannot be relaxed for extension","ucCat":"","chars":4786,"codes":9,"sections":["Extension CSP Restrictions","HTML Best Practices","Executing User Code (Code Playground Pattern)","CSP for Remote Resources"],"baselines":[],"tokens":["eval()","new Function()","setTimeout(\"string\")","<script>","onclick=\"...\"","onload=\"...\"","javascript:","popup.js","postMessage","iframe.contentDocument","iframe.contentWindow.document"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/chrome-extensions/references/extensions/csp-sandbox.md"},{"id":"ext-declarative-net-request","cat":"chrome-extensions","title":"Declarative Net Request (Content Filtering)","kind":"overview","desc":"\"permissions\": [\"declarativeNetRequest\"],","ucCat":"","chars":2794,"codes":5,"sections":["Setup","Rule Format","Dynamic Rules (runtime)","Tracking Blocked Requests","Limits"],"baselines":[],"tokens":["\"declarativeNetRequestFeedback\"","onRuleMatchedDebug","rules/rules.json","id","priority","action.type","\"block\"","\"redirect\"","\"allow\"","\"modifyHeaders\"","\"allowAllRequests\"","\"upgradeScheme\"","condition.urlFilter","condition.resourceTypes","\"doubleclick.net\"","*://*.tracking.com/*","main_frame","sub_frame","stylesheet","script","image","font","object","xmlhttprequest","ping","csp_report","media","websocket","webtransport","webbundle","other","declarativeNetRequestFeedback","webRequest","webNavigation"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/chrome-extensions/references/extensions/declarative-net-request.md"},{"id":"ext-devtools","cat":"chrome-extensions","title":"DevTools Panels","kind":"overview","desc":"\"devtools_page\": \"devtools/devtools.html\"","ucCat":"","chars":2875,"codes":6,"sections":["Setup","Creating a Panel","Panel Content","Accessing DevTools APIs","Communication Architecture","Important Notes"],"baselines":[],"tokens":["devtools/devtools.html","devtools/devtools.js","devtools/panel/panel.html","chrome.runtime.sendMessage","chrome.devtools.*","chrome.devtools.inspectedWindow.eval()"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/chrome-extensions/references/extensions/devtools.md"},{"id":"ext-icons","cat":"chrome-extensions","title":"Generating Extension Icons","kind":"overview","desc":"If generating real icon files is impractical, omit `icons` and `default_icon` from manifest.json entirely. Chrome uses a default puzzle-piece icon. This is always better than referencing files that don't exist.","ucCat":"","chars":2755,"codes":4,"sections":["Quick: Omit icons","Generate with Python (Pillow)","Generate with Node.js (canvas)","Generate with pure SVG (no dependencies)","Manifest reference"],"baselines":[],"tokens":["icons","default_icon"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/chrome-extensions/references/extensions/icons.md"},{"id":"ext-media-capture","cat":"chrome-extensions","title":"Media Capture (Tab & Desktop)","kind":"overview","desc":"Prefer `tabCapture` when you only need the current tab — it requires no user chooser dialog and","ucCat":"","chars":4779,"codes":6,"sections":["Choosing the Right API","Tab Capture","Desktop Capture","State Locking — Prevent Double-Start Errors","Saving Recordings"],"baselines":[],"tokens":["chrome.tabCapture.getMediaStreamId()","chrome.desktopCapture.chooseDesktopMedia()","tabCapture","\"tabs\"","desktopCapture","getUserMedia()","chooseDesktopMedia","targetTab","url","\"Cannot capture a tab with an active stream\"","chrome.storage.session","chrome.offscreen.createDocument","chrome.downloads","references/extensions/message-passing.md"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/chrome-extensions/references/extensions/media-capture.md"},{"id":"ext-message-passing","cat":"chrome-extensions","title":"Message Passing","kind":"overview","desc":"chrome.runtime.sendMessage({ type: 'LOG', data: 'hello' });","ucCat":"","chars":4188,"codes":8,"sections":["Basic patterns","Content script ↔ service worker","Service worker → content script (targeted)","Long-lived connections (ports)","Common mistakes"],"baselines":[],"tokens":["sendResponse","return true","tabs.onUpdated"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/chrome-extensions/references/extensions/message-passing.md"},{"id":"ext-omnibox","cat":"chrome-extensions","title":"Omnibox Integration","kind":"overview","desc":"User types `wiki` + Space in the address bar to activate.","ucCat":"","chars":1813,"codes":5,"sections":["Setup","Providing Suggestions","Handling Selection","Description Formatting","Default Suggestion","Required host_permissions"],"baselines":[],"tokens":["wiki","<url>text</url>","<match>text</match>","<dim>text</dim>"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/chrome-extensions/references/extensions/omnibox.md"},{"id":"ext-permissions","cat":"chrome-extensions","title":"Permissions","kind":"overview","desc":"These are separate manifest keys — don't conflate them:","ucCat":"","chars":4607,"codes":6,"sections":["`permissions` vs `host_permissions`","`tab.url` requires the `tabs` permission","`activeTab` only works on direct user gestures — not from side panels","`chrome.permissions.request()` needs a user gesture — the gesture survives one `sendMessage` hop, but not an `await` after that","Checking and removing permissions"],"baselines":[],"tokens":["permissions","host_permissions","tabs","storage","scripting","desktopCapture","fetch","chrome.scripting.executeScript","<all_urls>","tab.url","tab.title","undefined","references/extensions/tab-management.md","activeTab","\"tab\"","commands","references/extensions/side-panel.md","chrome.permissions.request()","sendMessage","await","chrome.runtime.sendMessage","onMessage"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/chrome-extensions/references/extensions/permissions.md"},{"id":"ext-popup-ui","cat":"chrome-extensions","title":"Popup UI","kind":"overview","desc":"body { width: 350px; min-height: 200px; padding: 16px; font-family: system-ui; }","ucCat":"","chars":2372,"codes":6,"sections":["Setup","Key Constraints","Popup HTML Template","Persistence","Communicating with Service Worker","Dynamic Popup vs No Popup"],"baselines":[],"tokens":["addEventListener","chrome.storage","localStorage","default_popup","chrome.action.onClicked"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/chrome-extensions/references/extensions/popup-ui.md"},{"id":"ext-prompt-api","cat":"chrome-extensions","title":"Chrome Prompt API (LanguageModel) — Extension-Specific Notes","kind":"overview","desc":"The `LanguageModel` API (Prompt API) works in all extension contexts — service worker, popup,","ucCat":"","chars":3815,"codes":6,"sections":["Deprecated namespace","Extension-only: `LanguageModel.params()`","Complete extension example: page summarizer"],"baselines":[],"tokens":["LanguageModel","modern-web-guidance","LanguageModel.params()","tabs","host_permissions","activeTab"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/chrome-extensions/references/extensions/prompt-api.md"},{"id":"ext-service-worker","cat":"chrome-extensions","title":"Service Worker Lifetime & State Management","kind":"overview","desc":"Chrome terminates extension service workers after ~30 seconds of inactivity. Unlike Manifest V2","ucCat":"","chars":4557,"codes":7,"sections":["The Core Problem","Rules","Storage Tier Selection","Pattern: State Read-on-Demand","Pattern: Alarms Instead of Timers","Pattern: One-Time Initialization","Pattern: Keeping the SW Alive (When Necessary)","Pattern: Event Registration","Date-Based Resets"],"baselines":[],"tokens":["chrome.storage.sync","chrome.storage.local","chrome.storage.session"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/chrome-extensions/references/extensions/service-worker.md"},{"id":"ext-side-panel","cat":"chrome-extensions","title":"Side Panel","kind":"overview","desc":"\"default_path\": \"sidepanel/sidepanel.html\"","ucCat":"","chars":4460,"codes":9,"sections":["Setup","Opening the Side Panel — REQUIRED","Setting Panel Per-Tab","Communication with Side Panel","Side Panel vs Popup","Important Notes"],"baselines":[],"tokens":["default_popup","chrome.action.onClicked","setPanelBehavior","onClicked","openPanelOnActionClick","openPanelOnActionIconClick","chrome.runtime.sendMessage","chrome.runtime.onMessage","chrome.scripting.executeScript","scripting","activeTab","tabs","host_permissions"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/chrome-extensions/references/extensions/side-panel.md"},{"id":"ext-storage","cat":"chrome-extensions","title":"Chrome Storage API","kind":"overview","desc":"await chrome.storage.local.set({ key: 'value', count: 42, items: [1,2,3] });","ucCat":"","chars":1963,"codes":2,"sections":["Storage Areas","Basic Operations","Change Listener (Works Across All Contexts)","storage.sync Quotas","storage.session Notes","Why Not localStorage?"],"baselines":[],"tokens":["chrome.storage.local","chrome.storage.sync","chrome.storage.session","\"storage\"","QUOTA_BYTES_PER_ITEM","MAX_ITEMS","QUOTA_BYTES","MAX_WRITE_OPERATIONS_PER_HOUR","MAX_WRITE_OPERATIONS_PER_MINUTE","localStorage","chrome.storage"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/chrome-extensions/references/extensions/storage.md"},{"id":"ext-tab-management","cat":"chrome-extensions","title":"Tab Management & Groups","kind":"overview","desc":"Note: `tabs` permission gives access to `url`, `title`, `favIconUrl` on Tab objects.","ucCat":"","chars":3748,"codes":8,"sections":["Permissions","Querying Tabs","Tab Operations","Tab Groups","Grouping by Domain","Events","Windows"],"baselines":[],"tokens":["tabs","url","title","favIconUrl","chrome.tabs","chrome.windows",".query()","chrome.tabs.query()","chrome.windows.query()","getAll","getLastFocused","getCurrent","get(windowId)","create","update","remove"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/chrome-extensions/references/extensions/tab-management.md"},{"id":"ext-user-scripts","cat":"chrome-extensions","title":"User Scripts API","kind":"overview","desc":"The `chrome.userScripts` API lets extensions run arbitrary code provided by the user at","ucCat":"","chars":9354,"codes":11,"sections":["Manifest","User Enablement — CRITICAL","Execution Worlds","Registering Scripts (Persistent)","Persistence: Restore on Extension Update","One-Off Injection (Chrome 135+)","Messaging from User Scripts","`configureWorld()` — CSP and Messaging","Complete Script Manager Pattern","Key Differences from Content Scripts"],"baselines":[],"tokens":["chrome.userScripts","chrome.scripting","chrome.scripting.executeScript","\"userScripts\"","host_permissions","chrome://extensions","ExecutionWorld.USER_SCRIPT","ExecutionWorld.MAIN","USER_SCRIPT","MAIN","worldId","register()","update()","getScripts()","unregister()","chrome.storage","execute()","chrome.runtime","chrome.runtime.onUserScriptConnect","runtime.onConnect","configureWorld()","runtime.sendMessage","runtime.onUserScriptMessage","configureWorld"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/chrome-extensions/references/extensions/user-scripts.md"},{"id":"ext-chromewebstore-template","cat":"chrome-extensions","title":"CHROMEWEBSTORE.md Template","kind":"overview","desc":"Copy this template into the project root as `CHROMEWEBSTORE.md` and fill in each section.","ucCat":"","chars":5731,"codes":1,"sections":["Store Listing","Graphics & Assets","Permissions Justification","Privacy & Data Use","Privacy Policy","Distribution","Developer Info","Version History","Review Notes"],"baselines":[],"tokens":["CHROMEWEBSTORE.md","[REQUIRED]","[RECOMMENDED]"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/chrome-extensions/references/webstore/chromewebstore-template.md"},{"id":"ext-privacy-policy","cat":"chrome-extensions","title":"Privacy Policy Guidance","kind":"overview","desc":"A privacy policy URL is required if your extension:","ucCat":"","chars":4225,"codes":2,"sections":["When is a Privacy Policy Required?","Where to Host It","What to Include","What Data We Collect","How Data Is Stored","How Data Is Used","Third-Party Services","Data Sharing","Data Retention and Deletion","Changes to This Policy","Contact","Common Mistakes"],"baselines":[],"tokens":["identity","cookies","webRequest","browsingData","history","bookmarks","topSites","<all_urls>","privacy.md","docs/","/privacy","chrome.storage.sync","fetch()"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/chrome-extensions/references/webstore/privacy-policy.md"},{"id":"ext-review-checklist","cat":"chrome-extensions","title":"Pre-Publish Review Checklist","kind":"overview","desc":"Run through this checklist before every submission to the Chrome Web Store. Each item","ucCat":"","chars":6984,"codes":1,"sections":["Manifest & Package","Permissions","Store Listing Content","Graphics","Privacy & Compliance","Functionality","Updates (for existing extensions)","Packaging Script"],"baselines":[],"tokens":["name",".git/","node_modules/",".env","*.map","CHROMEWEBSTORE.md","README.md",".DS_Store","thumbs.db",".cws-ignore","<all_urls>","*://*.example.com/*","activeTab","chrome.storage.sync"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/chrome-extensions/references/webstore/review-checklist.md"},{"id":"ext-store-listing","cat":"chrome-extensions","title":"Store Listing Tips & Common Rejections","kind":"overview","desc":"This appears in search results and category pages. It's your elevator pitch. Rules:","ucCat":"","chars":7991,"codes":1,"sections":["Writing Effective Descriptions","Common Rejection Reasons","After Rejection","Review Timeline"],"baselines":[],"tokens":["MutationObserver","IntersectionObserver","Service Worker","Shadow DOM","IndexedDB","WebSockets","chrome.storage","declarativeNetRequest","chrome.scripting","offscreen document","<all_urls>","tabs","activeTab","eval()","new Function()","fetch()","XMLHttpRequest","chrome.storage.sync"],"url":"https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/chrome-extensions/references/webstore/store-listing.md"}]}