popover
bejamas-ui/popoverFreeComponent
bejamas/ui publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by bejamas/ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://ui.bejamas.com/r/popover.jsonSource
1---2// Generated from bejamas-juno style registry. Do not edit packages/ui/src/components/popover/Popover.astro directly.3/**4 * @component Popover5 * @title Popover6 * @description A floating panel that appears on trigger click, useful for displaying rich content like forms or additional information.7 *8 * @preview9 * <Popover>10 * <PopoverTrigger variant="outline">Open popover</PopoverTrigger>11 * <PopoverContent>12 * <PopoverHeader>13 * <PopoverTitle>Dimensions</PopoverTitle>14 * <PopoverDescription>Set the dimensions for the layer.</PopoverDescription>15 * </PopoverHeader>16 * <div class="grid gap-2">17 * <div class="grid grid-cols-3 items-center gap-4">18 * <Label>Width</Label>19 * <Input class="col-span-2 h-8" value="100%" />20 * </div>21 * <div class="grid grid-cols-3 items-center gap-4">22 * <Label>Height</Label>23 * <Input class="col-span-2 h-8" value="25px" />24 * </div>25 * </div>26 * </PopoverContent>27 * </Popover>28 *29 * @usage30 *31 * ```astro nocollapse32 * ---33 * import { Popover, PopoverTrigger, PopoverContent, PopoverHeader, PopoverTitle, PopoverDescription } from '@bejamas/ui/components/popover';34 * ---35 *36 * <Popover>37 * <PopoverTrigger variant="outline">Open</PopoverTrigger>38 * <PopoverContent>39 * <PopoverHeader>40 * <PopoverTitle>Title</PopoverTitle>41 * <PopoverDescription>Description text.</PopoverDescription>42 * </PopoverHeader>43 * <p>Popover body content.</p>44 * </PopoverContent>45 * </Popover>46 * ```47 *48 * @api49 *50 * ### Events51 *52 * The popover emits custom events that you can listen to:53 *54 * | Event | Detail | Description |55 * |-------|--------|-------------|56 * | `popover:change` | `{ open: boolean }` | Fired when the popover opens or closes |57 *58 * ```astro nocollapse console59 * <Popover id="my-popover">60 * <PopoverTrigger variant="outline">Open</PopoverTrigger>61 * <PopoverContent>62 * <p>Content</p>63 * </PopoverContent>64 * </Popover>65 * ```66 *67 * ```js nocollapse68 * const popover = document.getElementById('my-popover');69 *70 * popover.addEventListener('popover:change', (e) => {71 * console.log('Is open:', e.detail.open);72 * });73 * ```74 *75 * ### Programmatic Control76 *77 * You can control the popover programmatically by dispatching a `popover:set` event:78 *79 * ```js nocollapse80 * const popover = document.getElementById('my-popover');81 *82 * // Open the popover83// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from bejamas/ui
All 41 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| accordionaccordion | bejamas/ui | Components | Free | 1 dep · 5 files | |
| alertalert | bejamas/ui | Components | Free | no deps · 4 files | |
| avataravatar | bejamas/ui | Components | Free | no deps · 7 files | |
| badgebadge | bejamas/ui | Components | Free | no deps · 2 files | |
| breadcrumbbreadcrumb | bejamas/ui | Components | Free | no deps · 5 files | |
| buttonbutton | bejamas/ui | Components | Free | no deps · 2 files | |
| button-groupbutton-group | bejamas/ui | Components | Free | no deps · 4 files | |
| cardcard | bejamas/ui | Components | Free | no deps · 10 files |
