Hulian UIv0.93.5413 components0 components
  • Start
  • Components
  • Blocks
  • Pages
  • Demos
  • Changelog
ChineseEnglish
  • ComponentsComponents
  • ThemeTheme

Collections

  • QuestionCard
  • Table
  • Book3D
  • ProTable
  • PricingTable
  • JsonViewer
  • EditableTable
  • List
  • Descriptions
  • RowActions
  • Tree
  • Card
  • Carousel
  • Video
  • Audio
  • BentoGrid
  • Image
  • MagicCard
  • AnimatedList
  • Marquee
  • Sortable
  • Kanban
  • DesignCanvas
  • LayerTree
  • StageDraw
  • SlideDeck
  • PresenterView
  • ComponentPicker
  • EventStream
  • QueueLane
  • DocumentSheet
  • Novel reader
  • Scheduler
  • Org classroom
  • Danmaku
  • LiveChat
  • LivePlayer
  • LogViewer
  • FileTree
  • CodeReviewThread
  • VirtualList
  • InfiniteScroll
  • LogoLoop
  • BounceCards
  • CardSwap
  • ChromaGrid
  • CircularGallery
  • DomeGallery
  • FlyingPosters
  • InfiniteMenu
  • MagicBento
  • ScrollStack
  • ProfileCard
  • TiltedCard
  • PixelCard
  • DecayCard
  • ReflectiveCard
  • Folder

Charts and Diagrams

  • Flow
  • Diagram
  • Paper
  • SequenceDiagram
  • Sankey
  • Sparkline
  • Funnel
  • Treemap
  • Gantt
  • Heatmap
  • ContributionGraph
  • Legend
  • Chart
  • WorldMap

Information

  • ImageViewer
  • LiveProductCard
  • DiffStat
  • ScoreRing
  • ScoreScale
  • Badge
  • Dot
  • StatusDot
  • Chip
  • FilterChip
  • Coupon
  • Tag
  • Annotation
  • Avatar
  • AvatarCircles
  • User
  • QRCode
  • Comment
  • RelativeTime
  • GitCommit
  • DeployStatus
  • ShieldBadge
  • AwardBadge
  • CreditCard
  • IconTile

Metrics

  • Stat
  • Statistic
  • Meter
  • Timeline
  • NumberTicker

Placeholders

  • Empty
  • Skeleton
  • Watermark

Coupon

coupon

Displays discount value, conditions, validity, and claim or used state.

Usage

Coupon type

kind defines the offer: amount for money off, discount for a percentage discount, and shipping for free delivery.

¥50
Spend ¥299 to use
General discount coupons for the entire site
Supports all categories
Valid until 2026.06.30
15% off
Spend ¥199 to use
Digital exclusive discount coupon
Digital only 3C
Valid this week
Free shipping
No minimum spend
Nationwide free shipping coupon
Except for remote areas
Valid for a long time
tsx
<div className="grid max-w-md gap-3">
  <Coupon kind="amount" amount={50} threshold={299} title="Universal discount coupon for the entire site" scope="Supports all categories" validUntil="Valid before 2026.06.30" onClaim={() => {}} />
  <Coupon kind="discount" discount={8.5} threshold={199} tone="danger" title="Digital exclusive discount coupon" scope="Digital only 3C" validUntil="Valid within this week" onClaim={() => {}} />
  <Coupon kind="shipping" tone="neutral" title="Nationwide free shipping coupon" scope="Except for remote areas" validUntil="Long-term effective" onClaim={() => {}} />
</div>

Status transfer

status Driver operating area copy and gray: Available → Received and ready for use → Used / Expired.

¥20
Spend ¥99 to use
Available for collection
¥20
Spend ¥99 to use
Already received and ready for use
¥20
Spend ¥99 to use
Used
Used
¥20
Spend ¥99 to use
Expired
Expired
tsx
<div className="grid max-w-md gap-3">
  <Coupon kind="amount" amount={20} threshold={99} title="Can be collected" status="available" onClaim={() => {}} />
  <Coupon kind="amount" amount={20} threshold={99} title="Received and ready for use" status="claimed" onUse={() => {}} />
  <Coupon kind="amount" amount={20} threshold={99} title="Already used" status="used" />
  <Coupon kind="amount" amount={20} threshold={99} title="Expired" status="expired" />
