Affix
Render react node inside portal at fixed position
Import
Source
Docs
Package
Affix component props
Name | Type | Description |
---|---|---|
portalProps | Omit<PortalProps, "children" | "target" | "withinPortal"> | Props to pass down to the portal when withinPortal is true |
position | { top?: string | number; left?: string | number; bottom?: string | number; right?: string | number; } | Affix position on screen, defaults to { bottom: 0, right: 0 } |
target | HTMLDivElement | Element where portal should be rendered, by default new div element is created and appended to document.body |
withinPortal | boolean | Determines whether component should be rendered within portal, defaults to true |
zIndex | ZIndex | Root element z-index property |