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

@newtonschool/grauity

v3.0.0-beta.0

Published

Design System for Newton School

Downloads

1,323

Readme

About gra.UI.ty

Inspired by the natural laws that guide the cosmos, gra.UI.ty (pronounced "gravity") is a React-based UI component library designed to harmonize simplicity and functionality. Our mission is to provide developers and designers with the tools to create intuitive and aesthetically pleasing user interfaces.

Philosophy

Like the gravitational force itself, the principles of great design are universal, omnipresent, yet often unobserved. With gra.UI.ty, we aim to tap into these fundamental elements to craft UI components that not only look stunning but feel inherently right.

Component Naming Convention

gra.UI.ty components should be prefixed by NS. For example, NSButton, NSTable, NSInput

Alias

gra.UI.ty is also affectionately known as grauity, graUIty or simply as gravity

Setup gra.UI.ty to make it your own!

Developing Components

To start your development journey in grauity, follow these steps:

# Install all packages in grauity
npm install

# Update submodules (mainly iconland, the submodule for icons)
git submodule init
git submodule update --recursive

# Build icons (required when running for first time)
npm run build-icons

# Run grauity Storybook
npm run storybook
# Then head to localhost:6006

# To build grauity Storybook docs, run this command in grauity
npm run build-storybook

Integrating locally with your app for side-by-side development & testing

To integrate grauity locally with your app, follow these steps:

# Install all packages in grauity
grauity$: npm install

# Build grauity
grauity$: npm run build

# Install local version of grauity
your-app$: npm install ../grauity

# Now, link react, react-dom from grauity to your-app:
your-app$: npm link ../grauity/node_modules/react ../grauity/node_modules/react-dom --legacy-peer-deps

# Finally, run your-app
your-app$: npm run dev

After you have made changes in grauity, build it.

grauity$: npm run build

If changes are not showing up even after rebuilding, you may have to delete your-app/node_modules/@newtonschool/grauity folder and install grauity again:

grauity$: npm run build

your-app$: npm install ../grauity

Then simply import components you want from @newtonschool/grauity in your-app like so:

import { NSButton, BUTTON_VARIANTS_ENUM } from '@newtonschool/grauity';

And use it as you wish

import { NSButton } from '@newtonschool/grauity';

export const MyComponent = () => (
    <NSButton
        variant="primary"
        onClick={() => {
            setShowFormErrors(true);
        }}
    >
        Click me!
    </NSButton>
);

How to's

Add new icons from .svg files

1. Update the iconland submodule in grauity

grauity$: git submodule update --remote --merge

2. Add your .svg files

To add a new font icon, add your .svg files for the new icon in the ./iconland/seeds/ directory in the iconland submodule.

3. Optimize & Generate new font files

grauity$: npm run build-icons:optimize
grauity$: npm run build-icons:generate

Alternatively, run the command

grauity$: npm run build-icons

Font files will be created in ui/fonts folder.

Use theming in your React app

Without theming, only foundational (theme agnostic) CSS variables (found here: constantGlobalStyle) will be provided.

To enable theming, wrap your components with GrauityThemeProvider:

import { GrauityThemeProvider } from '@newtonschool/grauity';

const App = ({ children, ...props }) => {
  return (
    <GrauityThemeProvider>
      {children}
    </GrauityThemeProvider>
  )
};

export default App;

Theming can be controlled by providing different class names to your root/local DOM elements, like the body element.

  • Add class grauity-theme-light to use the light theme
  • Add class grauity-theme-dark to use the dark theme

Now, you will be provided with the foundational as well as themed CSS variables, whose value will change depending on the theme applied.

These themed CSS variables can be found here:

Use icons in your React app

To use grauity icons, add the following import in global-styles.scss or any root-level CSS/SCSS file. Make sure CSS/SCSS loaders are setup properly in your app.

@import '~@newtonschool/grauity/dist/css/index.scss';