🔥 Meet Our New Project: t0ggles - Your Ultimate Project Management Tool! 🔥

Konsta UI & Next.js

Let's see how to use Konsta UI React components with Next.js.

Create Next.js Project

First, create a Next.js project using create-next-app

Install Tailwind CSS

We can follow official Tailwind CSS with Next.js Guide

Install Konsta UI

Now in created Next.js project, we need to install Konsta UI:

npm i konsta

And in your tailwind.config.js file we should extend config with Konsta UI's config:

// import konstaConfig config
const konstaConfig = require('konsta/config');

// wrap config with konstaConfig config
module.exports = konstaConfig({
  content: [
  darkMode: 'media', // or 'class'
  theme: {
    extend: {},
  variants: {
    extend: {},
  plugins: [],

App Component

Now we need to setup main App component so we can set some global parameters (like theme).

We need to wrap whole app with App in the pages/_app.js:

import { App } from 'konsta/react';
import '../styles/globals.css';

function MyApp({ Component, pageProps }) {
  return (
    // Wrap our app with App component
    <App theme="ios">
      <Component {...pageProps} />

export default MyApp;

Example Page

Now when everything is set up, we can use Konsta UI React components in our Next.js pages.

For example, let's open pages/index.js and change it to the following:

// Konsta UI components
import {
} from 'konsta/react';

export default function Home() {
  return (
      <Navbar title="My App" />

      <Block strong>
          Here is your Next.js & Konsta UI app. Let's see what we have here.
        <ListItem href="/about/" title="About" />
        <ListItem href="/form/" title="Form" />

      <Block strong className="flex space-x-4">
        <Button>Button 1</Button>
        <Button>Button 2</Button>

As a result we should see the following page:

Code licensed under MIT.
2022 © Konsta UI by nolimits4web.