# BorderKt

Added in 1.3.0

*** ** * ** ***


```
public final class BorderKt
```

<br />

*** ** * ** ***

## Summary

| ### Public methods |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/modifiers/LayoutModifier` | `https://developer.android.com/reference/androidx/wear/protolayout/modifiers/BorderKt#(androidx.wear.protolayout.modifiers.LayoutModifier).border(kotlin.Float,androidx.wear.protolayout.types.LayoutColor)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/modifiers/LayoutModifier receiver, @https://developer.android.com/reference/androidx/annotation/Dimension(unit = 0) float width, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor color )` Adds a modifier to apply a border around an element. |

## Public methods

### border

Artifact: [androidx.wear.protolayout:protolayout](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/modifiers/Border.kt+function:border) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
public static final @NonNull LayoutModifier border(
    @NonNull LayoutModifier receiver,
    @Dimension(unit = 0) float width,
    @NonNull LayoutColor color
)
```

Adds a modifier to apply a border around an element.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/Dimension(unit = 0) float width` | The width of the border, in `DP`. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor color` | The color of the border. |