Quantity

Number input for incrementing whole numbers

yarn add q3-components

Quantity is used extensively in the q3-ui-cart package. For more examples, I'd suggest taking a look at the repository.

MyQuantity.jsx
import React from 'react';
import { Quantity } from 'q3-components';

export default () => (
    <Quantity variant="spread" size="small"> 
        {(quantity, reset) => null}
    </Quantity>
);

Props

Prop

Type

Description

size

string

Use either "small" or "large"; it defaults to "regular"

variant

string

Use either "spread" or "stacked" to control the toggle display

Last updated