Nextjs-mdx-blog-theme: built with Next.js, MDX, and Tailwind CSS

  • By Alex Carpenter
  • Last update: Dec 26, 2022
  • Comments: 0

Deploy with Vercel


Running Locally

$ git clone
$ cd nextjs-mdx-blog-theme
$ npm install
$ npm run dev:watch


To organize Tailwind CSS light and dark styles on elements, we make use of cx utility as an array. The first string contains the base styles, the second string is for light mode styles, and lastly the third string is for dark mode styling.

import { cx } from '@/lib/utils'

    'p-4', // base styles
    'text-gray-900', // light mode styles
    'dark:text-gray-50'. // dark mode styles