Floating
A container that sticks to an edge of its nearest container (sticky, fixed or absolute), on the floating elevation: logical sides, safe-area insets, no viewport units. Put UI SDK controls inside, such as a Toolbar.
Example
- Index the docs
- Backfill usage
- Write the migration
- Design the schema
- Review the auth flow
3 selected
floating-demo.tsxCopy code
Installation
Copy code
Usage
ImportCopy code
API reference
Floating
| Prop | Type | Default |
|---|---|---|
side | "top" | "bottom" | "start" | "end" | "bottom" |
align | "start" | "center" | "end" | "center" |
strategy | "sticky" | "fixed" | "absolute" | "sticky" |
Also takes <div> attributes.
FloatingContent
Takes <div> attributes.
Other exports
type FloatingAligntype FloatingPropstype FloatingSidetype FloatingStrategyAccessibility
- Lets clicks through around its content; only the bar catches them.
- Safe-area insets are respected.
Agent actions
Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.