npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-group-table

v1.0.5

Published

A react component for displaying football group tables

Readme

react-group-table

A simple React component that can be used to display football league tables. It was written with small tables (i.e. 4 team World Cup groups) in mind, but you can use it for as many teams as you like.

Usage

If you want to include this component in your React app, install from npm with

npm i --save react-group-table

Import wherever you want to use it with

import GroupTable from 'react-group-table'

This gives you a standard React component:

<GroupTable {...this.props}>

Props

react-group-table has some mandatory props and some optional props.

|Prop Name|Prop Type|Required|Default|Usage| |:---:|:---:|:---:|:---:|:---:| |cutOffPositions|Array of numbers|:negative_squared_cross_mark:|[2]|Adds a dashed border under any position in this array to indicate cut off positions, e.g. between qualifying and non-qualifying positions. Not zero indexed so if you want a cut off position after the second and fourth team, the array will be [2,4]| |dangerZonePositions|Array of numbers|:negative_squared_cross_mark:|[3,4]|These positions will be shaded red to indicate non-qualifying/relegation positions| |groupName|String|:negative_squared_cross_mark:||Group name to be displayed above team names| |qualificationPositions|Array of numbers|:negative_squared_cross_mark:|[1,2]|These positions will be shaded green to indicate qualification positions (or similar)| |pointsForWin|number|:negative_squared_cross_mark:|3|In case you want to render old tables from the days of 2 points for a win, or some dystopian future with 7 points for a win or something| |showGoalsConceded|bool|:negative_squared_cross_mark:|true|Display the goals conceded column| |showGoalsScored|bool|:negative_squared_cross_mark:|true|Display the goals scored column| |showPositions|bool|:negative_squared_cross_mark:|true|Display the league position column| |teams|Array of object (see below)|:white_check_mark:||List of teams and their stats for the group table|

The 'teams' array

The most important prop is an array of team objects. There can be as many teams as you want, but each can have the following properties (note some are mandatory):

{
  gamesDrawn: number.isRequired,
  gamesLost: number.isRequired,
  gamesPlayed: number,
  gamesWon: number.isRequired,
  goalDifference: number,
  goalsConceded: number.isRequired,
  goalsScored: number.isRequired,
  points: number,
  teamName: string.isRequired
}

With all columns shown, group name supplied, default qualification and danger zone positions

Full table

With only mandatory columns shown, no group name, default qualification and danger zone positions

Short table

Test Harness

If you want to fork this repo and make changes or just clone it to play about with, it also comes with a 'Reduxified' test harness. Run

npm start

to serve the component - access it at

localhost:8080

in your browser. Hot reloading is enabled so you can make changes on the fly. Although not used for this simple example (other than the initial state), there is a redux directory with an example reducer (test/tools/redux/group/increment.js). If you are familiar with Redux and wish to make use of this in development then you can simply add new actions (to test/tools/redux/group/actions.js) and new reducers. The component is rendered in test/tools/containers/Harness.js and test/tools/components/Harness.js.