@nati070/one-page-sections-library
v1.1.8
Published
create one page web that the divided to section for easy to start develop
Downloads
3
Readme
One-Page-Sections-Library
The One-Page-Sections-Library gives a head start for one-page web development in React, allowing you to start writing the web page itself.
Installation
npm i @nati070/one-page-sections-library
Getting started
To get started you need to be familiar with two components.
Sections - wrap all the Section components.
Section - every page that you need, create with a Section component. Section has 3 property
name(required) - define the id of the page and have to be unique for each page.
backgroundColor(optional) - The backgroundColor property sets the background color of an element(same as CSS). the default color is white.
component(optional) - A React element to render when the route is matched, highly recommended to use it for prettier code.
import { Sections,Section } from '@nati070/one-page-sections-library';
import FirstComp from './FirstComp';
import SecondComp from './SecondComp';
const Main = () => {
return (
<Sections>
<Section backgroundColor='#D4D4AA' name='first' component={<FirstComp/>}/>
<Section backgroundColor='#E8871E' name='second' component={<SecondComp/>}/>
</Sections>
);};
export default Main;
Screenshot
GitHub example link: here
## Documentation
soon