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
npm i @relume_io/relume-ui @relume_io/relume-tailwind
@Rob Austin Tailwind is working pretty well. What I am trying to achieve is creating the component called Navigation.astro and pasting Relume code. Then I hope it would work without any major changes to the code π Is that possible?
@Patryk Lasek
npm run astro add react
Navigation.tsx
in the components
folder.Navbar 1
from Relume.index.astro
.import { Navbar1 } from '../components/Navigation';
<navbar1>
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>
- 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 Lasek, 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.