ventana-demo.mov
A fun unstyled spring motion driven popover component for React
Installation · Usage · Components · Acknowledgements · License
Ventana is a fun unstyled spring motion driven popover component for React. Built using Radix's Popover Primitive and inspired by the following video.
Installing Ventana with npm:
npm install @ventana/react
Installing Ventana with yarn:
yarn add @ventana/react
Installing Ventana with pnpm:
pnpm add @ventana/react
To implement Ventana in your application, use the following:
import { Ventana } from '@ventana/react';
function Component() {
return (
<Ventana.Root>
<Ventana.Trigger>Open</Ventana.Trigger>
<Ventana.Portal>
<Ventana.Content>
<Ventana.Tab />
<Ventana.Item>
<h1>Item 1</h1>
</Ventana.Item>
<Ventana.Item>
<h1>Item 2</h1>
</Ventana.Item>
<Ventana.Item>
<h1>Item 3</h1>
</Ventana.Item>
</Ventana.Content>
</Ventana.Portal>
</Ventana.Root>
);
}
The majority of the components in Ventana are wrappers around the Radix Popover Primitive and inherit the same props. The API documentation for the Radix Popover Primitive can be found here.
Styling is extremely easy with Ventana as it is unstyled by default. Simply pass in your own styles to the components and you're good to go!
The Root
component is the root component of the Ventana component and contains all parts of the Popover and also provides context to its children.
The button that toggles the popover. By default, the Popover.Content will position itself against the trigger.
Portals the content of the popover to the body of the document.
The content of the popover. By default, the Popover.Content will position itself against the trigger.
A visual indicator of the selected item in the Popover.
Props TBD
An item in the Popover.
Props TBD