# ComponentSpacingValues

Artifact: [androidx.xr.glimmer:glimmer](https://developer.android.com/jetpack/androidx/releases/xr-glimmer) [View Source](https://cs.android.com/search?q=file:androidx/xr/glimmer/ComponentSpacingValues.kt+class:androidx.xr.glimmer.ComponentSpacingValues) Added in [1.0.0-alpha22](https://developer.android.com/jetpack/androidx/releases/xr-glimmer#1.0.0-alpha22)


```
class ComponentSpacingValues
```

<br />

*** ** * ** ***

A set of named component spacing values for `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/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 |
|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/ComponentSpacingValues#ComponentSpacingValues(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)( extraSmall: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, small: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, medium: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, large: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, extraLarge: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp )` |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/ComponentSpacingValues` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/ComponentSpacingValues#copy(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)(extraSmall: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, small: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, medium: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, large: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, extraLarge: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp)` Returns a copy of this `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/ComponentSpacingValues`, optionally overriding some of the values. |
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/ComponentSpacingValues#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/ComponentSpacingValues#hashCode()()` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/ComponentSpacingValues#toString()()` |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/ComponentSpacingValues#extraLarge()` The extra large spacing, used to separate distinct content blocks. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/ComponentSpacingValues#extraSmall()` The extra small spacing, typically used for very tight visual coupling. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/ComponentSpacingValues#large()` The large spacing, used for main structural padding or looser component grouping. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/ComponentSpacingValues#medium()` The medium spacing, typically used as the standard default padding. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/ComponentSpacingValues#small()` The small spacing, typically used for close relationships within components. |

## Public constructors

### ComponentSpacingValues

Added in [1.0.0-alpha22](https://developer.android.com/jetpack/androidx/releases/xr-glimmer#1.0.0-alpha22)

```
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-alpha22](https://developer.android.com/jetpack/androidx/releases/xr-glimmer#1.0.0-alpha22)

```
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 `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/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 extraLarge: Dp
```

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 extraSmall: Dp
```

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 large: Dp
```

The large spacing, used for main structural padding or looser component grouping. Example: The primary edge padding inside a `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/ListItem.composable#ListItem(androidx.compose.ui.Modifier,kotlin.Function0,kotlin.Function0,kotlin.Function0,androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.foundation.layout.PaddingValues,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Function0)` or a large `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Button.composable#Button(kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.xr.glimmer.ButtonSize,kotlin.Function0,kotlin.Function0,androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.foundation.layout.PaddingValues,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Function1)`.

### medium

```
val medium: Dp
```

The medium spacing, typically used as the standard default padding. Example: The internal padding for a `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Card.composable#Card(androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.Function0,kotlin.Function0,kotlin.Function0,kotlin.Function0,androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.foundation.layout.PaddingValues,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Function0)`, or the spacing between related components.

### small

```
val small: Dp
```

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.