Hi everyone 👋 I have a question about using Relume Library in Astro. We are thinking about switching from Webflow to Astro and build the whole website there. I was trying to build the page using Relume's components... but they just don't work. If I use plain HTML + Tailwind it looks okay but looses everything else. If I try to use React, they just don't work. Does anyone have a solution here? 👁️
Hi Patryk, what error are you getting? Have you done the basic setup as described here https://react-docs.relume.io/getting-started/installation
Ensure you installed the packages npm i @relume_io/relume-ui @relume_io/relume-tailwind
Ensure you have tailwind setup correctly for your Astro project
Add React to Astro: npm run astro add react
Create Navigation.tsx in the components folder.
Paste the code for example Navbar 1 from Relume.
Go to index.astro.
Add at the top: import { Navbar1 } from '../components/Navigation';
Use the component: <Navbar1 client:load />
Great, thank you 🙌 The only thing that are not working now are button variants. Should I add them somewhere in the code?
If you want to use a variant on a Button you need to use the variant prop ie <Button variant="ghost" /> - Is that what you are doing?
I tried adding variant="primary" / ghost / secondary to the line on 2nd screen but it didn't work 🤔 Are these variants related to Tailwind? As I don't have them in the config. Sorry if I ask stupid questions here
Hey Patryk L., please check our docs for the button variants and sizes: https://react-docs.relume.io/elements/button If it’s still not working on your end, there may be something wrong in your codebase. If you can share your code, I’d be happy to take a look.