</div>

Scanning guide

shine allows the denomination area to periodically pass through the highlight band to guide users to receive it; used/expired coupons are automatically not displayed.

¥50
Spend ¥299 to use
Limited time discount coupons
Supports all categories
Valid until 2026.06.30
tsx
<Coupon kind="amount" amount={50} threshold={299} title="Limited time discount coupon" scope="Supports all categories" validUntil="Valid before 2026.06.30" shine onClaim={() => {}} />

Settlement and Selection

Pass onSelect to make the entire coupon clickable, and selected to highlight ring for coupon selection on the settlement page.

¥30
Spend ¥199 to use
Settlement Selection (Selected)
Use now
10% off
No minimum spend
Settlement ticket selection (not selected)
Use now
tsx
<div className="grid max-w-md gap-3">
  <Coupon kind="amount" amount={30} threshold={199} title="Settlement Selection (Selected)" status="claimed" selected onSelect={() => {}} />
  <Coupon kind="discount" discount={9} threshold={0} title="Settlement Selection (Not Selected)" status="claimed" onSelect={() => {}} />
</div>

When to use

Use Coupon for a complete commerce voucher with value, eligibility, validity, claim, use, or selection actions. Use [[Badge]] or Tag for a simple textual state.

Import

ts
import { Coupon } from "@hulianui/ui"

Props

NameTypeDefaultDescription
kind"amount" | "discount" | "shipping" | "custom""amount"Amount-off, percentage discount, free shipping, or custom non-denomination privilege voucher.
amountnumber-Amount value for amount coupons.
discountnumber-Discount such as 8.5 for discount coupons.
thresholdnumber-Minimum spend; zero or omission means no threshold (omitted on kind="custom" hides the threshold line).
status"available" | "claimed" | "used" | "expired""available"Lifecycle state controlling action and disabled styling.
tone"brand" | "danger" | "neutral""brand"Color tone.
size"sm" | "md""md"Size.
shinebooleanfalseAnimated claim highlight, automatically off after use or expiry.
selectedboolean-Checkout selection ring.
showActionbooleantrue unless readOnlyControls whether the right-side action/status area is rendered.
readOnlybooleanfalseRead-only preview mode for admin configuration forms: hides the action area by default and disables interactive clicks/selection.
actionLabelstring-Overrides action text.
classNamestring-Root class.

Events

EventTypeDescription
onClaim() => voidAvailable-state action.
onUse() => voidClaimed-state action.
onSelect() => voidIndependent whole-coupon checkout selection.

Slots

SlotTypeDescription
title*ReactNodeCoupon title.
scopeReactNodeApplicable scope.
validUntilReactNodeValidity copy.
faceReactNodeCustom left-panel visual node rendered when kind="custom".
faceLabelReactNodePrimary text label in the left panel when kind="custom" and face is omitted.
faceSubLabelReactNodeSecondary sub-label in the left panel; overrides the default threshold text (pass null to hide).

Usage notes

  • Used and expired states disable actions and shine automatically.
  • Do not wrap the CSS ticket in overflow-hidden or its punched semicircles are clipped.
  • Claim, use, and select map to different states and click regions.
  • Built-in action, complete discount values, and eligibility labels follow ConfigProvider locale; for example, discount={8.5} uses the native Chinese discount notation by default and renders 15% off with enUS. actionLabel still has explicit precedence. Older dictionaries without formatDiscount safely use the complete Chinese fallback.

Related

Sparkline · ImageViewer · LiveProductCard · DiffStat · ScoreRing · Badge

Playground

¥50
Spend ¥299 to use
All tickets
Supports all categories
Valid until 2026.06.30
<Coupon kind="amount" amount={50} threshold={299} title="Universal coupon" status="available" onClaim={() => {}} />
PreviousFilterChipData DisplayNextTag

On this page

  • Usage
  • Documentation
    • When to use
    • Import
    • Props
    • Events
    • Slots
    • Usage notes
    • Related
  • Playground