AdaptiveTokens

data class AdaptiveTokens(val screenPadding: Dp, val itemSpacing: Dp, val sectionSpacing: Dp, val toolbarHeight: Dp, val gridColumns: Int, val overscanPadding: Dp, val focusScale: Float, val title: TextUnit, val sectionTitle: TextUnit, val body: TextUnit, val caption: TextUnit)

The subset of DesignTokens that should breathe with the surface. Everything else — shapes, elevation, motion and the a11y-constant Size.minTouch — deliberately stays static in DesignTokens: a 48dp touch target is 48dp on every device, and corner radius is brand identity, not a function of viewport width.

To extend this per component, follow the Material FooDefaults convention rather than growing this class: object PosterDefaults { fun width(f: FormFactor, w: WindowType): Dp = ... }. This class holds only values that more than one component reads.

Constructors

Link copied to clipboard
constructor(screenPadding: Dp, itemSpacing: Dp, sectionSpacing: Dp, toolbarHeight: Dp, gridColumns: Int, overscanPadding: Dp, focusScale: Float, title: TextUnit, sectionTitle: TextUnit, body: TextUnit, caption: TextUnit)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Scale applied to a focused item so D-pad focus is visible from across a room. 1f wherever focus is not the primary input model — on touch surfaces a growing card is just noise.

Link copied to clipboard

Sensible column count for a LazyVerticalGrid of cards on this surface.

Link copied to clipboard
Link copied to clipboard

Outer margin a television may physically clip. Zero on every non-TV surface. Content inset by screenPadding is already safe; this is for full-bleed surfaces (hero images, edge-to-edge video) that need to know where the unsafe band ends before placing text or controls in it.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard