tailwindcss-debug-screens

3.0.1 • Public • Published

Tailwind CSS Debug Screens 📱

A Tailwind CSS component that shows the currently active screen (responsive breakpoint).

Demo

[!NOTE] Docs for Tailwind CSS v1, v2 & v3 can be found here.

Install

Requires Tailwind v4.0 or higher.

  1. Install the plugin:
npm install tailwindcss-debug-screens --save-dev
  1. Add the plugin to your main style.css file:
  @import "tailwindcss";
+ @plugin "tailwindcss-debug-screens";
  1. Add the class debug-screens to your <body> tag:
<body class="debug-screens">

Disable in production

Laravel

<body class="{{ app()->isLocal() ? 'debug-screens' : '' }}">

Craft CMS

<body class="{{ devMode ? 'debug-screens' : '' }}">

Customization

You can customize this plugin by using the following options when registering the plugin.

@import "tailwindcss";
@plugin "tailwindcss-debug-screens" {
  className: 'debug-screens';
  position: 'bottom, left';
  prefix: 'screen: ';
}

Readme

Keywords

none

Package Sidebar

Install

npm i tailwindcss-debug-screens

Weekly Downloads

15,162

Version

3.0.1

License

MIT

Unpacked Size

120 kB

Total Files

5

Last publish

Collaborators

  • jorenvanhee