@neynar/ui
Version:
React UI component library built on shadcn/ui and Tailwind CSS
41 lines (31 loc) • 1.01 kB
Markdown
# AlertDialogPortal
**Type**: component
Portal component for rendering dialog outside normal DOM tree Renders the alert dialog content into a portal, typically at the end of the document body. This ensures the dialog appears above other content and is properly accessible. Usually not used directly - AlertDialogContent includes this automatically.
## JSX Usage
```jsx
import { AlertDialogPortal } from '@neynar/ui';
<AlertDialogPortal
forceMount={true}
container={value}
/>
```
## Component Props
### forceMount
- **Type**: `boolean`
- **Required**: No
- **Description**: Force mount the component even when dialog is closed
### container
- **Type**: `HTMLElement`
- **Required**: No
- **Description**: Container element to portal into (defaults to document.body)
## Examples
```tsx
// Custom portal container
<AlertDialogPortal container={customContainer}>
<AlertDialogOverlay />
<AlertDialogPrimitive.Content>
// content
</AlertDialogPrimitive.Content>
</AlertDialogPortal>
```
/