Note: This guide is for Remix. For React Router, see the React Router guide.
app/components/ui folder.app/components folder.app/lib folder contains all the utility functions. We have a utils.ts where we define the cn helper.app/tailwind.css file contains the global CSS./** @type {import('@remix-run/dev').AppConfig} */
export default {
...
tailwind: true,
postcss: true,
...
};
import styles from "./tailwind.css?url"
export const links: LinksFunction = () => [
{ rel: "stylesheet", href: styles },
...(cssBundleHref ? [{ rel: "stylesheet", href: cssBundleHref }] : []),
]
The command above will add the
Button component to your project. You can then import it like this: