3
React
Usage
import { Box, Float } from '@zalify-ui/react'
<Box position="relative">
<Float placement="top-end">
<span>Badge</span>
</Float>
</Box>
Props
| Prop | Default | Type |
|---|---|---|
offsetX | ConditionalValue<Token<'spacing'> | CSSProperties['left']>The horizontal offset of the element. | |
offsetY | ConditionalValue<Token<'spacing'> | CSSProperties['top']>The vertical offset of the element. | |
offset | ConditionalValue<Token<'spacing'> | CSSProperties['top']>The offset of the element in both directions. | |
placement | 'bottom-end' | 'bottom-start' | 'top-end' | 'top-start' | 'bottom-center' | 'top-center' | 'middle-center' | 'middle-end' | 'middle-start'The placement of the floating element. |