MIT341 open-source React components

Catch the mistake before your users make it.

341 open-source MIT shadcn guards catch the extra zero, email typo, or risky agent action while there's still time to fix it.

Requires React 19 and Tailwind CSS v4.

acme.app/pay

A rent payment field with a usual amount of ₹24,000. Someone types ₹2,40,000; the amount input reads it back and asks “Extra zero?”, offering a one-tap fix to ₹24,000.

MIT LICENSESHADCN REGISTRY341 GUARD COMPONENTSNEXT.JSVITEREMIX

Playground

Try to break it.

Five real components, five classic mistakes. Make each one and watch the guard catch it, then copy the one you need.

The library

A guard for the moment that matters.

Swipe through real components from the registry.

Destructive actions

Type the exact target

Try it

Explore component

Recovery paths

Undo before it is final

Try it

Explore component

Payments

Catch a repeated charge

Try it

Explore component

India

Check the bank code

Try it

Explore component

India

Keep identity input clear

Try it

Explore component

Agent safety

Review pasted model output

Try it

Explore component

Messaging

Check the audience

Try it

Explore component

Payments

Read the amount back

Try it

Explore component

Sign-up

Catch a domain typo

Try it

Explore component

Agent safety

Keep secrets out of prompts

Try it

Explore component

Dev tools

Stop a risky query

Try it

Explore component

Scheduling

Check the date

Try it

Explore component

Sign-up

Check the phone number

Try it

Explore component

India

Check the UPI handle

Try it

Explore component

India

Check the PIN code

Try it

Explore component

Sign-in

Catch a pasted space

Try it

Explore component

Without vs with

Same form. One guard rail.

Validation checks that a value is allowed. Bollard checks that it's what the person meant. Flip the switch and send the same ₹2,40,000.

  • The amount is read back in words, the way a cheque would.
  • Ten times the usual rent asks “Extra zero?”
  • One tap fixes it before anything is sent.
Send moneyTo: Sunrise Apartments · usually ₹24,000

₹2,40,000Rupees Two Lakh Forty Thousand Only

That's 10× the usual ₹24,000. Extra zero?

Extra zero? Read the amount before sending.

Agent safety · human in the loop

A tool call can wait for a person.

The agent says “deploy the reviewed release.” The human sees the actual production command, risk, and undo path before choosing.

Explore agent safety
TOOL CALL · AWAITING HUMAN REVIEW
BashLow risk

Agent says“Deploy the reviewed release”

This willRuns deploy to prod.

deploy to prod
Reaches
Nothing
Undo
Nothing to undo
Production deployment held until a person reviews it.

Starter packs

One command per workflow.

Each pack installs the related guards together. Start with one, then add pieces from the catalog.

How it works

Two steps. Then it's your code.

Bollard works like shadcn/ui: source you own, styled by your Tailwind theme. Keeping your own inputs? Attach the headless field hook instead.

  1. 1

    Install the guard you need

    Run one shadcn command. @bollard is on the official registry index, so you don't edit components.json. Requires React 19 and Tailwind CSS v4.

  2. 2

    Use it like an input

    Keep your theme and change the copied source whenever you like.

  3. $

rent-field.tsx
import { AmountInput } from "@/components/ui/amount-input"

export function RentField() {
  return (
    <AmountInput
      label="Monthly rent"
      locale="en-IN"
      currency="INR"
      typical={24000} // 2,40,000 asks "Extra zero?"
    />
  )
}

Community

Open source, shaped in the open.

Browse the code, meet the people who contribute, or start with the person building Bollard UI.

Star Bollard UI on GitHub

Source, issues, and contributions.

Star on GitHub

Built by @devtushark

Follow the project’s maintainer.

Follow on X

FAQ

Questions, answered.

What is Bollard UI?

Bollard UI is a library of copy-paste React components that help prevent mistakes in forms and critical actions, plus a headless validation hook for your existing controls.

How do the guardrails prevent mistakes?

They make risky inputs and actions easier to review with clear readbacks, validation, pending states, confirmations and recovery paths. Your app still owns server-side validation and authorization.

Is it free?

Yes. Every component is MIT licensed, free for personal and commercial projects. Keep the license notice and do what you like with the code.

Does it need shadcn/ui?

It needs a shadcn setup, not shadcn's components. The CLI uses your Tailwind v4 theme and copies the code into your app.

How do I add a component?

Run its shadcn CLI command. The source is copied into your project, and any extra dependencies are listed for you.

Does it work with Next.js, Vite and Remix?

Yes. It targets React 19 and Tailwind v4 with TypeScript-friendly source, and components are safe to render on the server.

Can I customise it?

Yes. The copied source belongs to your app: edit its styles, behavior and copy to fit your product.

Put a guard rail where the mistake happens.

Start with one field. It takes a minute, and the code is yours.