tailwindcss-base-buttons weekly downloads statistics
By thebakerdev · npm · Tailwind plugins
A base button styling for Tailwind Css
tailwindcss-base-buttons has 57 recorded weekly downloads on npm, a decrease of 3.4% over the past 30 days, ranking #2747 of 3,247 tracked listings.
About tailwindcss-base-buttons
Tailwind CSS Base Buttons
This plugin adds a bunch of base button classes in your Tailwindcss components which can be customized based on your theme colors.
<a href="https://tailwindcss-base-buttons.netlify.app/">Demo & Documentation</a>
Install
- Install the plugin:
npm install tailwindcss-base-buttons --save-dev
- Add it inside your
tailwind.config.jsfile:
module.exports = {
// ...
plugins: [
require('tailwindcss-base-buttons')()
]
}
Documentation
Out of the box, the plugin will generate these classes for styling your buttons.
btn-{color}- Colors are the default Tailwind colors. Ex:btn-indigo.btn-{theme}- These classes are theme based colors. Ex:btn-primary. Other options aresecondary,danger,default&disabled.btn-outlined-{color|theme}- These are outlined button based on default and theme colors. Ex:btn-outlined-primaryorbtn-outlined-red.btn-outlined-alt-{color|theme}- Same as outlined button but with solid backround on hover.btn-gradient-{color|theme}-These are gradient buttons based on default and theme colors. Ex:btn-gradient-primaryorbtn-gradient-pink.btn-{size}- These are button size classes. Ex:btn-xs. Other options aresm,md(default),lg,xl,btn-rounded- These makes rounded buttons
Customization
The appearance of the button can be customized by passing an option object as a first argument of the plugin. Ex:
module.exports = {
// ...
plugins: [
require('tailwindcss-base-buttons')({
baseClass: '.button',
borderRadius: '.5rem',
padding: '.5rem 1rem',
colors: {
theme: {
primary: {
background: red,
text: white
},
secondary: {
background: blue,
text: black
}
}
}
})
]
}
The example above will generate classes like .button-* with border-radius .5rem and padding .5rem 1rem. The theme colors generated would be .button-primary & .button-secondary.
You can also add your custom button styles by adding an object or a callback that generates your button style object as a second argument.
Ex: using an object. This adds the .btn-sample class
module.exports = {
// ...
plugins: [
require('tailwindcss-base-buttons')({
baseClass: '.btn'
},{
'.btn-sample': {
color: 'red',
width: '200px'
}
})
]
}
Ex: using a callback. By using a callback, you can access the colorConfig and options which contains the default and theme colors and the options. This will add .btn-sample-{color|theme} classes.
module.exports = {
// ...
plugins: [
require('tailwindcss-base-buttons')({
baseClass: '.btn'
},(colorConfig, options) => {
let additionalStyles = {};
Object.entries(colorConfig, config => {
let [key, properties] = config;
Object.assign(additionalStyles, {
[`${options.baseClass}-sample-${key}`]: {
backgroundColor: properties['background'],
width: '200px'
}
})
});
return additionalStyles;
})
]
}
Description from the npm listing.
- tailwindcss
- tailwindcss-plugin
- buttons
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (592)Similar npm Tailwind plugins plugins
All 20 tailwindcss-base-buttons alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/tailwindcss-base-buttons. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.