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

vueform-plugin-checkbox-select-all

v1.0.3

Published

Bi-directional Select All logic for Vueform's Checkbox and Checkboxgroup elements

Downloads

320

Readme

Vueform Select All Checkboxes Plugin

This plugin enables complex "Select All" logic for Vueform. It handles bi-directional synchronization (Parent <--> Child) and prevents infinite loops using an internal locking mechanism. It supports standard checkboxes, checkbox groups, and nested structures.

📦 Installation

1. Install via NPM

Run the following command in your project root:

npm install vueform-plugin-checkbox-select-all

2. Register in vueform.config.js

Import the plugin and add it to the plugins array in your Vueform configuration file.

// vueform.config.js
import en from "@vueform/vueform/locales/en";
import vueform from "@vueform/vueform/dist/vueform";
import { defineConfig } from "@vueform/vueform";
import "@vueform/vueform/dist/vueform.css";

// 1. Import the custom plugin
import CheckboxSelectAll from "vueform-plugin-checkbox-select-all";

export default defineConfig({
  theme: vueform,
  locales: { en },
  locale: "en",

  // 2. Add it to the plugins array
  plugins: [CheckboxSelectAll],
});

⚙️ Configuration & Concepts

To set up the logic, you only need to configure three properties in your schema.

A. Downstream (Parent $\rightarrow$ Children)

Used on the Parent (Controller). When the parent is clicked, it forces all defined children to match its state.

  • Prop: controls
  • Type: Array<String>
  • Value: A list of full paths to the child elements.

B. Upstream (Child $\rightarrow$ Parent)

Used on the Child (Controlled). When a child is changed, it checks if all its siblings are selected. If yes, it checks the parent. If no, it unchecks the parent.

  • Prop: controller
  • Type: String
  • Value: The full path to the parent element.

C. Internal Group "All"

Used strictly inside a checkboxgroup. It designates one specific option within the items array as the "Select All" for that specific group.

  • Prop: groupController
  • Type: Boolean
  • Value: true
  • Location: Inside an object in the items array.

🚀 Usage Examples

Example 1: Standard Checkbox Controlling Others

A standalone "Select All" checkbox controlling separate checkbox elements.

{
  // 1. The Parent
  selectAll: {
    type: 'checkbox',
    text: 'Select All',
    // Tell parent who to control (Downstream)
    // NOTE: Must be the full path to find the element via form$.el(fullPath)
    controls: ['container.option1', 'container.option2']
  },
  container: {
    type: 'group',
    schema: {
      // 2. The Children
      option1: {
        type: 'checkbox',
        text: 'Option 1',
        // Tell child who controls it (Upstream)
        controller: 'selectAll'
      },
      option2: {
        type: 'checkbox',
        text: 'Option 2',
        // Tell child who controls it (Upstream)
        controller: 'selectAll'
      }
    }
  }
}

Example 2: Parent Controlling a CheckboxGroup

A standalone checkbox controlling a whole group list.

{
  // 1. The Parent
  selectAll: {
    type: 'checkbox',
    controls: ['myGroup'] // Points to the group element
  },

  // 2. The Child (Group)
  myGroup: {
    type: 'checkboxgroup',
    controller: 'selectAll', // Points back to parent
    items: [
      { value: 'a', label: 'A' },
      { value: 'b', label: 'B' }
    ]
  }
}

Example 3: CheckboxGroup with Internal "Select All"

A group that contains its own "All" option inside the list.

{
  myGroup: {
    type: 'checkboxgroup',
    items: [
      // 1. The Internal Controller
      {
        value: 'all',
        label: 'Select All',
        groupController: true // <--- The Magic Prop
      },
      // 2. The Siblings
      { value: 'a', label: 'Item A' },
      { value: 'b', label: 'Item B' }
    ]
  }
}

Example 4: Complex Nested Structure

A group that contains its own "All" option inside the list, and a main checkbox controlling the group.

{
  selectAllText: {
    type: "static",
    tag: "p",
    content: "<div>Select Fields to be Exported</div>",
    columns: { container: 9 },
  },

  // --- MAIN CONTROLLER ---
  selectAll: {
    type: "checkbox",
    text: "All Fields",
    columns: { container: 3 },
    align: "left",
    // EXTERNAL CONTROL: Controls the two groups
    controls: [
      "container.reqDetailsCheckboxes",
      "container.reqFieldsCheckboxes",
    ],
  },

  container: {
    type: "group",
    class: "dimBackground_50 scrollable",
    schema: {
      reqDetailsLabel: {
        type: "static",
        tag: "p",
        content: "<p>Requisition Details</p>",
      },

      // --- GROUP 1 ---
      reqDetailsCheckboxes: {
        type: "checkboxgroup",
        class: "flex-container",
        // EXTERNAL LINK: Points to Main Controller
        controller: "selectAll",
        items: [
          {
            // INTERNAL CONTROL: Marks this as the group's "All" button
            value: "0",
            label: "All",
            groupController: true,
          },
          { value: "1", label: "Requisition ID" },
          { value: "2", label: "Date Created" },
        ],
      },

      reqFieldsLabel: {
        type: "static",
        tag: "p",
        content: "<p>Requisition Fields</p>",
      },

      // --- GROUP 2 ---
      reqFieldsCheckboxes: {
        type: "checkboxgroup",
        class: "flex-container",
        // EXTERNAL LINK: Points to Main Controller
        controller: "selectAll",
        items: [
          {
            // INTERNAL CONTROL
            value: "0",
            label: "All",
            groupController: true,
          },
          { value: "1", label: "Field ID" },
          { value: "2", label: "Field Created" },
        ],
      },
    },
  },

  saveSelections: {
    type: "checkbox",
    text: "Save My Selections",
  },
}