@microsoft/atlas-js
v5.1.1
Published
Scripts backing the Atlas Design System used by Microsoft's Developer Relations.
Readme
Atlas JS
JavaScript behaviors and lightweight web components for the Atlas Design System. Atlas prefers CSS-first patterns; this package exists for cases where CSS alone cannot meet accessibility requirements or where a lightweight web component is the right fit.
Install
npm i @microsoft/atlas-jsImport
Built JS (default entry, from dist/):
import '@microsoft/atlas-js';TypeScript source (for tree-shakeable named imports from src/): import { createLayoutState } from '@microsoft/atlas-js/src/index'
Notable behaviors
createLayoutState(inbehaviors/layout) — persists and restoreslayout-*classes on<html>across page loads, with optionaldocument.startViewTransitionsupport. See the Layout component docs for the inline-script pattern that restores classes before first paint, and the JSDoc insrc/for full API details.
