A Next.js 13 template for building apps with Radix UI and Tailwind CSS.
- Radix UI Primitives
- Tailwind CSS
- Fonts with
@next/font
- Icons from Lucide
- Dark mode with
next-themes
- Automatic import sorting with
@ianvs/prettier-plugin-sort-imports
- Class merging with
taiwind-merge
- Animation with
tailwindcss-animate
- Conditional classes with
clsx
- Variants with
class-variance-authority
- Automatic class sorting with
eslint-plugin-tailwindcss
The starter comes with @ianvs/prettier-plugin-sort-imports
for automatically sort your imports.
import Link from "next/link";
import * as React from "react";
import { buttonVariants } from "@/components/ui/button";
import { siteConfig } from "@/config/site";
import "@/styles/globals.css";
import { twMerge } from "tailwind-merge";
import { cn } from "@/lib/utils";
import { NavItem } from "@/types/nav";
import * as React from "react";
// React is always first.
import Link from "next/link";
// Followed by next modules.
import { twMerge } from "tailwind-merge";
// Followed by third-party modules
// Space
import "@/styles/globals.css";
// styles
import { NavItem } from "@/types/nav";
// types
import { siteConfig } from "@/config/site";
// config
import { cn } from "@/lib/utils";
// lib
import { buttonVariants } from "@/components/ui/button";
// components
The cn
util handles conditional classes and class merging.
cn("px-2 bg-slate-100 py-2 bg-slate-200");
// Outputs `p-2 bg-slate-200`
Licensed under the MIT license.