New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

tailwindcss-placeholders

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tailwindcss-placeholders

TailwindCSS plugin that generates placeholder utilities.

latest
Source
npmnpm
Version
1.2.0
Version published
Maintainers
1
Created
Source

TailwindCSS Placeholders

TailwindCSS plugin that generates placeholder utilities.

Installation

Install it with npm or yarn.

npm install tailwindcss-placeholders
yarn add tailwindcss-placeholders

Usage

Add it to the plugins section of your tailwind.config.js file.

plugins: [
  require('tailwindcss-placeholders')(),
],

Use it to override the color and opacity of the placeholder.

<input class="ph-blue-500 ph-opacity-100" type="text" placeholder="This is now blue">

How it works

For each color in theme.textColor it adds the class ph-{color}::placeholder.

For each opacity in theme.opacity it adds the class ph-opacity-{opacity}

Warning

If you're using autoprefixer, it will add the following prefixes:

.ph-blue-500::-webkit-input-placeholder {
  color: #4299e1;
}

.ph-blue-500:-ms-input-placeholder {
  color: #4299e1;
}

.ph-blue-500::-ms-input-placeholder {
  color: #4299e1;
}

.ph-blue-500::placeholder {
  color: #4299e1;
}

To avoid increasing your file size, make sure to use purgecss to remove any unused CSS.

License

This project is licensed under the MIT License.

Keywords

placeholders

FAQs

Package last updated on 12 Apr 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts