shadcn-ui / ui

Beautifully designed components that you can copy and paste into your apps. Accessible. Customizable. Open Source.
https://ui.shadcn.com
MIT License
69.71k stars 4.17k forks source link

HoverCardContent must be used within HoverCard #2585

Closed dragonjay-lyj closed 7 months ago

dragonjay-lyj commented 7 months ago

I copied the this example, and to attempt to the client:load doesn't work

Just like this:

import {
  HoverCard,
  HoverCardContent,
  HoverCardTrigger,
} from "@/components/ui/hover-card"

<HoverCard>
  <HoverCardTrigger client:load>Hover</HoverCardTrigger>
  <HoverCardContent>
    The React Framework – created and maintained by @vercel.
  </HoverCardContent>
</HoverCard>
image
shadcn commented 7 months ago

This issue has been automatically closed because it received no activity for a while. If you think it was closed by accident, please leave a comment. Thank you.

xeno commented 4 weeks ago

Did you ever resolve this? I'm running into this with Astro as well.

HduSy commented 1 week ago

+1

alniswar19 commented 2 days ago

I copied the this example, and to attempt to the client:load doesn't work

Just like this:

import {
  HoverCard,
  HoverCardContent,
  HoverCardTrigger,
} from "@/components/ui/hover-card"

<HoverCard>
  <HoverCardTrigger client:load>Hover</HoverCardTrigger>
  <HoverCardContent>
    The React Framework – created and maintained by @vercel.
  </HoverCardContent>
</HoverCard>
image

In most of shadcn component in astro, seems need to be wrapperd inside astro component, and call it using client:load