qat

Card

Card. It is copied into your app’s ui/ by qatjs add card: the code is yours to edit.

Example

Saffron tea, 50 gHarvested in Bilgəh, packed this month.
7.90 ₼
Example.qx18 linesOpen in the playground
import Button from './ui/button/button.qx'
import Card from './ui/card/card.qx'

export default function Example() {
  return (
    <div class="example-grid">
      <Card
        title="Saffron tea, 50 g"
        description="Harvested in Bilgəh, packed this month."
        footer={(
          <span>7.90 ₼</span>
          <Button>Add to order</Button>
        )}
      />
      <Card title="Express delivery" description="Tomorrow before 12:00" href="#delivery" selected />
    </div>
  )
}

Add it

shell1 line
npx qatjs add card

Card

As a custom element: <ui-card>.

Card: props
PropTypeAttribute
titleQatNodeproperty only
descriptionQatNodeproperty only
mediaQatNodeproperty only
footerQatNodeproperty only
hrefQatHrefyes
selectedbooleanyes

Keys

KeyDoes
Tabone stop for a linked card