# AppearanceScope

Artifact: [androidx.compose.foundation:foundation](https://developer.android.com/jetpack/androidx/releases/compose-foundation) [View Source](https://cs.android.com/search?q=file:androidx/compose/foundation/style/Appearance.kt+class:androidx.compose.foundation.style.AppearanceScope) Added in [1.13.0-rc01](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.13.0-rc01) Common/All
- Cmn

  ```
  @ExperimentalFoundationStyleApi
  class AppearanceScope
  ```

*** ** * ** ***

The scope of the `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/appearance.modifier#(androidx.compose.ui.Modifier).appearance(kotlin.Function1)` in the `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/appearance.modifier#(androidx.compose.ui.Modifier).appearance(kotlin.Function1)` modifier.

## Summary

| ### Public constructors |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/AppearanceScope#AppearanceScope()()` | Cmn |

| ### Public properties |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/Fill` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/AppearanceScope#background()` Fills the background of the component. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/Fill` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/AppearanceScope#border()` Sets how the border is filled around the component. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/AppearanceScope#borderWidth()` Sets the width of the border around the component. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/Shadows` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/AppearanceScope#dropShadow()` Applies a drop shadow effect directly to the component, often used for text or specific graphics. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/Fill` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/AppearanceScope#foreground()` Fills the foreground color of the component. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/Shadows` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/AppearanceScope#innerShadow()` Applies an inner shadow effect to the component. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/AppearanceScope#shape()` Defines the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape` to use for shape background rendering (`https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/AppearanceScope#background()`), foreground rendering (`https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/AppearanceScope#foreground()`) and border rendering (`https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/AppearanceScope#border()`). | Cmn |

## Public constructors

### AppearanceScope

Cmn Added in [1.13.0-rc01](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.13.0-rc01)

```
AppearanceScope()
```

## Public properties

### background

Cmn Added in [1.13.0-rc01](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.13.0-rc01)

```
var background: Fill
```

Fills the background of the component. If a `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/AppearanceScope#shape()` is set, the background will fill that shape. The default shape is `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/package-summary#RectangleShape()`.

The default value is `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/Fill.None` which will not fill the background.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/Fill` |   |

### border

Cmn Added in [1.13.0-rc01](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.13.0-rc01)

```
var border: Fill
```

Sets how the border is filled around the component. The border is drawn on top of the background. This method only sets the fill; width must be by `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/AppearanceScope#borderWidth()`. Both must be set for a border to be drawn. The border's presence and appearance do not affect the component's layout size.

The Default value is `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/Fill.None` which doesn't draw a border.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/Fill` |   |
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/AppearanceScope#borderWidth()` |   |

### borderWidth

Cmn

```
var borderWidth: Dp
```

Sets the width of the border around the component. The border is drawn on top of the background and the padded content. The border's width does not contribute to the component's layout size (width/height); it is rendered within the component's bounds This method only sets the width; color or brush must be set separately.

Specifying a `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp#Unspecified()` value will remove the border.

Specifying a `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp#Hairline()` or 0.dp value will create 1 pixel border regardless of density.

The default value is `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp#Unspecified()`.

### dropShadow

Cmn Added in [1.13.0-rc01](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.13.0-rc01)

```
var dropShadow: Shadows
```

Applies a drop shadow effect directly to the component, often used for text or specific graphics. This is distinct from `shadowElevation` which is specific to platform elevation shadows. Te border and overall layout size are not affected by this shadow.

Multiple shadows can be applied, using `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/Shadows.Compound`, and will be drawn together.

If `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/AppearanceScope#shape()` is set, the shadow will be applied to the shape's bounds.

The default value is `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/Shadows.None` which doesn't draw a shadow.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/Shadows` |   |
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/AppearanceScope#innerShadow()` |   |
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/AppearanceScope#shape()` |   |

### foreground

Cmn Added in [1.13.0-rc01](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.13.0-rc01)

```
var foreground: Fill
```

Fills the foreground color of the component. This can be used to overlay a color on top of the component's content. It is important that this brush be partially transparent (e.g. alpha less than 1.0) or it will obscure the content. If a `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/AppearanceScope#shape()` is set, the foreground will fill that shape.

The default value is `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/Fill.None` which will not fill the foreground.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/Fill` |   |

### innerShadow

Cmn Added in [1.13.0-rc01](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.13.0-rc01)

```
var innerShadow: Shadows
```

Applies an inner shadow effect to the component. This shadow is drawn inside the bounds of the component.The border and overall layout size are not affected by this shadow.

Multiple shadows can be applied, using `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/Shadows.Compound`, and will be drawn together.

If `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/AppearanceScope#shape()` is set, the shadow will be applied to the shape's bounds.

The default value is `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/Shadows.None` which doesn't draw a shadow.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/Shadows` |   |

### shape

Cmn Added in [1.13.0-rc01](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.13.0-rc01)

```
var shape: Shape
```

Defines the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape` to use for shape background rendering (`https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/AppearanceScope#background()`), foreground rendering (`https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/AppearanceScope#foreground()`) and border rendering (`https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/AppearanceScope#border()`).

If `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/AppearanceScope#shape()` is not specified then a `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/package-summary#RectangleShape()` is used.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape` |   |
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/AppearanceScope#background()` |   |
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/AppearanceScope#border()` |   |
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/AppearanceScope#foreground()` |   |