@nati070/one-page-sections-library
TypeScript icon, indicating that this package has built-in type declarations

1.1.8 • Public • Published

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

enter image description here

GitHub example link: here

## Documentation

soon

Readme

Keywords

none

Package Sidebar

Install

npm i @nati070/one-page-sections-library

Weekly Downloads

1

Version

1.1.8

License

ISC

Unpacked Size

443 kB

Total Files

19

Last publish

Collaborators

  • nati070