Next.js
Set up Tabler in Next.js and build a first working page.
Next.js renders on the server first. That's good for performance, but browser-only code needs some care. You can import Tabler CSS globally, while tabler.min.js must load on the client. This guide shows an App Router pattern that handles both.
You'll install @tabler/core, add its CSS to your global stylesheet, mount a small client component for Tabler JavaScript, and render a first page with a Tabler card.
Setup
Install Tabler package
Install @tabler/core with your preferred package manager:
npm install @tabler/coreyarn add @tabler/corepnpm install @tabler/corebun install @tabler/coreYou can also use CDN files when you need a quick setup:
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@tabler/[email protected]/dist/css/tabler.min.css" integrity="sha384-MwEqmM8WBfwWX5LiVzgcxav7Srl1u+b/gBJPodcWJTvwWJ9c7bLJXWhyiWtEqXkQ" crossorigin="anonymous" />
<script src="https://cdn.jsdelivr.net/npm/@tabler/[email protected]/dist/js/tabler.min.js" integrity="sha384-CKrlmuNx52figWamK99uxnpR2acAc72jno6l+yhg0UTAcW+glcS7QsJ1lEApFaY/" crossorigin="anonymous"></script>Import styles
Import Tabler CSS once in your global stylesheet (app/globals.css):
@import '@tabler/core/dist/css/tabler.min.css';To change Sass variables, compile the SCSS sources instead:
@use '@tabler/core/scss/tabler';Sass alone writes custom properties without the --tblr- prefix, so you also need a PostCSS step. Customize with Sass shows how to set it up.
Import and initialize JavaScript
Tabler JavaScript is required for interactive components such as dropdowns, modals, and tooltips.
tabler.min.js accesses document, so load it only on the client. If you import it during SSR, Next.js throws document is not defined.
Use a client component and dynamic import (app/tabler-scripts.jsx):
'use client'
import { useEffect } from 'react'
export function TablerScripts() {
useEffect(() => {
import('@tabler/core/dist/js/tabler.min.js')
}, [])
return null
}Minimal working example
Load styles globally and mount client-only scripts in the app layout.
app/layout.jsx:
import './globals.css'
import { TablerScripts } from './tabler-scripts'
export default function RootLayout({ children }) {
return (
<html lang="en">
<body>
<TablerScripts />
{children}
</body>
</html>
)
}app/page.jsx:
export default function Page() {
return (
<div className="page">
<div className="page-wrapper">
<div className="container-xl py-4">
<div className="card">
<div className="card-body">
<h3 className="card-title">Next.js + Tabler</h3>
<p className="text-secondary mb-0">Your Tabler setup is working.</p>
</div>
</div>
</div>
</div>
</div>
)
}Run the app:
npm run devOpen the local Next.js URL and confirm the card is styled with Tabler.
Next steps
- Continue with Customize to adjust styles and build setup.
- Explore Layout to choose page structures.
- Browse Components to add UI building blocks.

