---
title: "BorderStroke"
description: "Create [BorderStroke] class with width and [Color]"
type: "function"
---

<div class='type'>Function</div>


<a id='references'></a>
<div class='sourceset sourceset-common'>Common</div>


```kotlin
fun BorderStroke(width: Dp, color: Color) = BorderStroke(width, SolidColor(color))
```


Create `BorderStroke` class with width and `Color`

#### Parameters

| | |
| --- | --- |
| width | width of the border in `Dp`. Use `Dp.Hairline` for one-pixel border. |
| color | color to paint the border with |




