Overlays
Popover
Floating content next to its trigger. label gives it an accessible name.
import { Popover } from "@percentsa/ui";Examples
Code
export function PopoverExample() {
const t = useT();
return (
<Popover label={t("Share options", "خيارات المشاركة")} trigger={<Button variant="secondary">{t("Share", "مشاركة")}</Button>}>
<Stack gap={3}>
<Text size="sm">{t("Anyone with the link can view.", "يمكن لمن لديه الرابط العرض.")}</Text>
<Input readOnly dir="ltr" defaultValue="https://percent.sa/p/masar" aria-label={t("Link", "الرابط")} />
</Stack>
</Popover>
);
}