# Cart Coupon Code Accordion

> Collapsible coupon-code input inside the cart.

## Playground

An interactive playground for CartCouponCodeAccordion is embedded above. Open the canonical story on Storybook: [https://storybook.laioutr.cloud/?path=/story/ui-blocks-cartcouponcodeaccordion--default](https://storybook.laioutr.cloud/?path=/story/ui-blocks-cartcouponcodeaccordion--default)

## Overview

`CartCouponCodeAccordion` is the collapsible coupon-code input shown inside the cart. It keeps the input out of sight until a shopper expands it, then exposes a single field with an apply button. Props are `couponCode?: string` (an optional initial value) and `disabled?: boolean`. The component emits `applyCouponCode` with the submitted code string; the parent owns the apply call, validation, and any feedback. The standalone input primitive is `CartCouponCodeAccordionInput`; reach for it when you need just the field without the accordion wrapper.

Active codes themselves render in [`CartSummaryBox`](/laioutr-ui/shop/cart/cart-summary-box), which exposes a remove control via its `removeDiscount` emit.

Auto-import tag: `<LCartCouponCodeAccordion>`.

## Key Business & UX Benefits

- Tucks the coupon input behind an accordion so promo hunters can find it while regular shoppers stay focused on checkout.
- A single `applyCouponCode` emit keeps validation and cart mutations in your store, so feedback matches your backend exactly.
- The `disabled` prop lets the parent lock the input during an in-flight apply call without re-rendering the accordion.
- Reusable input primitive lets you place coupon entry on cart, checkout, or any custom flow without duplicating field logic.

## Feature List

<features :items="["Collapsed by default so the coupon entry stays out of the way of shoppers who arrived without a code","applyCouponCode emit fires with the submitted code so the parent owns the cart mutation and any feedback","Optional couponCode prop seeds the input, useful for restoring a code that has not been applied yet","disabled prop lets the parent lock the input during an in-flight apply call","Standalone CartCouponCodeAccordionInput primitive available when you need just the field outside the accordion shell"]">



</features>

### LCartCouponCodeAccordion

#### Props

```json
{"type":"object","properties":{"couponCode":{"type":"string","default":""},"disabled":{"type":"boolean","default":false}}}
```

#### Events

```json
[{"name":"applyCouponCode","description":"","tags":[],"type":"[code: string]","signature":"(event: \"applyCouponCode\", code: string): void","schema":["string"]}]
```

### LCartCouponCodeAccordionInput

#### Props

```json
{"type":"object","properties":{"name":{"type":"string"},"modelValue":{"type":"string"}}}
```

#### Events

```json
[{"name":"update:modelValue","description":"","tags":[],"type":"[value: string | undefined]","signature":"(event: \"update:modelValue\", value: string | undefined): void","schema":[{"kind":"enum","type":"string | undefined","schema":["undefined","string"]}]}]
```
