This NPM package delivers an immersive and visually striking table component for web applications, developed with ReactJS, JavaScript, SASS, and ESLINT, designed to effortlessly enhance user engagement and excitement.
Live demo:
colors-table-react
The colors-table component offers a variety of configuration options to customize its appearance and functionality, including:
- rows\columns: You have the ability to configure the count of rows and columns in the table according to your specific preferences.
- allowRepeatedColors: The provided prop gives you the flexibility to determine whether you want the color of the clicked item to be repeatable after each click.
- colors: You can choose colors from a predefined list when generating the table initially and when changing the color of any item within the table.
- backgroundColor: You have the option to specify a background color for the table, but it is not mandatory.
- onChange: By using the provided prop, you can pass an
onChange
function to the table, enabling the component to be utilized in various ways and adaptable to different concepts.
import React from "react";
import { ManagedColorsTable } from "colors-table-react";
import { MY_COLORS_LIST } from "./consts";
function App() {
return (
<div className="app-container">
<ManagedColorsTable
rows={5}
columns={7}
allowRepeatedColors={false}
colors={MY_COLORS_LIST}
backgroundColor="wheat"
onChange={() => console.log("change-detected!")}
/>
</div>
);
}
export default App;
Installation:
npm install colors-table-react
Include the package in your project's dependencies.
Development:
npm run build-jsdocs
For JSDocs of the utils functions, after running open the 'index.html' file located inside the 'js-docs' folder.
preview.mp4
Afek Sakaju
- LinkedIn: @afeksa
- GitHub: @Afek-Sakaju