Popover

A surface anchored to its trigger that flips and shifts to stay in the window.

Features

  • Anchored to its trigger; flips and shifts to stay in the window.

Use it for

  • Details on demand.

Installation

  1. Get runets.
    git clone https://github.com/ziyam-khan/runets
  2. Copy these files into your project, keeping their folders.
  3. Install what they use.
    pnpm add react @base-ui/react motion lucide-react
  4. Load the styles once. Bring your own base tokens, or use runets’ default theme.
    import 'runets/styles/theme.css'
    import 'runets/styles/kit.css'

Usage

import { Popover } from 'runets'

<Popover trigger="Details" title="Pre-registered">Fixed before any result was seen.</Popover>

API

PropTypeWhat it does
triggerReactNodeButton content.
titlestringHeading.

Accessibility

Source

The code is in src/kit/overlays.tsx in runets, MIT licensed.