# Shapes

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/Shapes.kt+class:androidx.xr.glimmer.Shapes) Added in [1.0.0-alpha22](https://developer.android.com/jetpack/androidx/releases/xr-glimmer#1.0.0-alpha22)


```
class Shapes
```

<br />

*** ** * ** ***

Jetpack Compose Glimmer surfaces can use different shapes. Shapes contains different levels of roundedness for different components.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/surface.composable#(androidx.compose.ui.Modifier).surface(kotlin.Boolean,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.xr.glimmer.SurfaceDepthEffect,androidx.compose.foundation.interaction.InteractionSource)` |   |

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Shapes#Shapes(androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Shape)(small: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape, medium: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape, large: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape)` |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Shapes` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Shapes#copy(androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Shape)(small: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape, medium: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape, large: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape)` Returns a copy of this Shapes, 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/Shapes#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/Shapes#hashCode()()` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Shapes#toString()()` |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Shapes#large()` a shape with 4 fully rounded corners. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Shapes#medium()` a shape with 4 same-sized corners whose size are bigger than `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Shapes#small()` and smaller than `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Shapes#large()`. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Shapes#small()` a shape with 4 same-sized corners whose size are smaller than `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Shapes#medium()`. |

## Public constructors

### Shapes

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

```
Shapes(
    small: Shape = RoundedCornerShape(24.dp),
    medium: Shape = RoundedCornerShape(36.dp),
    large: Shape = CircleShape
)
```

## Public functions

### copy

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

```
fun copy(
    small: Shape = this.small,
    medium: Shape = this.medium,
    large: Shape = this.large
): Shapes
```

Returns a copy of this Shapes, 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

### large

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

```
val large: Shape
```

a shape with 4 fully rounded corners. This shape is used for components such as buttons.

### medium

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

```
val medium: Shape
```

a shape with 4 same-sized corners whose size are bigger than `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Shapes#small()` and smaller than `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Shapes#large()`. This is the most commonly used shape, and is used in `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/surface.composable#(androidx.compose.ui.Modifier).surface(kotlin.Boolean,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.xr.glimmer.SurfaceDepthEffect,androidx.compose.foundation.interaction.InteractionSource)` by default.

### small

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

```
val small: Shape
```

a shape with 4 same-sized corners whose size are smaller than `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Shapes#medium()`. This shape is used for components such as cards.