Component docs
Loading
import { Presence } from "@pixxl-tools/components";
// In Server Components:
import { Presence } from "@pixxl-tools/components/server";| Prop | Type | Default | Description |
|---|---|---|---|
present | boolean | — | — |
as | ElementType | — | Element to render. |
unmount | boolean | — | — |
presentboolean
asElementType
Element to render.
unmountboolean
Other props are passed to the root element (HTMLAttributes<HTMLElement>), including className, style, id and aria-* attributes.
const [open, setOpen] = useState(true);
<Presence present={open}>Content</Presence>