ComponentSpacingValues


public final 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(
    @NonNull Dp extraSmall,
    @NonNull Dp small,
    @NonNull Dp medium,
    @NonNull Dp large,
    @NonNull Dp extraLarge
)

Public methods

final @NonNull ComponentSpacingValues
copy(
    @NonNull Dp extraSmall,
    @NonNull Dp small,
    @NonNull Dp medium,
    @NonNull Dp large,
    @NonNull Dp extraLarge
)

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

boolean
equals(Object other)
final @NonNull Dp

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

final @NonNull Dp

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

final @NonNull Dp

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

final @NonNull Dp

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

final @NonNull Dp

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

int
@NonNull String

Public constructors

ComponentSpacingValues

Added in 1.0.0-alpha09
public ComponentSpacingValues(
    @NonNull Dp extraSmall,
    @NonNull Dp small,
    @NonNull Dp medium,
    @NonNull Dp large,
    @NonNull Dp extraLarge
)

Public methods

copy

Added in 1.0.0-alpha09
public final @NonNull ComponentSpacingValues copy(
    @NonNull Dp extraSmall,
    @NonNull Dp small,
    @NonNull Dp medium,
    @NonNull Dp large,
    @NonNull Dp extraLarge
)

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

equals

public boolean equals(Object other)

getExtraLarge

public final @NonNull Dp getExtraLarge()

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

getExtraSmall

public final @NonNull Dp getExtraSmall()

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.

getLarge

public final @NonNull Dp getLarge()

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

getMedium

public final @NonNull Dp getMedium()

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

getSmall

public final @NonNull Dp getSmall()

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.

hashCode

public int hashCode()

toString

public @NonNull String toString()