WindowWidthSizeClass

Defines width-based size classes to support responsive layouts in the OUDS design system.

This classification is inspired by Material 3's window size class but introduces a custom EXTRA_COMPACT category for more granular control on the smallest screens. The theme uses this class to select the appropriate token values (e.g., typography, spacing) based on the available window width.

The active class is determined by the WindowWidthSizeClass.compute function.

See also

Entries

Link copied to clipboard

Represents the narrowest screens, for devices with a width less than 390.dp.

Link copied to clipboard

Represents typical phone screen widths, for devices with a width between 390.dp and 600.dp. Most phones in portrait.

Link copied to clipboard

Represents typical tablet screen widths in portrait, for devices with a width between 600.dp and 840.dp.

Link copied to clipboard

Represents typical tablet screen widths in landscape or large tablet displays, for devices with a width between 840.dp and 1600.dp.

Link copied to clipboard

Represents the largest screens like desktop displays, for devices with a width greater than or equal to 1600.dp.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.