Gathering detailed insights and metrics for tailwind-config-viewer
Gathering detailed insights and metrics for tailwind-config-viewer
Gathering detailed insights and metrics for tailwind-config-viewer
Gathering detailed insights and metrics for tailwind-config-viewer
@nuxtjs/tailwindcss
Tailwind CSS module for Nuxt
@adevinta/tailwind-config-viewer
View your Tailwind CSS config file...visually!
prettier-plugin-tailwindcss
A Prettier plugin for sorting Tailwind CSS classes.
astro-tailwind-config-viewer
Explore your Tailwind config visually directly in your browser while developing.
A local UI tool for visualizing your Tailwind CSS configuration file.
npm install tailwind-config-viewer
56.1
Supply Chain
95.9
Quality
76.1
Maintenance
100
Vulnerability
98.2
License
Module System
Unable to determine the module system for this package.
Min. Node Version
Typescript Support
Node Version
NPM Version
2,033 Stars
163 Commits
113 Forks
19 Watching
9 Branches
10 Contributors
Updated on 27 Nov 2024
Vue (62.86%)
JavaScript (35.93%)
HTML (1.11%)
CSS (0.1%)
Cumulative downloads
Total Downloads
Last day
-2.2%
49,255
Compared to previous day
Last week
0.4%
259,154
Compared to previous week
Last month
6.1%
1,141,233
Compared to previous month
Last year
84%
10,924,921
Compared to previous year
1
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
Run npx tailwind-config-viewer
from within the directory that contains your Tailwind configuration file.
npm i tailwind-config-viewer -g
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:
1"scripts": { 2 "tailwind-config-viewer": "tailwind-config-viewer -o" 3}
Run the tailwind-config-viewer
command from within the directory that contains your Tailwind configuration file.
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 |
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 |
You can declare a configViewer
property in your Tailwind configuration's theme object in order to customize certain aspects of the config viewer.
1module.exports = { 2 theme: { 3 // ...your Tailwind theme config 4 configViewer: { 5 // ... configViewer Options 6 } 7 } 8}
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:
1module.exports = { 2 theme: { 3 colors: { 4 black: 'var(--color-black)' 5 } 6 } 7}
In order for the config viewer to properly display this color, you need to provide a replacement for it:
1module.exports = { 2 theme: { 3 colors: { 4 black: 'var(--color-black)' 5 }, 6 configViewer: { 7 themeReplacements: { 8 'var(--color-black)': '#000000' 9 } 10 } 11 } 12}
You can replace any value in your theme for display in the config viewer by setting the corresponding valueToFind: valueToReplace
in the themeReplacements
object.
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.
1module.exports = { 2 theme: { 3 // ...your Tailwind theme config 4 configViewer: { 5 baseFontSize: 20 // default is 16 6 } 7 } 8}
You can change the default sentence used in the typography sections (Font Size, Letter Spacing etc.)
by setting the typographyExample
option:
1module.exports = { 2 theme: { 3 // ...your Tailwind theme config 4 configViewer: { 5 typographyExample: 'The quick brown fox jumps over the lazy dog.' 6 } 7 } 8}
You can add custom fonts to the config viewer that are used in your Tailwind config by passing in a font url as a string, or an array of font urls.
Notes
1module.exports = { 2 theme: { 3 // ...your Tailwind theme config 4 configViewer: { 5 // single font 6 fonts: "https://fonts.googleapis.com/css2?family=Open+Sans&display=swap" 7 // or multiple fonts 8 fonts: [ 9 "https://fonts.googleapis.com/css2?family=Open+Sans&display=swap", 10 "https://fonts.googleapis.com/css2?family=Roboto:wght@100;500&display=swap" // <- only 500 will be used 11 ] 12 } 13 ] 14 } 15 } 16}
Shift+Click
on the Tailwind class names to copy multiple to your clipboard at onceNo vulnerabilities found.
Reason
no binaries found in the repo
Reason
Found 4/30 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
license file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
52 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More