--- title: SvelteKit order: 10 summary: Set up Tabler in SvelteKit and build a first working page. description: Install Tabler in SvelteKit - import the CSS, load the JS on the client, and render a minimal page layout with a Tabler card. icon: brand-svelte seoDescription: Install `@tabler/core`, import CSS and optional JS in SvelteKit, and render a minimal page layout with a Tabler card. --- import TabsPackage from '@components/TabsPackage.astro' import CdnImportPackage from '@components/CdnImportPackage.astro' import Steps from '@components/Steps.astro' Svelte components compile to plain HTML and Tabler provides the styling on top. The only SvelteKit-specific step is loading `tabler.min.js` on the client, since pages render on the server first. You will install `@tabler/core`, import its CSS globally, load the JavaScript from `onMount`, and render a first page with a Tabler card. ## Setup ### Install Tabler package Install `@tabler/core` with your preferred package manager: You can also use CDN files when you need a quick setup: ### Import styles Import Tabler CSS once in your global stylesheet (`src/app.css`): ```scss @import '@tabler/core/dist/css/tabler.min.css'; ``` For full theme customization, import SCSS sources instead: ```scss @use '@tabler/core/scss/tabler'; ``` ### Import and initialize JavaScript Tabler JavaScript is required for interactive components such as dropdowns, modals, and tooltips. In SvelteKit, load `tabler.min.js` only on the client. `onMount` runs only in the browser, so a dynamic import inside it never executes during SSR: ```html ``` SvelteKit-specific note: `tabler.min.js` accesses `document`, so importing it during SSR can cause `document is not defined`. ### Minimal working example Create a simple `src/routes/+layout.svelte` that loads global styles and Tabler JavaScript: ```html ``` Then add a minimal page in `src/routes/+page.svelte`: ```html

SvelteKit + Tabler

Your Tabler setup is working.

``` Run the app: ```shell npm run dev ``` Open the local SvelteKit URL and confirm the card is styled with Tabler. ### Next steps - Continue with [Customize](/ui/getting-started/customize) to adjust styles and build setup. - Explore [Layout](/ui/layout) to choose page structures. - Browse [Components](/ui/components) to add UI building blocks.