Popover

A sketchy-bordered floating panel anchored to a trigger, built on Radix Popover. The panel border draws in on open, same recipe as the Select menu.

<Popover roughness={1.5}>
  <PopoverTrigger asChild>
    <Button variant="outline">Open popover</Button>
  </PopoverTrigger>
  <PopoverContent>A sketchy floating panel.</PopoverContent>
</Popover>

CLI install

npx doodleui-react add popover

Usage

import { Popover, PopoverTrigger, PopoverContent, Button } from "doodleui-react";

<Popover>
  <PopoverTrigger asChild>
    <Button variant="outline">Open popover</Button>
  </PopoverTrigger>
  <PopoverContent>
    A sketchy floating panel anchored to its trigger.
  </PopoverContent>
</Popover>

Props

PropTypeDefaultNotes
open / onOpenChangeboolean / (open: boolean) => voiduncontrolledRadix controlled API.
animatebooleantrueDraw-in the panel border when the popover opens. Overrides DoodleUIProvider. Reduced motion disables this unless the provider set forceAnimate.
roughnessnumber1.5How wobbly the stroke is. 0 is almost geometric. 3+ is messy.
seednumberprovider / randomLocks the sketch. Omit to follow SketchSeedProvider (Shuffle) or a mount-time random seed.
sketchColorstring#1f1d1aStroke color. Also tints primary/accent fills where relevant.
classNamestringundefinedPassed through to the root element.
styleCSSPropertiesundefinedPassed through to the root element.