1.1.0 • Published 2 years ago

leaderboard-table v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Leaderboard Quality Gate Status

Lightweight, generic and easy to use leaderboard module. With this package you can create easy scoreboard for your products, users or for whatever you want!
Demo: https://patryk-rozwadowski.github.io/npm-leaderboard-doc/

Installation:

NPM:

npm install leaderboard-table

YARN

yarn add leaderboard-table

CDN

https://unpkg.com/browse/leaderboard-table@[VERSION]/dist/leaderboard.min.css

https://unpkg.com/browse/leaderboard-table@[VERSION]/dist/leaderboard.min.js

CDN usage:

index.html:

<link rel="stylesheet" href="https://unpkg.com/browse/leaderboard-table@1.0.3/dist/leaderboard.min.css">

<script src="https://unpkg.com/browse/leaderboard-table@1.0.3/dist/leaderboard.min.js"></script>

Usage:

Leaderboard will take size of its parent size (width and height). To be use this package:

  1. import leaderboard package: import { Leaderboard } from "leaderboard-table";

  2. import leaderboard styles: import "leaderboard-table/dist/leaderboard.min.css";

  3. Create root div element with class in your HTML file: <div class="root"></div>


CSS style classes

Containers

ClassDescription
.lbRoot container for leaderboard module
.lb_colColumn container
.lb_cellLeaderboard's cell styles
.lb_cell_containerContainer of leaderboard's cell
.lb_headers_containerHeaders container

Typography

ClassDescription
.lb_header_text_primaryPrimary styles for headers
.lb_header_text_secondarySecondary styles for subheaders
.lb_text_primaryPrimary styles for text
.lb_text_secondarySecondary styles for text

API

Properties

Leaderboard propertiesTypeDefault ValueDescription
rootContainerHTMLElement-Your root container for leaderboard.
leaderboardDataObject-Object with data which you want to put into Leaderboard
optionsObject-Options object

Options

OptionsTypeDefault ValueDescription
headerTagsString"h5"Display the help window.
logsbooleanfalseDisplay the help window.
contentForEmptyRowsString""Display the help window.

Methods

MethodsDescription
init()Method for leaderboard initialization
1.1.0

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago