React

Float

The Float component is used to place elements fixed at a specific position.

Props

Prop

Type

as?React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined
placement"bottom-end" | "bottom-start" | "top-end" | "top-start" | "bottom-center" | "top-center" | "middle-center" | "middle-end" | "middle-start"
zIndex?number | (string & {}) | undefined

Examples

Offset X

You can adjust position in the left-right direction using the offsetX property.

In start and middle, adjustment is to the right; in end, adjustment is to the left.

Offset Y

You can adjust position in the top-bottom direction using the offsetY property.

In top and middle, adjustment is downward; in bottom, adjustment is upward.

Table of contents