JSPM

  • Created
  • Published
  • Downloads 18
  • Score
    100M100P100Q79741F
  • License MIT

React Revolution - build interactive modules for react projects

Package Exports

  • react-revolution

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-revolution) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

React Revolution

Website: https://react-revolution.j.pl/

React Revolution is a light javascript library to generate interactive modules for react project.

Installation

  • npm i react-revolution
  • yarn add react-revolution

Example of usage

import { Breadcrumbs } from 'react-revolution';

<Breadcrumbs 
    hashRouter={true}
/>

Module Examples

Accordion

CardsScroll

Clipboard

Clouds404

CloudsMountains404

Container

CustomSuggestion

GlobalMessages

Icons

InputAnimation

InputFile

InputFileDragDrop

Lightbulb404

LoadingBoxTop

LoadOnScroll

MenuClickHorizontal

PagerDynamic

PopupBox

ReadMore

ReadMoreCallback

ScrollTo

SourceCode

Table

TextWriter

and more .... !

Functions

disableHtmlScroll - The HTML tag will have the attributes: class = "overflow-hidden" and style = "overflow: hidden;" so that a user is not allowed to scroll which of the website.

enableHtmlScroll - The class "overflow-hidden" and the style: "overflow: hidden;" are removed from the HTML tag. The user again has the option to scroll within the website.

scrollTopListener - Scroll to the top of the current page on each location (window.location) change. Initial the function has to be called (best way is to call the function on componentDidMount) to initialise the location change listener. This function take 3 additional arguments. Argment 1: time (in miliseconds) to scroll to top of the page, argument 2: scroll behavior - 'auto','smooth','inherit','initial','unset', argument 3: remove the listener (boolean). To remove the listener pass to the 3 argument the value true (default the value is set to false).

urlExtract - Extracts the URL on individual paths of the window.location, key and its values. The function receives 1 optional argument: isHashRouter (boolean) - by default the transferred value is undefined. This function extracts paths and key values for the window.location: "href", "hash" and "path".

uuid - Extracts the URL on individual paths of the window.location, key and its values. The function receives 1 optional argument: isHashRouter (boolean) - by default the transferred value is undefined. This function extracts paths and key values for the window.location: "href", "hash" and "path".