0.6.49 • Published 1 month ago

@ensdomains/thorin v0.6.49

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

ENS Design System · NPM version License

A design system for ENS built with React and styled-components.

NOTE: This project is in alpha stage. It is in active development and is subject to change.

Install

To install this package using npm:

npm install @ensdomains/thorin styled-components react-transition-state@1.1.5

To install this package using yarn:

yarn add @ensdomains/thorin styled-components react-transition-state@1.1.5

Checkout the project's playroom to preview the components in a live online environment.

Set Up

In your App component, wrap the root of your app in a ThemeProvider module from styled-components. Import ThorinGlobalStyles and declare it as a child of ThemeProvider to set global styles. Set the theme by passing a theme object to ThemeProvider.

import { ThemeProvider } from 'styled-components'
import { ThorinGlobalStyles, lightTheme } from '@ensdomains/thorin'

const App = () => {
  return (
    <ThemeProvider theme={lightTheme}>
      <ThorinGlobalStyles />
      {children}
    </ThemeProvider>
  )
}

Dark Theme

To use the dark theme, import darkTheme and pass it to the ThemeProvider

import { ThemeProvider } from 'styled-components'
import { ThorinGlobalStyles, lightTheme } from '@ensdomains/thorin'

const App = () => {
  return (
    <ThemeProvider theme={lightTheme}>
      <ThorinGlobalStyles />
      {children}
    </ThemeProvider>
  )
}

Use Components

A list of components with examples are available on the project website.

A simple example to get you started:

import { Input, SearchSVG } from '@ensdomains/thorin'

const SearchInput = () => {
  return (
    <Input
      label="Search"
      placeholder="Name or wallet address"
      prefix={<SearchSVG />}
    />
  )
}

Documentation

You can find the full documentation on the project website.

The documentation is divided into two sections.

  • Guides : Documentation and tips for working on this project.
  • Components : Documentation and sample code for each individual component.

Development

gh clone repo @ensdomains/thorin
pnpm install
pnpm dev

Before development, it is recommended that you read the following:

  • Development Guide - Information and tips to help you when working on this project including:
  • Playroom Guide - Information on how to add state and interactivity to sample code in playroom and mdx code previews.

Contributing

Contribute to this project by sending a pull request to this repository.

Sources

Forked from degen.

0.6.49

1 month ago

0.6.48

1 month ago

0.6.47

2 months ago

0.6.46-beta

2 months ago

0.6.46-beta.1

2 months ago

0.6.46

2 months ago

0.6.45

3 months ago

0.6.43

9 months ago

0.6.42

10 months ago

0.6.44

8 months ago

0.6.41

11 months ago

0.6.29

1 year ago

0.6.28

1 year ago

0.6.25

1 year ago

0.6.27

1 year ago

0.6.26

1 year ago

0.6.40

1 year ago

0.6.32

1 year ago

0.6.31

1 year ago

0.6.34

1 year ago

0.6.33

1 year ago

0.6.30

1 year ago

0.6.39

1 year ago

0.6.36

1 year ago

0.6.35

1 year ago

0.6.38

1 year ago

0.6.37

1 year ago

0.6.21

1 year ago

0.6.23

1 year ago

0.6.22

1 year ago

0.6.22-alpha-2

1 year ago

0.6.24

1 year ago

0.6.22-alpha-3

1 year ago

0.6.22-alpha-4

1 year ago

0.6.22-alpha-5

1 year ago

0.6.23-alpha

1 year ago

0.6.23-alpha-5

1 year ago

0.6.23-alpha-6

1 year ago

0.6.23-alpha-7

1 year ago

0.6.23-alpha-2

1 year ago

0.6.23-alpha-3

1 year ago

0.6.23-alpha-4

1 year ago

0.6.25-alpha-2

1 year ago

0.6.20

2 years ago

0.6.18

2 years ago

0.6.17

2 years ago

0.6.19

2 years ago

0.6.16

2 years ago

0.6.15

2 years ago

0.6.7

2 years ago

0.6.6

2 years ago

0.6.9

2 years ago

0.6.8

2 years ago

0.5.18

2 years ago

0.5.19

2 years ago

0.6.10

2 years ago

0.5.21

2 years ago

0.6.12

2 years ago

0.6.11

2 years ago

0.5.20

2 years ago

0.6.14

2 years ago

0.6.13

2 years ago

0.6.3

2 years ago

0.6.2

2 years ago

0.6.5

2 years ago

0.6.4

2 years ago

0.6.1

2 years ago

0.6.0

2 years ago

0.5.10

2 years ago

0.5.11

2 years ago

0.5.8

2 years ago

0.5.7

2 years ago

0.5.9

2 years ago

0.5.16

2 years ago

0.5.17

2 years ago

0.5.14

2 years ago

0.5.15

2 years ago

0.5.12

2 years ago

0.5.13

2 years ago

0.5.4

2 years ago

0.5.6

2 years ago

0.5.5

2 years ago

0.5.3

2 years ago

0.5.2

2 years ago

0.5.0

2 years ago

0.5.1

2 years ago

0.4.1

2 years ago

0.3.0

2 years ago

0.4.0

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago