Set the point anchored content grows from.
Pick an origin below and open it.
How it works#
That point of the content sits on the same point of the trigger, and stays still while the rest grows away from it. With bottom-right, the two bottom-right corners line up and the content grows up and to the left.
<Eclosion.Root origin="bottom-right">{/* ... */}</Eclosion.Root>It's center by default.
Near the viewport edge#
Content stays on screen. If it would overflow, it lines up the trigger's other edge when that fits, and otherwise moves just far enough to stay 8px from the edge.
Placement#
origin only applies to anchored content, which is the default. It rests on top of its trigger, follows it as it moves, and stays usable alongside the page. Set modal to opt in to focus trapping, an inert page and scroll lock.
placement="centered" puts the content in the middle of the viewport, and is modal unless you set modal={false}. It ignores origin and always grows from its center.
<Eclosion.Root placement="centered">{/* ... */}</Eclosion.Root>