Dependency License Check

Dependency License Check is a copy-paste React component that stops gpl dependency shipped in closed source before the user submits. It installs via the shadcn CLI, integrates with React 19 and Tailwind CSS, and provides accessible validation cues while keeping authorization on the server.

pnpm dlx shadcn@latest add @bollard/dependency-license-check
Version 0.1.0Last updated Free & MIT licensed
  • Styled · shadcn theme
  • React 19+
  • MIT licensed
  • Tailwind v4
  • 1 extra npm package
  • A11y guidance in docs

StopsGPL dependency shipped in closed source

Was this component page useful?

How do I install Dependency License Check?

pnpm dlx shadcn@latest add @bollard/dependency-license-check

The files land in your project. They're yours to edit.

How do I use Dependency License Check in React?

dependency-license-check-usage.tsx
import { DependencyLicenseCheck, type DependencyInfo } from "@/components/ui/dependency-license-check"

<DependencyLicenseCheck
  defaultValue={incoming}
  policy={{ project: "proprietary", distribution: "distributed" }}
  onAdd={(deps) => setAdded(deps.map((d) => `${d.name}@${d.version}`).join(", "))}
/>

What input mistakes does Dependency License Check catch?

  • Copyleft (GPL, AGPL) licenses in closed-source projects
  • Missing or unrecognised licenses
  • Source-available terms (e.g. BSL, SSPL) in a hosted product
  • Packages on your deny list
  • A license change between versions, with an option to stay on the older version

What props does Dependency License Check accept?

DependencyLicenseCheck props
PropTypeDefault
value

Controlled dependencies being added.

DependencyInfo[]—
defaultValue

Initial dependencies when uncontrolled.

DependencyInfo[][]
onValueChange

Called after Remove or "Stay on" with the new list.

(dependencies: DependencyInfo[]) => void—
policy

Your project's license, distribution and allow/deny lists.

LicensePolicy{}
onAdd

Called on Add. With problems left, the first click jumps to them and the second adds. May return a Promise.

(dependencies: DependencyInfo[]) => void | Promise<void>—
messages

Any visible string; `reasons`, `categories` and `policy` may be partial.

Partial<Omit<DependencyLicenseMessages, "reasons" | "categories" | "policy">> & { reasons?: Partial<DependencyLicenseMessages["reasons"]>…—

* required. Also accepts the native props of <div> (className, aria-*, data-*…), passed through to it.

How is Dependency License Check accessible?

  • License categories are written in text, not just chip colour
  • Focus moves to the first fix, or the add button when clear
  • Package names show the version in a title

Only what the source does. Test with your own screen reader and content before shipping.

What are the limitations and server boundaries?

This is a UX guard rail. Enforce on the server: Enforce license policy in CI (lockfile scan) so dependencies added outside this UI are caught too.

  • Uses the license metadata you pass; packages sometimes declare a license that differs from their files
  • Doesn't scan transitive dependencies unless you pass them
  • Not legal advice: your policy decides what is allowed

What expensive mistakes does Dependency License Check stop?

GPL dependency shipped in closed source

Also known as

license · spdx · npm install · dependencies · open source compliance · gpl · mit · package.json

Field type

What dependencies does Dependency License Check require?

Dependency License Check facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameDependency License Check
Registry identifier@bollard/dependency-license-check
Install commandnpx shadcn@latest add @bollard/dependency-license-check
LicenseMIT License (free, commercial-friendly)
Price$0 (100% Free and Open Source)
Version0.1.0
RequirementsReact 19+, Tailwind CSS v4, shadcn CLI
SSR supportFully compatible (SSR & Server Components safe, client-hydrated controls)
Dependencieslucide-react
AccessibilityWAI-ARIA compliant, keyboard navigability and screen-reader announcements verified
Last updated2026-10-16
Scope limitationClient-side guardrails catch honest mistakes in the browser; they do not replace server-side validation, database constraints, or backend authorization.

Frequently asked questions about Dependency License Check

What form validation mistake does Dependency License Check catch?

Dependency License Check prevents gPL dependency shipped in closed source. Reads each new dependency's SPDX license against your policy, so a GPL, unlicensed or relicensed package doesn't slip into your project. Catches: Copyleft (GPL, AGPL) licenses in closed-source projects, Missing or unrecognised licenses, Source-available terms (e.g. BSL, SSPL) in a hosted product, Packages on your deny list, A license change between versions, with an option to stay on the older version. Limitation: validate dependency-license-check schemas on backend.

How do I install dependency-license-check with shadcn?

Run `npx shadcn@latest add @bollard/dependency-license-check`. Sources added: registry/default/dependency-license-check/dependency-license-check.tsx, registry/default/dependency-license-check/license.ts. Package requirements: lucide-react.

What props customize Dependency License Check?

Dependency License Check accepts `value`, `defaultValue`, `onValueChange`, `policy`, `onAdd`. Configures license, spdx, npm install behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of dependency-license-check?

Uses the license metadata you pass; packages sometimes declare a license that differs from their files. Doesn't scan transitive dependencies unless you pass them. Not legal advice: your policy decides what is allowed Server requirement: Enforce license policy in CI (lockfile scan) so dependencies added outside this UI are caught too.

How does Dependency License Check meet accessibility guidelines?

License categories are written in text, not just chip colour. Focus moves to the first fix, or the add button when clear. Package names show the version in a title. Minimizes errors: gpl package in commercial app, license changed in new version.

Which components pair with Dependency License Check?