1.0.7 • Published 5 years ago

skeleton-responsive-ui v1.0.7

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

Skeleton Responsive UI

React version of responsive css boilerplate: http://getskeleton.com/

Using

(IMPORTANT) Global Styles

Before the start, you have to import GlobalStyles and use it in a parent component, like app.js, it doesn't have a props, just css code:

import React from "react";
import {
  GlobalStyles,
  Container,
} from "skeleton-responsive-ui";

function App() {
  return (
    <>
      <GlobalStyles />
      <Container>
      ...other things
      </Container>
    </>
  );
}

export default App;

Global Styles component has couple of css impromevent for html tags.

LAYOUT

Container && Row

Everything have to be inside Container and Row. Of course a row defines a horizontal stack. They have only utils props. I will explain it later.

import React from "react";
import {
  GlobalStyles,
  Container,
  Row,
  Column,
} from "skeleton-responsive-ui";

function App() {
  return (
    <>
      <GlobalStyles />
      <Container>
        <Row>
          <Column column="twelve">
		<H1>Hello World</H1>
          </Column>
        </Row>
      </Container>
    </>
  );
}

export default App;

Column

You have to set a column size using of these strings: one, two, three, four, five, six, seven, eight, nine, ten, eleven, twelve or you can use one of them one-third, one-half, two-thirds. These values are same for offset.

PropertyDescriptionDefault valuetype
columnColumn sizeRequiredstring
offsetOffset size of a columnnullstring

Column Example

import React from "react";
import {
  Container,
  Row,
  Column,
  GlobalStyles,
} from "skeleton-responsive-ui";

function App() {
  return (
    <>
      <GlobalStyles />
      <Container>
        <Row>
          <Column column="five">5/12/Column>
          <Column column="seven">7/12</Column>
        </Row>
      </Container>
    </>
  );
}

export default App;

Offset Example

import React from "react";
import {
  Container,
  Row,
  Column,
  GlobalStyles,
} from "skeleton-responsive-ui";

function App() {
  return (
    <>
      <GlobalStyles />
      <Container>
        <Row>
          <Column column="five">5/12/Column>
          <Column column="five" offset="two">7/12</Column>
        </Row>
      </Container>
    </>
  );
}

export default App;

Button

Simple button. Just have one props: primary. If you set primary, button will be blue.

PropertyDescriptionDefault valuetype
primaryButton will be bluenullbool

Other Components

There are Hr, Input and H1,H2, H3, H4, H5, H6 components inside package. You don't have to use them. It is up to you. They are simple and don't have special props.

Utils

Package has four utils props as global. You can set them all other components (Container, Row, Column, Button, Input etc.).

PropertyDescriptionDefault valuetype
fullWidthWidth will be 100%nullbool
maxFullWidthMax Width will be 100%nullbool
pullRightfloat will be rightnullbool
pullLeftfloat will be leftnullbool
1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago