0.2.2 • Published 5 years ago

unstyled v0.2.2

Weekly downloads
15
License
MIT
Repository
github
Last release
5 years ago

unstyled

React components with minimal styling, easily to extend. Based on styled-components. Inspired by React Native components and SemanticUI. Will cover all common used html tags and adding convenient components for widely used UI elements.

WIP: This package is in an early alpha stage. Breaking changes can occur without notification. Already used in production (caution!). Feedback and contributions are welcome.

Versioning (prior to 1.0.0)

0.Y.Z:

  • Y => Breaking changes and Features
  • Z => Patches

Installation

$ yarn add unstyled

or (if you prefer)

$ npm i --save unstyled

Usage with GatsbyJS

As this lib is mainly used with GatsbyJS for fast prototyping of new websites I'll cover that first.

yarn add unstyled styled-components gatsby-plugin-styled-components

Make sure to install "gatsby-plugin-styled-components" and configure it in `gatsby-config':

plugins: ["gatsby-plugin-styled-components", ...]

Example

import React from "react";
import { Container, Button } from "unstyled";

const App = () => (
  <Container>
      <h1>Elements</h1>
      <Button>Basic Button</Button>
  </Container>
);

export default App;

Extend Elements

It's easy to extend elements and apply your own styles. Just use styled-components extend feature.

import Button from 'unstyled'

const CustomButton = Button.extend`
  color: tomato;
`

Theming

Wrap your own theme via styled-components ThemeProvider.

import styled, { ThemeProvider } from "styled-components"
import {StyledComponentsTheme, Button} from "unstyled"

const Element = () => (
  <ThemeProvider theme={StyledComponentsTheme}>
    <div>
      <h2>Button with custom theme:</h2>
      <Button>
        Styled Button
      </Button>
    </div>
  </ThemeProvider>
)

export default Element

License

Licensed under the MIT License, Copyright © 2017 superlumen.

See LICENSE for more information.

style: styled-components

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.0

6 years ago

0.0.27

6 years ago

0.0.26

6 years ago

0.0.25

6 years ago

0.0.24

6 years ago

0.0.23

6 years ago

0.0.22

6 years ago

0.0.21

6 years ago

0.0.20

6 years ago

0.0.19

6 years ago

0.0.18

6 years ago

0.0.17

6 years ago

0.0.16

6 years ago

0.0.15

6 years ago

1.0.0

6 years ago

0.0.14

6 years ago

0.0.13

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago