# Portal

> Renders into `container` (default `document.body`); nothing on the server or before hydration.

Source: https://ui.jcsoftdev.com/docs/components/portal

Renders into `container` (default `document.body`); nothing on the server or before hydration.

## Import

```ts
import { Portal } from "@jcsoftdev/ui/primitives";
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `children` | `ReactNode` |  |  |
| `container` | `HTMLElement \| null` |  |  |

`*` marks a required prop.

## Source

`packages/ui/src/primitives/portal.tsx`
