Coupon Input

Promo code field with an Apply button and inline success or error messages. The demo validation is easy to replace with your own check in React.

src/registry/ui/coupon-input.tsx/r/coupon-input.json

Installation#

bash
npx shadcn@latest add @minidev/coupon-input

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/coupon-input.json

Usage#

tsx
import { CouponInput } from "@/components/ui/coupon-input"

export function Example() {
  return <CouponInput />
}

API reference#

CouponInput props
PropTypeDefault
classNamestring-

Dependencies#

npm

React only

Built from

All e-commerce components