ui icon indicating copy to clipboard operation
ui copied to clipboard

Can it be used with Astro?

Open moisesmmreis opened this issue 2 years ago • 9 comments

Can it be used with Astro and Tailwind?

moisesmmreis avatar Apr 06 '23 15:04 moisesmmreis

Yes. It works with Astro. I'll see if I can find an example for you.

shadcn avatar Apr 07 '23 07:04 shadcn

+1

Kaeson avatar Apr 11 '23 07:04 Kaeson

I was playing with getting a very minimal example up just to get it to build. Hope this will get you started.

https://github.com/talves/astro-shadcn-ui-template/tree/main

Note: Understand that it has to be a static build using vite.ssr.noExternal for radix-ui. The astro.config.mjs config reflects this setup.

talves avatar Apr 13 '23 23:04 talves

It works on astro through the react integration. So it actually works on react under astro but I don't think that it works on plain astro because the components require react. @shadcn what do you think? Do you plan on releasing a core version?

krankos avatar Apr 18 '23 14:04 krankos

This is a solution based on Radix UI which has a dependency on React. It's not meant to be used without React.

talves avatar Apr 18 '23 15:04 talves

Let me know if this is the wrong place to ask this. I'm having trouble with the Tooltip component. It works fine in development, but when I deploy to Vercel, the build fails.

I'm using Astro 2.3.1 and I've had no issues with the Dropdown, Command Bar, and Dialog components so far. Does anyone know if the problem is on my end or if it's an issue with Astro or the Tooltip component? Any help would be much appreciated!

Code

Screenshot 2023-04-26 at 12 09 51 AM

trevortylerlee avatar Apr 26 '23 07:04 trevortylerlee

Let me know if this is the wrong place to ask this. I'm having trouble with the Tooltip component. It works fine in development, but when I deploy to Vercel, the build fails.

I'm using Astro 2.3.1 and I've had no issues with the Dropdown, Command Bar, and Dialog components so far. Does anyone know if the problem is on my end or if it's an issue with Astro or the Tooltip component? Any help would be much appreciated!

Code

Screenshot 2023-04-26 at 12 09 51 AM

I am getting these same displayName undefined errors on build.

ziin avatar Apr 29 '23 18:04 ziin

@shadcn with the new CLI, do these steps still apply to Astro sites?

claughinghouse avatar Jun 24 '23 18:06 claughinghouse

I was playing with getting a very minimal example up just to get it to build. Hope this will get you started.

https://github.com/talves/astro-shadcn-ui-template/tree/main

Note: Understand that it has to be a static build using vite.ssr.noExternal for radix-ui. The astro.config.mjs config reflects this setup.

How do you use the buttonVariants?

claughinghouse avatar Jun 27 '23 00:06 claughinghouse

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.

shadcn avatar Jul 09 '24 23:07 shadcn