Docs · Using components
Vite, Remix and Astro
Furin only needs React 18 and a bundler that imports CSS. Here's what changes in Vite, Remix and Astro.
On this page
Vite
No configuration needed. Vite imports .css files out of the box, so installing and importing is enough:
import { DecipherText } from "furin-ui";
export default function App() {
return <DecipherText text="Hello from Vite" style={{ fontSize: 40 }} />;
}Vite's React + TypeScript templates already use "moduleResolution": "bundler", which TypeScript needs to find paths such as furin-ui/decipher-text.
Remix
Components import like in any React project and render on the server. If your Remix builds with Vite, nothing else is needed. With the classic compiler, if the server complains about an ESM package, add furin-ui to serverDependenciesToBundle:
module.exports = {
serverDependenciesToBundle: ["furin-ui"],
};Astro
Astro needs the React integration. Add it with its official command:
npx astro add reactUse the component inside an .astro file with a client:* directive. Without it Astro renders the HTML on the server and ships no JavaScript, so the component would look static. client:visible mounts it when it enters the viewport, which is best for heavy effects:
---
import { DecipherText } from "furin-ui";
---
<h1>
<DecipherText client:visible text="Hello from Astro" />
</h1>Other bundlers
webpack, Parcel, esbuild and Bun work the same way, as long as they can import .css files from node_modules. If yours can't, use shadcn or copy the files: the CSS stays in your project and your bundler processes it like any other (Installation).
Spot a mistake or something missing? Email us at contacto@furin.dev.