---
title: "FloatingToolbarState"
description: "A state object that can be hoisted to control and observe the floating toolbar state. The state
is read and updated by a [FloatingToolbarScrollBehavior] implementation.

In most cases, this state will be created via [rememberFloatingToolbarState]."
type: "interface"
---

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


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

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



```kotlin
@ExperimentalMaterial3ExpressiveApi
interface FloatingToolbarState
```


A state object that can be hoisted to control and observe the floating toolbar state. The state
is read and updated by a `FloatingToolbarScrollBehavior` implementation.

In most cases, this state will be created via `rememberFloatingToolbarState`.


## Properties

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


```kotlin
var offsetLimit: Float
```


The floating toolbar's offset limit in pixels, which represents the limit that a floating
toolbar is allowed to collapse to.

Use this limit to coerce the `offset` value when it's updated.



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


```kotlin
var offset: Float
```


The floating toolbar's current offset in pixels. This offset is applied to the fixed size of
the toolbar to control the displayed size when content is being scrolled.

Updates to the `offset` value are coerced between zero and `offsetLimit`.



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


```kotlin
var contentOffset: Float
```


The total offset of the content scrolled under the floating toolbar.

This value is updated by a `FloatingToolbarScrollBehavior` whenever a nested scroll
connection consumes scroll events. A common implementation would update the value to be the
sum of all `NestedScrollConnection.onPostScroll` `consumed` values.




