# ModifiersBuilders.Border

# ModifiersBuilders.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/ModifiersBuilders.java+class:androidx.wear.protolayout.ModifiersBuilders.Border)  
Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Border "View this page in Java")

<br />

```
@RequiresSchemaVersion(major = 1, minor = 0)
class ModifiersBuilders.Border
```

<br />

*** ** * ** ***

A modifier to apply a border around an element.

## Summary

|                                                                                                                               ### Nested types                                                                                                                               |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `class `[ModifiersBuilders.Border.Builder](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Border.Builder) Builder for[Border](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Border) |

|                                                       ### Public functions                                                       |
|----------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [ColorBuilders.ColorProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.ColorProp)`?`   | [getColor](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Border#getColor())`()` Gets the color of the border.        |
| [DimensionBuilders.DpProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/DimensionBuilders.DpProp)`?` | [getWidth](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Border#getWidth())`()` Gets the width of the border, in DP. |
| [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)                                                | [toString](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Border#toString())`()`                                      |

## Public functions

### getColor

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)  

```
fun getColor(): ColorBuilders.ColorProp?
```

Gets the color of the border.

While this field is statically accessible from 1.0, it's only bindable since version 1.2 and renderers supporting version 1.2 will use the dynamic value (if set).  

### getWidth

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)  

```
fun getWidth(): DimensionBuilders.DpProp?
```

Gets the width of the border, in DP.  

### toString

```
fun toString(): String
```