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


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


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

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


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


Sets both the width and height of an element, in `Dp`.





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


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

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


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


Sets both width and height of an element from a resource.





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


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

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


```kotlin
public fun GlanceModifier.size(width: Dp, height: Dp): GlanceModifier
```


Sets both the width and height of an element, in `Dp`.





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


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

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


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


Sets both the width and height of an element from resources.