Reference index

Components

Popover

Popover on Base UI: ink on paper, 1px ink rule, no shadow, radius or arrow.

Preview

Install

bash

npx shadcn add @eloquent/popover

Usage

tsx

import { Button } from "@/components/ui/button";
import {
  Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger,
} from "@/components/ui/popover";

<Popover>
  <PopoverTrigger render={<Button variant="outline" />}>Image size</PopoverTrigger>
  <PopoverContent align="start">
    <PopoverHeader>
      <PopoverTitle>Dimensions</PopoverTitle>
      <PopoverDescription>Set the size of the lead image.</PopoverDescription>
    </PopoverHeader>
  </PopoverContent>
</Popover>

Use render to make another component the trigger (Base UI's form of upstream's asChild).

States

Side: right
With close
Disabled trigger
StateTreatment
OpenPaper popup, 1px ink rule, opacity fade (none under reduced motion)
Focus2px ink outline, 2px offset
Disabled triggerThe trigger's own disabled treatment; it does not open

Keyboard

KeyAction
Tab / Shift+TabMove focus to the trigger; inside the open popup, move between its controls
Enter / SpaceOpen or close the popover from the trigger
EscClose; focus returns to the trigger

Vietnamese

Ink adaptation

Upstream shadcn's shadow, radius and arrow are removed. The popup is ink on paper with a 1px ink rule and no other decoration; the title is Playfair 900 and the description Source Serif. Fades use opacity only. Built on Base UI Popover.