3.0.1 • Published 9 months ago

react-html-layout v3.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
9 months ago

react-html-layout

Basic react page layout.

Usage

Installation:

npm install react-html-layout

Make sure you have next styles

Some browsers have default styles for html or body tags. We should be sure that below tags have:

html,
body {
  margin: 0;
  padding: 0;
}

Glossary

Layout

import { Layout } from 'react-html-layout';
...
<Layout
    header="Header"
    footer="Footer"
    leftSidebar="Left Sidebar"
    rightSidebar="Right Sidebar">
    Content
</Layout>
  • header, footer, leftSidebar, rightSidebar contains default styles if content has string type.
  • Layout occupies whole visible page space, that's because it's height is 100vh.
  • To make header fixed, set fixedHeader to true.
  • To make footer fixed, set fixedFooter to true.
  • To make leftSidebar and/or rightSidebar fixed, set fixedSidebar to true.

Options

NametypeDescription
classNamestringRoot class name
styleCSSPropertiesRoot style
headerReactNodeHeader content.
fixedHeaderbooleanToggles header to be fixed
footerReactNodeFooter content.
fixedFooterbooleanToggles footer to be fixed
leftSidebarReactNodeLeft Sidebar content
leftSidebarStyleCSSPropertiesLeft Sidebar style
rightSidebarReactNodeRight Sidebar content
rightSidebarStyleCSSPropertiesRight Sidebar style
fixedSidebarbooleanToggles leftSidebar or/and rightSidebar to be fixed
content, childrenReactNodeContent of the page

ContentWrapper

Centralized content with fixed width

import { ContentWrapper } from 'react-html-layout';
...
<ContentWrapper width={300}>
    Content example. Content example. Content example.
</ContentWrapper>

Options

NametypeDescription
widthnumberWidth of the content
childrenReactNodeContent
3.0.1

9 months ago

3.0.0

1 year ago

2.2.13

4 years ago

2.2.12

4 years ago

2.3.0

4 years ago

2.3.2

4 years ago

2.3.1

4 years ago

2.2.11

4 years ago

2.2.10

4 years ago

2.2.9

4 years ago

2.2.7

4 years ago

2.2.8

4 years ago

2.2.5

4 years ago

2.2.6

4 years ago

2.2.2

4 years ago

2.2.4

4 years ago

2.2.1

4 years ago

2.2.0

4 years ago

2.1.6

4 years ago

2.1.5

4 years ago

2.1.3

4 years ago

2.1.2

4 years ago

2.1.1

4 years ago

2.0.5

4 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.4

4 years ago

2.0.0

4 years ago

1.2.6

4 years ago

1.2.5

4 years ago

1.2.4

4 years ago

1.2.3

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.0

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

5 years ago

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

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago