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

@phila/phila-ui-checkbox

v1.0.1

Published

A checkbox input.

Readme

Checkbox Component

Component Status

| Component | Status | | ------------- | ----------------------------------------------------------- | | Checkbox | Stable | | CheckboxGroup | Stable |

Multi-select checkbox components for Phila UI. Use Checkbox for a standalone checkbox, or CheckboxGroup to manage a set of related options with a shared label, description, and error state.

Installation

pnpm add @phila/phila-ui-checkbox @phila/phila-ui-core
# or
npm install @phila/phila-ui-checkbox @phila/phila-ui-core

Import core styles in your main entry file (e.g., main.js|ts):

import "@phila/phila-ui-core/styles/template-light.css";

Usage

CheckboxGroup (recommended)

CheckboxGroup's modelValue is a map of choice value → checked, not an array — every choice gets a key, so the shape is stable regardless of which options have been touched:

<script setup lang="ts">
import { CheckboxGroup } from "@phila/phila-ui-checkbox";
import { ref } from "vue";

const modelValue = ref<Record<string, boolean>>({});
const choices = [
  { text: "Option A", value: "a" },
  { text: "Option B", value: "b" },
  { text: "Option C", value: "c", tooltip: "Extra context about Option C shown on hover." },
];
</script>

<template>
  <CheckboxGroup
    groupLabel="Choose all that apply"
    description="Select one or more options."
    :choices="choices"
    v-model="modelValue"
  />
</template>

Checkbox (standalone — boolean)

<script setup lang="ts">
import { Checkbox } from "@phila/phila-ui-checkbox";
import { ref } from "vue";

const agreed = ref(false);
</script>

<template>
  <Checkbox text="I agree to the terms" v-model="agreed" />
</template>

Checkbox (standalone — array)

When multiple checkboxes share the same array, each one adds or removes its value from the array:

<script setup lang="ts">
import { Checkbox } from "@phila/phila-ui-checkbox";
import { ref } from "vue";

const selected = ref<string[]>([]);
</script>

<template>
  <Checkbox text="Option A" value="a" v-model="selected" />
  <Checkbox text="Option B" value="b" v-model="selected" />
</template>

Indeterminate and tooltip

<Checkbox text="Select all" :indeterminate="true" v-model="someSelected" />
<Checkbox text="Option with help" tooltip="Extra context shown on hover." v-model="agreed" />

Checkbox Props

| Prop | Type | Default | Description | | --------------- | ----------------------------------------------- | ------- | ----------------------------------------------------------------------------------------------------- | | text | string | — | Label text displayed next to the checkbox | | modelValue | boolean \| Array<string \| number \| boolean> | — | Bound value. Pass a boolean for a single checkbox; pass an array when multiple checkboxes share state | | value | string \| number \| boolean | — | The value added to / removed from the array when using array mode | | name | string | — | HTML name attribute | | disabled | boolean | false | Disables the checkbox | | error | boolean | false | Applies error styling | | indeterminate | boolean | false | Renders the native indeterminate visual state (e.g. a "select all" checkbox with a partial selection) | | tooltip | string | — | Shows an info icon next to the label that reveals this text on hover | | className | string | — | Additional CSS classes |

CheckboxGroup Props

| Prop | Type | Default | Description | | -------------- | -------------------------------------------------------------------------- | ------- | ---------------------------------------------------------------- | | groupLabel | string | — | Label displayed above the group | | description | string | — | Optional helper text below the label | | choices | { text: string, value: string \| number \| boolean, tooltip?: string }[] | — | Array of options to render | | modelValue | Record<string, boolean> | — | Map of choice value (stringified) → checked (use with v-model) | | error | boolean | false | Applies error styling to the group | | errorMessage | string | — | Error message shown below the options when error is true | | disabled | boolean | false | Disables all checkboxes in the group | | className | string | — | Additional CSS classes |

Events

Checkbox

| Event | Payload | Description | | ------------------- | ----------------------------------------------- | ---------------------------------------- | | update:modelValue | boolean \| Array<string \| number \| boolean> | Emitted when the checkbox is toggled | | change | Event | Native change event | | focus | FocusEvent | Emitted when the checkbox receives focus | | blur | FocusEvent | Emitted when the checkbox loses focus |

CheckboxGroup

| Event | Payload | Description | | ------------------- | ------------------------- | ---------------------------------------------------------------- | | update:modelValue | Record<string, boolean> | Emitted with the full updated map whenever any choice is toggled |

Visual States

| State | Description | | ------------------ | ---------------------------------------------- | | Default | Gray border, white background | | Hover | Primary-colored border (2px) | | Checked | Primary fill with white checkmark | | Focus | Primary-colored outline (2px) around the label | | Error | Error-colored border (2px) | | Disabled | Muted border and text, not interactive | | Disabled + Checked | Muted fill with white checkmark |

Development

Install Dependencies

pnpm install

Run Demo

pnpm dev

Run lint

pnpm lint

Create Production Build

pnpm build

Publishing to NPM

Follow the release instructions using changesets.

License

MIT