ComponentSpacingValues


class ComponentSpacingValues


A set of named component spacing values for GlimmerTheme.

These values are used to ensure consistent spacing across Jetpack Compose Glimmer components. This includes component paddings, spacing between components, and other spacing elements.

Summary

Public constructors

ComponentSpacingValues(
    extraSmall: Dp,
    small: Dp,
    medium: Dp,
    large: Dp,
    extraLarge: Dp
)

Public functions

ComponentSpacingValues
copy(extraSmall: Dp, small: Dp, medium: Dp, large: Dp, extraLarge: Dp)

Returns a copy of this ComponentSpacingValues, optionally overriding some of the values.

open operator Boolean
equals(other: Any?)
open Int
open String

Public properties

Dp

The extra large spacing, used to separate distinct content blocks.

Dp

The extra small spacing, typically used for very tight visual coupling.

Dp

The large spacing, used for main structural padding or looser component grouping.

Dp

The medium spacing, typically used as the standard default padding.

Dp

The small spacing, typically used for close relationships within components.

Public constructors

ComponentSpacingValues

Added in 1.0.0-alpha09
ComponentSpacingValues(
    extraSmall: Dp = 6.dp,
    small: Dp = 8.dp,
    medium: Dp = 12.dp,
    large: Dp = 16.dp,
    extraLarge: Dp = 20.dp
)

Public functions

copy

Added in 1.0.0-alpha09
fun copy(
    extraSmall: Dp = this.extraSmall,
    small: Dp = this.small,
    medium: Dp = this.medium,
    large: Dp = this.large,
    extraLarge: Dp = this.extraLarge
): ComponentSpacingValues

Returns a copy of this ComponentSpacingValues, optionally overriding some of the values.

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

extraLarge

val extraLargeDp

The extra large spacing, used to separate distinct content blocks. Example: The spacing between items in a scrolling list, or between independent components.

extraSmall

val extraSmallDp

The extra small spacing, typically used for very tight visual coupling. Example: The space between a leading icon and its adjacent text inside a chip or button.

large

val largeDp

The large spacing, used for main structural padding or looser component grouping. Example: The primary edge padding inside a ListItem or a large Button.

medium

val mediumDp

The medium spacing, typically used as the standard default padding. Example: The internal padding for a Card, or the spacing between related components.

small

val smallDp

The small spacing, typically used for close relationships within components. Example: The vertical space between a primary title and a secondary subtitle within a layout.