---
title: "dp"
description: "Create a [Dp] using an [Int]: val left = 10 val x = left.dp // -- or -- val y = 10.dp"
type: "property"
---

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


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

<div class='sourceset sourceset-common'>Common</div>


```kotlin
inline val Int.dp: Dp
```


Create a `Dp` using an `Int`: val left = 10 val x = left.dp // -- or -- val y = 10.dp



<div class='sourceset sourceset-common'>Common</div>


```kotlin
inline val Double.dp: Dp
```


Create a `Dp` using a `Double`: val left = 10.0 val x = left.dp // -- or -- val y = 10.0.dp



<div class='sourceset sourceset-common'>Common</div>


```kotlin
inline val Float.dp: Dp
```


Create a `Dp` using a `Float`: val left = 10f val x = left.dp // -- or -- val y = 10f.dp



