Add to cart

A stateful add-to-cart button.

Custom labels

Sizes

API reference

Inputs

PropTypeDefaultDescription
labelstring'Add to cart'Button text shown in the idle and adding states.
addedLabelstring'Added'Button text shown briefly in the added (success) state.
sizeAddToCartSize'default'Size preset controlling height and padding.

Outputs

EventPayloadDescription
triggeredvoidEmitted when the button is clicked to add the item.

Types

AddToCartSize — Size preset controlling button height and padding.

"default" | "lg" | "sm"

Every ng-blatui component also accepts a class input to merge extra Tailwind classes onto the host.