<div class='type'>Compose Modifier</div>

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


<h2 id="preferredframerate-framerate">preferredFrameRate</h2>

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


```kotlin
fun Modifier.preferredFrameRate(@FloatRange(from = 0.0, to = 360.0) frameRate: Float) =
    this.graphicsLayer().frameRate(frameRate)
```


Set a requested frame rate on Composable

You can set the preferred frame rate (frames per second) for a Composable using a non-negative
number. This API should only be used when a specific frame rate is needed for your Composable.
For example, 24 or 30 for video play.

If multiple frame rates are requested, they will be aggregated to determine a feasible frame
rate.

If you no longer want this modifier to influence the frame rate, clear the preference by setting
it to 0.

Keep in mind that the preferred frame rate affects the frame rate for the next frame, so use this
method carefully. It's important to note that the preference is valid as long as the Composable
is drawn.

#### Parameters

| | |
| --- | --- |
| frameRate | The preferred frame rate the content should be rendered at. Default value is 0. |






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


<h2 id="preferredframerate-frameratecategory">preferredFrameRate</h2>

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


```kotlin
fun Modifier.preferredFrameRate(frameRateCategory: FrameRateCategory) =
    this.graphicsLayer().frameRate(frameRateCategory.value)
```


Set a requested frame rate on Composable

You can set the preferred frame rate (frames per second) for a Composable using a frame rate
category see: `FrameRateCategory`.

For increased frame rates, please consider using FrameRateCategory.High.

Keep in mind that the preferred frame rate affects the frame rate for the next frame, so use this
method carefully. It's important to note that the preference is valid as long as the Composable
is drawn.

#### Parameters

| | |
| --- | --- |
| frameRateCategory | The preferred frame rate category the content should be rendered at. |