All Projects → rogden → Tailwind Config Viewer

rogden / Tailwind Config Viewer

A local UI tool for visualizing your Tailwind CSS configuration file.

Projects that are alternatives of or similar to Tailwind Config Viewer

Tailwind Starter Kit
Tailwind Starter Kit a beautiful extension for TailwindCSS, Free and Open Source
Stars: ✭ 4,434 (+611.72%)
Mutual labels:  tailwindcss
Statamic
Statamic 3: The New Site/App Package
Stars: ✭ 431 (-30.82%)
Mutual labels:  tailwindcss
Cleopatra
Admin Dashboard Template Built On Tailwind CSS
Stars: ✭ 521 (-16.37%)
Mutual labels:  tailwindcss
Windmill React Ui
🧩 The component library for fast and accessible development of gorgeous interfaces.
Stars: ✭ 373 (-40.13%)
Mutual labels:  tailwindcss
React Native Tailwindcss
A react-native style system based on TailwindCSS
Stars: ✭ 413 (-33.71%)
Mutual labels:  tailwindcss
Landing Page
Tailwind CSS Starter Template - Landing Page
Stars: ✭ 444 (-28.73%)
Mutual labels:  tailwindcss
Tailwindcolorshades
Color shades generator for TailwindCSS - https://javisperez.github.io/tailwindcolorshades
Stars: ✭ 345 (-44.62%)
Mutual labels:  tailwindcss
Awes Io
Awes.io // boilerplate based on Vue, Nuxt, TailwindCSS plus Laravel as a backend. 🤟
Stars: ✭ 599 (-3.85%)
Mutual labels:  tailwindcss
Tails
Tails is a (no-config) copy'n paste library of templates and components crafted using TailwindCSS
Stars: ✭ 416 (-33.23%)
Mutual labels:  tailwindcss
Merakiui
🚀 ☄️ Beautiful TailwindCSS components that support RTL languages.
Stars: ✭ 496 (-20.39%)
Mutual labels:  tailwindcss
Twin.macro
🦹‍♂️ Twin blends the magic of Tailwind with the flexibility of css-in-js (emotion, styled-components, stitches and goober) at build time.
Stars: ✭ 5,137 (+724.56%)
Mutual labels:  tailwindcss
Freek.dev
The sourcecode of freek.dev
Stars: ✭ 407 (-34.67%)
Mutual labels:  tailwindcss
Wd s
A starter theme from WebDevStudios.
Stars: ✭ 457 (-26.65%)
Mutual labels:  tailwindcss
Framework
HTML email development framework.
Stars: ✭ 359 (-42.38%)
Mutual labels:  tailwindcss
Design Tips
The “🔥 Design Tips” series, now in TailwindCSS
Stars: ✭ 545 (-12.52%)
Mutual labels:  tailwindcss
Tailwindcss Theming
Tailwind CSS plugin for client-side theming using CSS variables, with dark mode support
Stars: ✭ 349 (-43.98%)
Mutual labels:  tailwindcss
V Dashboard
Dashboard starter template built with Vue 3 and Tailwind CSS.
Stars: ✭ 438 (-29.7%)
Mutual labels:  tailwindcss
Tailwindo
🔌 Convert Bootstrap CSS code to Tailwind CSS code
Stars: ✭ 606 (-2.73%)
Mutual labels:  tailwindcss
Tailwindcss Figma Kit
Figma Kit for TailwindCSS
Stars: ✭ 577 (-7.38%)
Mutual labels:  tailwindcss
Awesome Tall Stack
A curated list of awesome things related to the TALL stack.
Stars: ✭ 465 (-25.36%)
Mutual labels:  tailwindcss

Tailwind Config Viewer

Screenshot of UI

Tailwind Config Viewer is a local UI tool for visualizing your Tailwind CSS configuration file. Keep it open during development to quickly reference custom Tailwind values/classes. Easily navigate between sections of the configuration and copy class names to your clipboard by clicking on them.

Demo using the default Tailwind config

Installation

NPX

Run npx tailwind-config-viewer from within the directory that contains your Tailwind configuration file.

Globally

npm i tailwind-config-viewer -g

Locally

npm i tailwind-config-viewer -D

When installing locally, you can add an entry into the package.json scripts field to run and open the viewer:

"scripts": {
  "tailwind-config-viewer": "tailwind-config-viewer -o"
}

Usage

Run the tailwind-config-viewer command from within the directory that contains your Tailwind configuration file.

Commands

serve (default)

The serve command is the default command. Running tailwind-config-viewer is the same as tailwind-config-viewer serve.

Options

Option Default Description
-p, --port 3000 The port to run the viewer on. If occupied it will use next available port.
-o, --open false Open the viewer in default browser
-c, --config tailwind.config.js Path to your Tailwind config file

export

Exports the viewer to a directory that can be uploaded to a static host. It accepts the output directory path as its sole argument.

tailwind-config-viewer export ./output-dir

If an output directory isn't specificied it will be output to tcv-build.

Options

Option Default Description
-c, --config tailwind.config.js Path to your Tailwind config file

Configuration

You can declare a configViewer property in your Tailwind configuration's theme object in order to customize certain aspects of the config viewer.

module.exports = {
  theme: {
    // ...your Tailwind theme config
    configViewer: {
      // ... configViewer Options
    }
  }
}

themeReplacements

In some instances you may want to replace values used in your Tailwind config when it is displayed in the config viewer. One scenario where this is necessary is when you are using CSS variables for your theme values:

module.exports = {
  theme: {
    colors: {
      black: 'var(--color-black)'
    }
  }
}

In order for the config viewer to properly display this color, you need to provide a replacement for it:

module.exports = {
  theme: {
    colors: {
      black: 'var(--color-black)'
    },
    configViewer: {
      themeReplacements: {
        'var(--color-black)': '#000000'
      }
    }
  }
}

You can replace any value in your theme for display in the config viewer by setting the corresponding valueToFind: valueToReplace in the themeReplacements object.

baseFontSize

The config viewer displays the pixel equivalent of any rem values. By default baseFontSize is set to 16 to mirror the default root element font size in most browsers. If you plan on using a different root font size in your project, you should set the value of baseFontSize to match.

module.exports = {
  theme: {
    // ...your Tailwind theme config
    configViewer: {
      baseFontSize: 20 // default is 16
    }
  }
}

typographyExample

You can change the default sentence used in the typography sections (Font Size, Letter Spacing etc.) by setting the typographyExample option:

module.exports = {
  theme: {
    // ...your Tailwind theme config
    configViewer: {
      typographyExample: 'The quick brown fox jumped over the lazy dog.'
    }
  }
}

Usage Tips

  • Shift+Click on the Tailwind class names to copy multiple to your clipboard at once

Roadmap

  • [x] Add static export
  • [x] Add Transition section
  • [x] Dark Mode toggle
  • [ ] Add support for loading custom fonts / font family section
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].