Glob Input

Glob Input is a copy-paste React component that stops config glob silently misses files 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/glob-input
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

StopsConfig glob silently misses files

Was this component page useful?

How do I install Glob Input?

pnpm dlx shadcn@latest add @bollard/glob-input

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

How do I use Glob Input in React?

glob-input-usage.tsx
import { GlobInput } from "@/components/ui/glob-input"

return <GlobInput label="Lint these files" files={files} defaultValue="src/*.{ts,tsx} !**/*.test.*" />

What input mistakes does Glob Input catch?

  • Pattern that matches no files
  • Pattern that matches every file
  • * used where ** was needed, skipping subfolders
  • ** glued to a name (src/**.ts)
  • Leading ./ and Windows backslashes

What props does Glob Input accept?

GlobInput props
PropTypeDefault
files* (required)

The relative, "/"-separated paths the pattern runs against.

string[]—
label

Visible label.

string"Files to include"
value

Controlled pattern text. Several patterns are separated by spaces.

string—
defaultValue

Initial pattern when uncontrolled.

string""
onValueChange

Called with the text and the files it matches.

(value: string, matches: string[]) => void—
caseSensitive

Match letter case exactly, as Linux and git do.

booleantrue
messages

Override any of the default messages.

Partial<typeof GLOB_MESSAGES>—

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

How is Glob Input accessible?

  • Visible label tied to the input; input is described by the status
  • Status is a polite live region
  • Match list is a labelled list with icon labels ("matches"/"no match"), not colour alone
  • List animation is skipped under reduced motion

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

What are the limitations and server boundaries?

  • Its own matcher; tools such as webpack, tsconfig, git or picomatch differ on edge cases (negation, dotfiles, extglobs)
  • Only as accurate as the file list you pass in
  • Case-insensitive by default; set caseSensitive for Linux/git behaviour

What expensive mistakes does Glob Input stop?

Config glob silently misses files

Also known as

glob · file pattern · gitignore · include exclude · tsconfig · eslint · ci paths · wildcard

Field type

What dependencies does Glob Input require?

Glob Input facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameGlob Input
Registry identifier@bollard/glob-input
Install commandnpx shadcn@latest add @bollard/glob-input
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 Glob Input

What form validation mistake does Glob Input catch?

Glob Input prevents config glob silently misses files. Runs a config glob live against your real file list, so a pattern that silently misses files, or matches everything, shows up while you type. Catches: Pattern that matches no files, Pattern that matches every file, * used where ** was needed, skipping subfolders, ** glued to a name (src/**.ts), Leading ./ and Windows backslashes. Limitation: validate glob-input schemas on backend.

How do I install glob-input with shadcn?

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

What props customize Glob Input?

Glob Input accepts `files`, `label`, `value`, `defaultValue`, `onValueChange`. Configures glob, file pattern, gitignore behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of glob-input?

Its own matcher; tools such as webpack, tsconfig, git or picomatch differ on edge cases (negation, dotfiles, extglobs). Only as accurate as the file list you pass in. Case-insensitive by default; set caseSensitive for Linux/git behaviour Server requirement: backend verification for glob-input.

How does Glob Input meet accessibility guidelines?

Visible label tied to the input; input is described by the status. Status is a polite live region. Match list is a labelled list with icon labels ("matches"/"no match"), not colour alone. List animation is skipped under reduced motion. Minimizes errors: glob pattern not matching, star vs double star.

Which components pair with Glob Input?