You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

js-helper-functions

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-helper-functions

A customizable checklist component that supports grouped categories of items.

2.0.3
Source
npmnpm
Version published
Weekly downloads
10
-61.54%
Maintainers
1
Weekly downloads
 
Created
Source

ChecklistComponent

A customizable checklist component that supports grouped categories of items.

🛠 Tailwind CSS Setup

⚠️ This component library uses Tailwind CSS utility classes but does not include TailwindCSS by default.
You must have TailwindCSS configured in your own project for styles to apply correctly.

🛠 Tailwind Setup

To use this component library with Tailwind, add the following to your tailwind.config.js:

module.exports = {
  content: [
    "./src/**/*.{js,jsx,ts,tsx}",
    "./node_modules/tailwind-categorized-checklist/**/*.{js,jsx}",
  ],
  // other config...
};

Data Structure

The categoryList prop should follow a recursive Record<string, CategoryList | string[]> format, allowing unlimited levels of nesting.

Example:

const categoryList = {
  Home: {
    "Home Care Data": {
      "Property Data": ["Property Name", "Move in date", "Address"],
    },
    "Home Maintenance Data": {
      Bathroom: ["Install Bathtub", "Install Drainage"],
    },
  },
  "User Content": {
    Images: ["Portraits", "Animals"],
    Videos: ["Short-Form Videos", "Tutorials"],
  },
};

Category Type

type CategoryList = {
  [category: string]: CategoryList | string[];
};

Props

Prop NameTypeRequiredDefaultDescription
categoryListRecord<string, string[]>The nested structure of categories and items to render in the checklist.
onSelectionChange(data: any) => voidundefinedCallback fired when selected checklist items change.
showSelectedItemsListbooleanfalseIf true, displays a list of selected items separately.
showCountBadgesbooleanfalseIf true, shows count badges next to categories indicating selection count.

Keywords

react

FAQs

Package last updated on 16 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts