ValyroUI English version

Popover

Всплывающий контент. Бесплатно, MIT · Окна и уведомления › Подсказки и туры

Установка

npx valyro-cli@latest add popover
npx shadcn@latest add https://valyro.xyz/r/popover.json
npm install valyro-ui

import 'valyro-ui/styles.css';
import { Popover } from 'valyro-ui';

Пропсы

PropTypeDefault
triggerReactElementA single element (usually a button); it toggles the popover on click. Or Popover.Trigger in the children.
children *ReactNodeContent of the panel (a non-modal dialog); Tab past its end returns focus to the page after the trigger. In the compound form, a Popover.Trigger and a Popover.Content instead. The trigger names the dialog unless it gets an aria-label, or an aria-labelledby pointing at a heading inside.
openbooleanControlled open; use with onOpenChange.
defaultOpenbooleanfalseInitial open when uncontrolled.
onOpenChange(open: boolean) => voidCalled with the new open when it changes.
arrowbooleanfalseSmall pointer towards the trigger, where the theme draws one (--ui-popover-arrow). Glass popovers grow out of their trigger without one, like iOS 26: the panel's backdrop-filter makes it a backdrop root, so an arrow inside it can only blur the panel's own pixels and reads as a clear sliver.
placementPlacement'bottom'
offsetnumber
matchAnchorWidthboolean
closeOnOutsideboolean
closeOnEscapeboolean
insideRefsRefObject<Element | null>[]Extra elements treated as "inside" for outside-press detection. The anchor is included automatically.
surfacebooleanApply the shared .ui-floating material (default true).
animation'pop' | 'fade' | 'spring' | 'none'Enter/exit: pop (the theme's), fade, spring (springs out of the anchor's side) or none.

Составные части

Popover.Trigger (PopoverTrigger), Popover.Content (PopoverContent)

Похожие компоненты

  • Hover Card — Карточка при наведении
  • Tour — Онбординг-тур: подсветка элементов, шаги, прогресс и возобновление
  • Alert — Предупреждения
  • Toast — Всплывающие уведомления
  • Notification Center — Центр уведомлений
  • Loading Overlay — Экран загрузки
  • Dialog — Модальные окна
  • Confirm Dialog — Подтверждение действий
  • Drawer — Выдвижные панели
  • Bottom Sheet — Нижняя шторка в стиле iOS: точки остановки, свайп, режим «подглядывания»

Назад: Bottom Sheet · Далее: Hover Card · Весь раздел «Окна и уведомления»