1.0.0 • Published 8 months ago

native-layout-emotions v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
8 months ago

Native Layout Emotions CodeFactor

Page layouting out of the box without using any css libraries/frameworks.

About

This is a very light-weight collection of layout components in js alongwith css classes for columns meant to be used for page layouting in css in js requirements/solutions.

Components

  • Container
  • Row
  • Col

Available columns classes (12 grid system):

ColumnGenericExtra small devicesSmall devicesMedium devicesLarge deviceExtra large DeviceVery Large device
Column 1mcol-1mcol-xs-1mcol-sm-1mcol-md-1mcol-lg-1mcol-xl-1mcol-xxl-1
Column 2mcol-2mcol-xs-2mcol-sm-2mcol-md-2mcol-lg-2mcol-xl-2mcol-xxl-2
Column 3mcol-3mcol-xs-3mcol-sm-3mcol-md-3mcol-lg-3mcol-xl-3mcol-xxl-3
Column 4mcol-4mcol-xs-4mcol-sm-4mcol-md-4mcol-lg-4mcol-xl-4mcol-xxl-4
Column 5mcol-5mcol-xs-5mcol-sm-5mcol-md-5mcol-lg-5mcol-xl-5mcol-xxl-5
Column 6mcol-6mcol-xs-6mcol-sm-6mcol-md-6mcol-lg-6mcol-xl-6mcol-xxl-6
Column 7mcol-7mcol-xs-7mcol-sm-7mcol-md-7mcol-lg-7mcol-xl-7mcol-xxl-7
Column 8mcol-8mcol-xs-8mcol-sm-8mcol-md-8mcol-lg-8mcol-xl-8mcol-xxl-8
Column 9mcol-9mcol-xs-9mcol-sm-9mcol-md-9mcol-lg-9mcol-xl-9mcol-xxl-9
Column 10mcol-10mcol-xs-10mcol-sm-10mcol-md-10mcol-lg-10mcol-xl-10mcol-xxl-10
Column 11mcol-11mcol-xs-11mcol-sm-11mcol-md-11mcol-lg-11mcol-xl-11mcol-xxl-11
Column 12mcol-12mcol-xs-12mcol-sm-12mcol-md-12mcol-lg-12mcol-xl-12mcol-xxl-12

Usage 1

import { Container, Row, Col } from "native-layout-emotions";

function About() {
  return (
    <Container>
      <Row>
        <Col md={6}>This is column 1</Col>
        <Col md={6}>This is column 2</Col>
      </Row>
    </Container>
  )
}
return default About;

Usage 2

import { Container, Row } from "native-layout-emotions";

function About() {
  return (
    <Container>
      <Row>
        <View className="mcol-6">This is column 1</View>
        <View className="mcol-6">This is column 2</View>
      </Row>
    </Container>
  )
}
return default About;

Above example is equivalent to the following in bootstrap:

function About() {
  return (
    <div className="container">
      <div className="row">
        <div className="col-6">This is para1</div>
        <div className="col-6">This is para2</div>
      </div>
    </div>
  )
}

return default About;

Give a ⭐️ if you liked this project!