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

@builtbypixel/plasma

v2.0.18

Published

Plasma UI

Downloads

279

Readme

@builtbypixel/plasma

Plasma UI

NPM JavaScript Style Guide

Install

yarn add @builtbypixel/plasma

Storybook

View the Storybook components for Plasma here which includes detailed component documentation and usage. View Storybook

Usage

import React from 'react'

import { ThemeProvider } from '@builtbypixel/plasma'
import { theme } from './theme'

class App extends Component {
  render() {
    return (
      <ThemeProvider override={theme}>
        <MyAppComponent />
      </ThemeProvider>
    )
  }
}

Creating your own theme

You can override and customise the Plasma theme by creating your own theme file as above.

Example theme file:

// Example theme.js
export default {
  colors: {
    myTestColor: '#000000
  },
  breakpoints: ['30em', '48em', '62em', '80em'],
  fonts: {
    heading: '"Avenir Next", sans-serif',
    body: 'system-ui, sans-serif',
    mono: 'Menlo, monospace'
  },
  fontSizes: {
    xs: '0.75rem',
    sm: '0.875rem',
    md: '1rem',
    lg: '1.125rem',
    xl: '1.25rem',
    '2xl': '1.5rem',
    '3xl': '1.875rem',
    '4xl': '2.25rem',
    '5xl': '3rem',
    '6xl': '4rem'
  }
}

<Box bg="myTestColor">Testing my custom background</Box>

Shorthand props

Plasma is built on top of Styled System which can be viewed here.

For example margin-top would be mt.

Responsive styles

Plasma UI support responsive styles out of the box. Instead of manually adding @media queries and adding nested styles throughout your code, Plasma UI allows you provide array values to add mobile-first responsive styles.

<>
  <Box
    height='40px'
    bg='teal.400'
    width={[
      '100%', // base
      '50%', // 480px upwards
      '25%', // 768px upwards
      '15%' // 992px upwards
    ]}
  />
  {/* responsive font size */}
  <Box fontSize={['sm', 'md', 'lg', 'xl']}>Font Size</Box>
  {/* responsive margin */}
  <Box mt={[2, 4, 6, 8]} width='full' height='24px' bg='tomato' />

  {/* Using breakpoint labels */}
  <Box bg='papayawhip' p={{ sm: 2, md: 4, lg: 6, xl: 8 }}>
    Padding
  </Box>
</>

License

MIT © builtbypixel