Skip to content

Coupon Card

Standard component for displaying coupon information. It supports cutout variants, status display, optional selection mode, and e-commerce style badge, progress, and rules sections.

Basic Usage

Displays core coupon info. Supports circle (default), indent, and scallop variants.

¥50
Min spend 500
Store-wide Coupon
Applicable to all items
Basic Usage

Status Management

Supports available, used, expired, and locked states.

¥100
Min spend 1000
Used Coupon
Used
¥20
Min spend 200
Expired Coupon
Expired
States

Selection Mode

Enable selectable mode for checkout pages using v-model:selected.

¥30
Min spend 300
Selectable Coupon

Selected: No

Selectable Mode

Advanced Features

Enhanced features for modern e-commerce scenarios: badges, progress bars, and rules drawer.

¥100
Min spend 1000
Flash Double
Special
¥50
No Threshold
Limited Subsidy
Claimed 85%
¥30
Min spend 300
Super VIP Coupon
Usage Rules
Advanced Features

Usage in Nuxt

YhCouponCard works directly in Nuxt 3/4 projects. When yh-ui/nuxt is enabled, the component can be used without manual registration.

¥10
No threshold
Nuxt Coupon
Nuxt Integration
## API

Props

PropertyDescriptionTypeDefault
titleCoupon titlestring''
descriptionDescription textstring''
amountAmount valuestring | number''
symbolCurrency symbolstring'¥'
thresholdMinimum spendstring | number''
valid-periodValidity periodstring''
statusState'available' | 'used' | 'expired' | 'locked''available'
variantCutout variant'circle' | 'indent' | 'scallop''circle'
selectableEnable selectable modebooleanfalse
selectedSelected state (v-model)booleanfalse
action-textAction button textstring''
badgeBadge textstring''
badge-typeBadge color type'danger' | 'warning' | 'primary' | 'success''danger'
percentProgress percentage (0-100)numberundefined
percent-textTip text near progress barstring''
rulesUsage rules text at bottomstring''
rule-titleCustom title for rules sectionstring''
disabledWhether disabled styling is appliedbooleanfalse
theme-overridesTheme variable overridesRecord<string, string>{}

Events

Event NameDescriptionParameters
clickFired when card is clicked(e: MouseEvent) => void
actionFired when button is clicked(e: MouseEvent) => void
update:selectedSelected state change event(val: boolean) => void

Slots

SlotDescriptionParameters
titleCustom coupon title-
descriptionCustom description area-
actionCustom action area-
badgeCustom badge content-
sealCustom status seal{ status: CouponStatus }
rulesCustom rules section-

Expose

This component does not expose public instance methods or properties.

Theme Variables

VariableDescriptionDefault
--yh-coupon-bgCard background colorvar(--yh-bg-color-overlay)
--yh-coupon-primary-colorAccent color (amount/button)var(--yh-color-primary)
--yh-coupon-amount-sizeAmount font size28px

Type Exports

NameDescription
YhCouponCardPropsComponent props type
YhCouponCardEmitsComponent emits type
YhCouponCardSlotsComponent slots type
YhCouponStatusCoupon status union type
YhCouponCardInstanceComponent instance type

Released under the MIT License.