Remix

Step-by-Step configuration for Remix

Kickstart with our Remix Starter πŸš€
Everything is set up to use AlignUI!

Initialize a Remix Project

If you don’t already have a Remix project set up, you can follow the official Remix setup guide to create a new project quickly.

Make sure you have Tailwind CSS v4 installed

Follow these instructions if you don't have Tailwind CSS v4 installed in your project. You just need to have a globals.css file. Note: Tailwind CSS v4 doesn't require a config file by default.

Add AlignUI Styles

Run the following command in the root directory of your project.

terminal
npx @alignui/cli tailwind
Warning

This will overwrite your CSS file.

This command will prompt you to choose following options.

β”Œ  AlignUI Tailwind Setup
β”‚
β—‡ Which color would you like to use as primary color?
β”‚  ● Blue 
β”‚  β—‹ Purple
β”‚  β—‹ Orange
β”‚  β—‹ Sky
β”‚
β—‡ Which color would you like to use as neutral color?
β”‚  ● Gray 
β”‚  β—‹ Slate
β”‚
β—‡ Which color format would you like to use?
β”‚  ● oklch (Recommended for Tailwind v4.1) 
β”‚  β—‹ hex
β”‚  β—‹ rgb
β”‚  β—‹ hsl
β”‚
β—‡ Use a custom prefix for AlignUI classes? (Leave blank for none)
β”‚  undefined
β”‚
β—‡ Create tailwind.config file? (Optional in v4.1 - CSS-first configuration)
β”‚  ● No - Use CSS-only configuration (Recommended for v4.1) 
β”‚  β—‹ Yes - Create minimal config file
β”‚
β—‡ Where is your global CSS file?
β”‚  app/globals.css
β””

Note: The above code includes the complete AlignUI design system with colors, typography, shadows, animations, and dark mode support. You can also get this CSS content by running the CLI command.

That's all! Now you have all AlignUI tokens.

Add the required utils

  1. Go to cn page and setup the utility in your project.
  2. Go to tv page and setup the utility in your project.
  3. Go to recursiveCloneChildren page and setup the utility in your project.
  4. Go to Polymorphic page and setup the utility in your project.

Add the icon library

AlignUI uses Remix Icon.

terminal
npm install @remixicon/react

Setup Inter font

Include Inter font from Google Fonts:

/app/root.tsx
import type { LinksFunction } from '@remix-run/node';
 
export const links: LinksFunction = () => [
  { rel: 'preconnect', href: 'https://fonts.googleapis.com' },
  {
    rel: 'preconnect',
    href: 'https://fonts.gstatic.com',
    crossOrigin: 'anonymous',
  },
  {
    rel: 'stylesheet',
    href: 'https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap',
  },
];

Note for Tailwind CSS v4: Font configuration is handled via CSS variables in the @theme block, so no additional config file setup is needed.

Add Dark Mode (Optional)

All you need to do to enable dark mode in your app is add the dark class to your root element.

/app/root.tsx
export default function Layout({ children }) {
  return (
    <html lang='en' className='dark'>
      <body>{/* ... */}</body>
    </html>
  );
}

Note: With Tailwind CSS v4, dark mode classes are automatically included when using our @theme configuration.

I recommend next-themes package for an easy dark mode toggle in your app.

That's all!

Now you can start adding components to your app. You can begin by adding a button first.

Β© 2024 AlignUI Design System. All rights reserved.