An open source design system that's fully customizable and agent ready
TypeScript
/* Copyright (c) Meta Platforms, Inc. and affiliates. */
/* The preview window fills all space between the dialog header and footer.
Large desktop dialogs naturally reach 1440×900; constrained desktop and
mobile dialogs use every available pixel without forcing an aspect ratio. */
.frame {
position: relative;
width: 100%;
height: 100%;
margin-inline: auto;
flex: 1 1 auto;
min-height: 0;
/* The frame is the single scroll container. Fill-mode templates fit the
frame exactly and scroll their own content region internally (no frame
scroll); auto-height templates that are taller than the frame scroll
here instead of pushing the document. */
overflow: auto;
border-radius: var(--radius-container);
border: var(--border-width) solid var(--color-border);
/* Templates are content-only (no AppShell) and render transparent, so
the preview host supplies the page background. Use the surface color so
templates read as a real themed app surface. */
background-color: var(--color-background-surface);
}
/* Templates render inline in the docsite, so 100dvh would otherwise resolve
against the browser viewport instead of this shorter preview window. Give
every page a definite preview-sized containing block, then normalize its
first rendered root. The scoped !important declarations intentionally beat
template inline height/min-height values such as 100dvh. Overflow remains
on `.frame`, so genuinely taller auto-height pages are still reachable. */
.viewport {
width: 100%;
height: 100%;
min-height: 0;
}
.viewport > :first-child {
height: 100% !important;
min-height: 100% !important;
}