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 🙏

© 2025 – Pkg Stats / Ryan Hefner

basis-css

v0.2.0

Published

Professional CSS framework with adaptive color system

Readme

Basis CSS

A professional CSS framework with an adaptive color system that supports multiple color modes and automatic light/dark theme switching.

Features

  • Adaptive Color System: Choose from 4 color modes:

    • Monochrome: Sophisticated offblack and offwhite palette
    • One-color: Monochrome foundation with one strategic highlight color
    • Two-colors: Natural hierarchy with primary and secondary colors
    • Three-colors: Rich layered design with primary, secondary, and tertiary colors
  • Automatic Theme Switching: Respects system preferences for light/dark mode

  • Comprehensive Components: Buttons, cards, forms, tables, alerts, modals, and more

  • Utility Classes: Spacing, typography, flexbox, grid utilities

  • Zero Dependencies: Pure CSS and vanilla JavaScript

  • Responsive Design: Mobile-first approach with responsive utilities

Installation

npm

npm install basis-css

Composer (PHP)

composer require basis-css/basis-css

CDN

You can also include Basis CSS directly via CDN:

<link rel="stylesheet" href="https://unpkg.com/basis-css@latest/style.css">
<script src="https://unpkg.com/basis-css@latest/app.js"></script>

Usage

Basic Setup

Include the CSS and JavaScript files in your HTML:

<!DOCTYPE html>
<html>
<head>
  <link rel="stylesheet" href="path/to/style.css">
</head>
<body>
  <div class="container">
    <h1>Hello, Basis CSS!</h1>
    <button class="btn btn-primary">Click me</button>
  </div>

  <script src="path/to/app.js"></script>
</body>
</html>

Color Modes

Switch between color modes programmatically:

// Switch to one-color mode with a custom accent
colorSystem.mode = 'one-color';
colorSystem.colors.accent = '#3b82f6';
updateColorSystem();

// Switch to two-colors mode
colorSystem.mode = 'two-colors';
colorSystem.colors.primary = '#3b82f6';
colorSystem.colors.secondary = '#8b5cf6';
updateColorSystem();

// Switch to three-colors mode
colorSystem.mode = 'three-colors';
colorSystem.colors.primary = '#3b82f6';
colorSystem.colors.secondary = '#8b5cf6';
colorSystem.colors.tertiary = '#ec4899';
updateColorSystem();

// Reset to monochrome
resetToMonochrome();

Manual Theme Control

Override system theme preferences:

<!-- Force dark mode -->
<html data-color-scheme="dark">

<!-- Force light mode -->
<html data-color-scheme="light">

Components

Buttons

<button class="btn btn-primary">Primary Button</button>
<button class="btn btn-secondary">Secondary Button</button>
<button class="btn btn-tertiary">Tertiary Button</button>
<button class="btn btn-outline">Outline Button</button>
<button class="btn btn-ghost">Ghost Button</button>

Cards

<div class="card">
  <div class="card-header">
    <h4>Card Title</h4>
  </div>
  <div class="card-body">
    <p>Card content goes here.</p>
  </div>
</div>

Forms

<div class="form-group">
  <label class="form-label">Email</label>
  <input type="email" class="form-control" placeholder="Enter email">
</div>

Alerts

<div class="alert alert-primary">This is a primary alert</div>
<div class="alert alert-success">This is a success alert</div>
<div class="alert alert-danger">This is a danger alert</div>

Customization

All colors are defined as CSS custom properties and can be overridden:

:root {
  --color-primary: #your-color;
  --color-secondary: #your-color;
  --font-family-base: "Your Font", sans-serif;
}

Browser Support

  • Chrome (latest)
  • Firefox (latest)
  • Safari (latest)
  • Edge (latest)

License

MIT License - feel free to use in personal and commercial projects.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.