Popover

Free · MIT

shadcn's popover (Radix) in Candor's theme.

Markdown

Preview

Install

With the Candor CLI

First time? Get started sets up the registry and theme. Or with shadcn directly: npx shadcn@latest add @candor/popover

Brings in: render-prop, utils · npm: radix-ui@^1.8.1

Usage

TSX · The example above
"use client"

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

export default function Example() {
  return (
    <Popover>
      <PopoverTrigger asChild>
        <Button variant="outline">What this touches</Button>
      </PopoverTrigger>
      <PopoverContent>
        <PopoverHeader>
          <PopoverTitle>checkout.timeout_ms</PopoverTitle>
          <PopoverDescription>Read by the Checkout API and the payments worker.</PopoverDescription>
        </PopoverHeader>
      </PopoverContent>
    </Popover>
  )
}

<Popover>

No props.

Also takes the props of React.ComponentProps<typeof PopoverPrimitive.Root>.

<PopoverTrigger>

No props.

Also takes the props of React.ComponentProps<typeof PopoverPrimitive.Trigger>RenderProp.

<PopoverContent>

No props.

Also takes the props of React.ComponentProps<typeof PopoverPrimitive.Content>.

<PopoverAnchor>

No props.

Also takes the props of React.ComponentProps<typeof PopoverPrimitive.Anchor>.

<PopoverHeader>

No props.

Also takes the props of React.ComponentProps<"div">.

<PopoverTitle>

No props.

Also takes the props of React.ComponentProps<"h2">.

<PopoverDescription>

No props.

Also takes the props of React.ComponentProps<"p">.