ProductList

apps/www/src/sections/ProductList.astro · 42 lines · group Models (product catalog)

ProductList — the catalog itself: one <Product> per row, the name, text and button on the left, the check-marked feature list and the picture on the right. Use for: a models page, a service catalog where every item deserves a paragraph and a list. Not for: the compact card teaser (<ProductCards>). Children: <Product> tags, one per row, divided by rules.

In the fleet

Used on 1 site built with this engine.

Samples 1

sample

ENTRY

Station N1

For a single field

Read more

  • Air and soil temperature
  • One season on a battery
  • Mounts on a standard post
  • SMS and e-mail alerts
Station N1
Station N1

ENTRY

Station N1

For a single field

  • Air and soil temperature
  • One season on a battery
  • Mounts on a standard post
  • SMS and e-mail alerts

Station N3

For several fields and a demanding crop

Read more

  • Leaf wetness and wind
  • Expansion port for extra sensors
  • Four kilometres to the gateway
  • Field-swappable sensors
Station N3
Station N3

Station N3

For several fields and a demanding crop

  • Leaf wetness and wind
  • Expansion port for extra sensors
  • Four kilometres to the gateway
  • Field-swappable sensors
MDX of this sample
<ProductList>
  <Product
    kicker="ENTRY"
    name="Station N1"
    description="For a single field"
    href="/stations/n1/"
    linkText="Read more"
    features={['Air and soil temperature', 'One season on a battery', 'Mounts on a standard post', 'SMS and e-mail alerts']}
    image="product-01.jpg"
  />
  <Product
    name="Station N3"
    description="For several fields and a demanding crop"
    href="/stations/n3/"
    linkText="Read more"
    features={['Leaf wetness and wind', 'Expansion port for extra sensors', 'Four kilometres to the gateway', 'Field-swappable sensors']}
    image="product-02.jpg"
  />
</ProductList>

Props

NameTypeRequiredDefaultDescription
idstringanchor of the section
kickerstringshort uppercase line above the title
titlestringthe section heading
descriptionstringa paragraph under the heading
theme'light' | 'muted' | 'dark' | 'brand' | 'brand-dark''light'background of the section

Source apps/www/src/sections/ProductList.astro @ gitt.one

---
/**
 * ProductList — the catalog itself: one <Product> per row, the name, text and
 *   button on the left, the check-marked feature list and the picture on the
 *   right.
 *
 * Use for: a models page, a service catalog where every item deserves a
 *   paragraph and a list.
 * Not for: the compact card teaser (<ProductCards>).
 * Children: <Product> tags, one per row, divided by rules.
 */
import Section from './_Section.astro';
import type { Theme } from './_Section.astro';

interface Props {
  /** anchor of the section */
  id?: string;
  /** short uppercase line above the title */
  kicker?: string;
  /** the section heading */
  title?: string;
  /** a paragraph under the heading */
  description?: string;
  /** background of the section */
  theme?: Theme;
}
const { id, kicker, title, description, theme = 'light' } = Astro.props;
---

<Section id={id} theme={theme}>
  {(kicker || title || description) && (
    <div class="mx-auto max-w-4xl text-center">
      {kicker && <p class="text-base font-semibold uppercase tracking-wider text-primary-600">{kicker}</p>}
      {title && <h2 class="mt-2 text-3xl font-extrabold sm:text-4xl">{title}</h2>}
      {description && <p class="mt-3 text-xl text-gray-500">{description}</p>}
    </div>
  )}
  <div class="mt-4 divide-y divide-gray-200" data-variant="list">
    <slot />
  </div>
</Section>

Source links point to engine-astro@7b686388. Samples are demo content: the components are the real ones, the copy and the pictures are made up.