shadcn-vue/apps/www/src/content/docs/components/popover.md
2023-08-30 17:43:30 +08:00

926 B

title description source primitive
Popover Displays rich content in a portal, triggered by a button. https://github.com/radix-vue/shadcn-vue/tree/main/apps/www/src/lib/registry/default/ui/popover https://www.radix-vue.com/components/popover.html

<<< ../../../lib/registry/default/examples/PopoverDemo.vue

Installation

npx shadcn-vue@latest add popover
  1. Install radix-vue:
npm install radix-vue
  1. Copy and paste the component source files linked at the top of this page into your project.

Usage

<script setup lang="ts">
import {
  Popover,
  PopoverContent,
  PopoverTrigger,
} from '@/lib/registry/default/ui/popover'
</script>

<template>
  <Popover>
    <PopoverTrigger>
      Open popover
    </PopoverTrigger>
    <PopoverContent />
  </Popover>
</template>