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

@nova-design-system/nova-base

v3.0.0-beta.27

Published

Nova is a design system created by Elia Group to empower creators to efficiently build solutions that people love to use.

Downloads

310

Readme

Nova Components Base

The Nova Components Base package provides essential tokens and precompiled CSS for the Nova Design System. It aims to streamline the use of Nova’s design tokens and offer flexibility in customizing the setup with Tailwind CSS.

Features

  • Precompiled CSS: A simple css file tailored with Nova’s design theme and a collection of utilities. Ideal for quick integration.
  • Tokens: Design tokens defined by the Nova Design.
  • Tailwind Theme and Plugin: Configure your own Tailwind CSS setup with the Nova theme and plugin, eliminating the need for the precompiled CSS and significantly reducing CSS size.

Installation

npm install @nova-design-system/nova-base

Usage

Include Tokens CSS

Include the tokens CSS in your project (two themes are available: Spark and Ocean):

/* For the Spark theme */
@import '@nova-design-system/nova-base/dist/css/spark.css';

/* Or, for the Ocean theme */
@import '@nova-design-system/nova-base/dist/css/ocean.css';

Recommended Approach: Using Tailwind CSS with Nova Theme and Plugin

The recommended approach is to set up Tailwind CSS and use our tokens, novaTailwindTheme, and novaTailwindPlugin for the Tailwind configuration. This method provides a smaller CSS bundle and access to more utilities than the precompiled CSS.

Prerequisites

Ensure that Tailwind CSS is installed in your project. If not, you can install it by following the Tailwind CSS installation guide.

Tailwind Configuration

After setting up Tailwind CSS, add the following to your tailwind.config.js:

import {
  novaTailwindTheme,
  novaTailwindPlugin,
} from '@nova-design-system/nova-base/theme';

/** @type {import('tailwindcss').Config} */
export default {
  // ...
  theme: novaTailwindTheme,
  plugins: [novaTailwindPlugin],
};

The novaTailwindTheme maps our CSS variable tokens to utilities, ensuring consistent styling across your project. The novaTailwindPlugin adds additional base styles, components, and utilities.

Importing Theme Tokens in CSS

In your CSS file, along with the default Tailwind imports, you should import the tokens for the theme:

/* Import the theme tokens */
@import '@nova-design-system/nova-base/dist/css/spark.css';

/* Tailwind CSS imports */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* Or, for the Ocean theme */
/* @import '@nova-design-system/nova-base/dist/css/ocean.css'; */

Benefits of Using Tailwind CSS with Nova Theme and Plugin

  • Smaller CSS Bundle: By configuring Tailwind CSS with our theme and plugin, you eliminate unused styles, resulting in a significantly smaller CSS file.
  • More Utilities: Gain access to a wider range of utilities beyond those included in the precompiled CSS.
  • Customization: Tailwind CSS allows you to customize and extend your styles as needed.

Alternative Approach: Using Precompiled CSS

If it's not possible to set up Tailwind CSS in your project, you can include the precompiled CSS along with the tokens:

import '@nova-design-system/nova-base/dist/css/spark.css';
// or import '@nova-design-system/nova-base/dist/css/ocean.css';
import '@nova-design-system/nova-base/dist/css/nova-utils.css';

Note: The precompiled CSS includes a whitelist of Tailwind classes and is quite large. This approach is only recommended if you cannot set up Tailwind CSS yourself.