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

@tlon/indigo-react

v1.2.27

Published

React implementation of Tlon's design system, Indigo

Downloads

24

Readme

indigo-react

npm (scoped)

Indigo React is a component library for implementing the Indigo Design System. It's built with React, styled-components and styled-system. It also uses Formik and Reach-UI.

Warning: This library is being deprecated.

Quick Start

  1. Install the library
npm install --save @tlon/indigo-react
  1. Install peer dependencies
npm install --save @tlon/indigo-light styled-components styled-system react react-dom @reach/disclosure @reach/menu-button @reach/tabs markdown-to-jsx formik

If you are using Typescript, install the type definitions for several of these libraries.

npm install --save @types/styled-components @types/styled-system @types/styled-system__css
  1. Install a theme
npm install --save @tlon/indigo-light @tlon/indigo-dark

Basic Usage

import * as React from "react";
import { ThemeProvider } from "styled-system";
import { Text, Reset } from "@tlon/indigo-react";
import light from "@tlon/indigo-light";

class App extends React.Component {
  render() {
    return (
      <ThemeProvider theme={light}>
        <Reset />
        <Text fontSize="2">Indigo!</Text>
      </ThemeProvider>
    );
  }
}

In the above, we are wrapping our application in styled-component's ThemeProvider and passing in our theme from @tlon/indigo-light. In practice, you should rarely need to import the theme.

The <Text /> component accepts a fontSize prop, which is one of many style props provided by styled-system. Using VSCode is the best way to see the list of props each component can accept.

You can also check out the styled-system docs for a breakdown of props.

Many of these props have corrosponding styling shortcuts, drawn from the provided theme, like @tlon/indigo-light. These shortcuts are also provided by styled-system. To see how props map to values in our theme, check out styled-system's mapping.

Take a look at the theme to get a sense for which style values can be accessed from styled props.

Development

See DEVELOPMENT.md for example cases of component patterns used to create Indigo.

Related

| Library | Github | NPM | | ------------ | ----------------------------------------- | ------------------------------------------------ | | indigo-light | https://www.github.com/urbit/indigo-light | https://www.npmjs.com/package/@tlon/indigo-light | | indigo-dark | https://www.github.com/urbit/indigo-dark | https://www.npmjs.com/package/@tlon/indigo-dark | | indigo-react | https://www.github.com/urbit/indigo-react | https://www.npmjs.com/package/@tlon/indigo-react |

License

MIT License © Tlon