npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@kienleholdings/zephyr-tailwind

v1.0.0

Published

Reusable TailwindCSS Config for All Things Zephyr

Downloads

2

Readme

Zephyr Tailwind

Reusable TailwindCSS Config for All Things Zephyr

Installation

  1. Run yarn add tailwindcss (if you get peer dep errors, explicitly append the version @^1.8.10)
  2. Run yarn add @kienleholdings/zephyr-tailwind

Setup

  1. Create a file named tailwind.config.js
  2. Add the following
const zephyrTailwind = require('@kienleholdings/zephyr-tailwind');

module.exports = {
  ...zephyrTailwind.default,
};

From there, we recommend taking a look at the TailwindCSS Documentation, as they go into a lot more depth about different CSS preprocessors and bundlers than we'd like to. Our preferred method is to use PostCSS with Webpack, but really anything works if you put your mind to it!

Usage with PostCSS

Configuring PostCSS

  1. Create a file named postcss.config.js
  2. Add the following
module.exports = {
  plugins: [require('tailwindcss')('./tailwind.config.js'), require('autoprefixer')],
};

Creating the Style Sheet

  1. Create a file somewhere in your application's source code named zephyr.css
  2. Add the following
body {
  max-width: 100vw;
  overflow-x: hidden;
}

@import url('https://fonts.googleapis.com/css2?family=Oxygen:wght@700&family=Source+Sans+Pro:wght@400;700&display=swap');

@import 'tailwindcss/base';
@import 'tailwindcss/components';
@import 'tailwindcss/utilities';

All you need to do from there is add import ./zephyr.css to your application root and you're good to go!

Customization

By default Zephyr makes it easy to customize colors. Simply call the config function with a color object. Here's an example:

const zephyrTailwind = require('@kienleholdings/zephyr-tailwind');

const newColors = {
  ...zephyrTailwind.defaultColors,
  primary: {
    lighter: '#FFA726',
    normal: '#FF9800',
    darker: '#FB8C00',
  },
};

module.exports = zephyrTailwind.generateConfig(newColors);

For more in-depth tailwind customization, you can pass a TailwindCSS configuration object as a second parameter

const zephyrTailwind = require('@kienleholdings/zephyr-tailwind');

// Put your color overrides here or set "newColors" below to undefined
// (i.e. zephyrTailwind.generateConfig(undefined, {});

const additionalConfiguration = {
  // Put your Twilwind customizations here
};

module.exports = zephyrTailwind.generateConfig(newColors, additionalConfiguration);