UNPKG

@neynar/ui

Version:

React UI component library built on shadcn/ui and Tailwind CSS

47 lines (36 loc) 1.05 kB
# DialogPortal **Type**: component DialogPortal - Portal container for dialog content Renders dialog content in a React portal at the end of the document body. This ensures proper stacking context and prevents z-index issues. Rarely used directly - typically included automatically by DialogContent. ## JSX Usage ```jsx import { DialogPortal } from '@neynar/ui'; <DialogPortal forceMount={true} container={value} > {/* Your content here */} </DialogPortal> ``` ## Component Props ### forceMount - **Type**: `boolean` - **Required**: No - **Description**: No description available ### container - **Type**: `HTMLElement` - **Required**: No - **Description**: No description available ### children - **Type**: `React.ReactNode` - **Required**: No - **Description**: No description available ## Examples ```tsx // Custom portal container const [container, setContainer] = useState(null); <DialogPortal container={container}> <DialogOverlay /> <DialogContent>Portal content</DialogContent> </DialogPortal> <div ref={setContainer} /> ```