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

@getfutureproof/fpsb

v2.0.0

Published

- [fpsb [futureproof storybook]](#fpsb-futureproof-storybook) - [Once upon a time...](#once-upon-a-time) - [Installation](#installation) - [Using styles](#using-styles) - [Global Styles](#global-styles) - [Theme](#theme) - [Components](#co

Downloads

5

Readme

fpsb [futureproof storybook]

Once upon a time...

...Okay so it's very small at the moment but our story begins here and we'd love you to continue it! This initial version has been put together in a Covid-19-induced stupor so be on the look out for bugs and, more excitingly, note down your ideas for new components by opening up new issues on the repo.

Installation

yarn add @getfutureproof/fpsb or
npm i @getfutureproof/fpsb

View Storybook

The latest Storybook can be viewed here. This has extended documentation and examples on using components in the fpsb library.

Using styles

Global Styles

normalize.css and some other basic rules can be added directly with the GlobalStyles component. (See source code)

// index.jsx
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { GlobalStyle } from "@getfutureproof/fpsb";


ReactDOM.render(
    <>
        <GlobalStyle />
        <App />
    </>, document.getElementById('root'));

Theme

Included components come complete with their styling but if you'd like to go off-piste, some key values of futureproof branding eg. colour palette are available directly via the theme

// GreatComponent.jsx
import { colors, typography } from "@getufutureproof/fpsb";

const GreatComponent = () => {
    const divStyles = {
        color: colors.purple,
        backgroundColor: colors.coral,
        fontFamily: typography.type.body
    }

    return (
        <div style={divStyles}>
            What a great component.
        </div>
    );
};

Components

A compact selection to get us going - help us expand!
See the Storybook) for more extensive documentation and usage.

Button

Buttons come in regular and inverted flavours

// GreatComponent.jsx
import { Button } from "@getufutureproof/fpsb";

const GreatComponent = () => {
    return (
        <div>
            <Button label="Click me..." />
            <Button
                label="I'm inverted"
                inverted
                colorway="coral"
            />
        </div>
    );
};

Heading

// GreatComponent.jsx
import { Heading } from "@getufutureproof/fpsb";

const GreatComponent = () => {
    return (
        <div>
            <Heading
                content="Listen up!"
                color="lime"
                size="huge"/>
        </div>
    );
};

Shapes

The four key shapes are:

  • Angles
  • Cog
  • Shield
  • Star

They come as solids and as cut-out frames - put whatever you like behind them!

Solid Shapes

// GreatComponent.jsx
import { Shape } from "@getufutureproof/fpsb";

const GreatComponent = () => {
    return (
        <div>
            <Shape kind="star" color="lemon">
        </div>
    );
};

Frame Shapes

// GreatComponent.jsx
import { Frame } from "@getufutureproof/fpsb";

const GreatComponent = () => {
    return (
        <div>
            <Frame kind="angles" color="violet">
        </div>
    );
};

Lists

There are two basic List components

  • Checked (Guarantee) Lists
  • Numbered Lists

Checklists

// GreatComponent.jsx
import { Checklist, ChecklistItem } from "@getufutureproof/fpsb";

const GreatComponent = () => {
    return (
        <div>
            <Checklist>
            <ChecklistItem label='We do this' />
            <ChecklistItem label='We also do this' />
            <ChecklistItem label='We even do this' />
        </Checklist>
        </div>
    );
};

NumberedList

// GreatComponent.jsx
import { NumberedList } from "@getufutureproof/fpsb";

const GreatComponent = () => {
    const coolThings = [
                'This thing',
                'That thing',
                'The other thing'
            ]

    return (
        <div>
            <NumberedList
                items={coolThings} />
        </div>
    );
};