> Documentation index: https://developer.android.com/reference/llms.txt

# LightPosition

Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui.md.txt) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/lighting/Light.kt+class:androidx.compose.ui.lighting.LightPosition) Added in [1.14.0-alpha01](https://developer.android.com/jetpack/androidx/releases/compose-ui.md.txt#1.14.0-alpha01) Common/All
- Cmn

  ```
  abstract class LightPosition
  ```
Known direct subclasses [LightPosition.Anchored](https://developer.android.com/reference/kotlin/androidx/compose/ui/lighting/LightPosition.Anchored.md.txt), [LightPosition.Global](https://developer.android.com/reference/kotlin/androidx/compose/ui/lighting/LightPosition.Global.md.txt), [LightPosition.Local](https://developer.android.com/reference/kotlin/androidx/compose/ui/lighting/LightPosition.Local.md.txt)

|---|---|
| `LightPosition.Anchored` | A position measured from the composable that `state` is attached to with `lightAnchor`. |
| `LightPosition.Global` | A position measured from the top-left corner of the root of the composition that hosts the lit composable, the same space as positionInRoot. |
| `LightPosition.Local` | A position measured from the top-left corner of the composable being lit. |

*** ** * ** ***

Where a `Light` sits, and the coordinate space that position is measured in.

All three variants resolve to a point in the lit composable's own space; they differ only in what `offset` is measured from. Use `Local` for a light that belongs to the composable it lights, `Global` for one placed against the root composable, and `Anchored` for one that should follow another composable.

| See also |
|---|---|
| `Light` |   |

## Summary

| ### Nested types |
|---|
| `class LightPosition.Anchored : LightPosition` A position measured from the composable that `state` is attached to with `lightAnchor`. |
| `class LightPosition.Global : LightPosition` A position measured from the top-left corner of the root of the composition that hosts the lit composable, the same space as positionInRoot. |
| `class LightPosition.Local : LightPosition` A position measured from the top-left corner of the composable being lit. |

| ### Public properties |
|---|---|---|
| `abstract DpOffset` | `offset` Position of the light within the coordinate space this describes, with `x` increasing to the right and `y` increasing downwards. | Cmn |

## Public properties

### offset

Cmn

```
abstract val offset: DpOffset
```

Position of the light within the coordinate space this describes, with `x` increasing to the right and `y` increasing downwards.