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


<a id='references'></a>


<h2 id="width-width">width</h2>

<div class='sourceset sourceset-android'>Android</div>


```kotlin
public fun GlanceModifier.width(width: Dp): GlanceModifier
```


Sets the absolute width of an element, in `Dp`.





<hr class="docs-overload-divider">


<h2 id="width-width-2">width</h2>

<div class='sourceset sourceset-android'>Android</div>


```kotlin
public fun GlanceModifier.width(@DimenRes width: Int): GlanceModifier
```


Set the width of a view from the value of a resource.