SearchCtrlK

  • ↑↓navigate
  • ↵open
  • escclose

Can’t find it? Contact us

PriceList

A menu or price list for a landing.

Bread

From 7 am until it runs out

  • Country sourdough$9Two-day ferment, big and crackly.
  • Seeded rye$10Sunflower, flax and pumpkin seeds.

Pastry

From 7 am

  • Butter croissant$4.25Three days from dough to plate.
  • Cardamom bun$4.50Our most-asked-for bake.
View code
tsx
<PriceList>
	<PriceList.Group title="Bread" description="From 7 am until it runs out">
		<PriceList.Item name="Country sourdough" price="$9">
			Two-day ferment, big and crackly.
		</PriceList.Item>
		<PriceList.Item name="Seeded rye" price="$10">
			Sunflower, flax and pumpkin seeds.
		</PriceList.Item>
	</PriceList.Group>
	<PriceList.Group title="Pastry" description="From 7 am">
		<PriceList.Item name="Butter croissant" price="$4.25">
			Three days from dough to plate.
		</PriceList.Item>
		<PriceList.Item name="Cardamom bun" price="$4.50">
			Our most-asked-for bake.
		</PriceList.Item>
	</PriceList.Group>
</PriceList>

Demo landings

Whole pages built only from @sdxc/ui, each for an invented product with its own palette and type. They open in a new tab.

Every demo, landings and docs sites alike, is listed in the demo gallery.

Installation

An ordinary dependency: install it, import the theme once, and import the component where it is used.

Terminal
npm add @sdxc/ui remix
typescript
import "@sdxc/ui/theme.css";

Usage

typescript
import { PriceList } from "@sdxc/ui/landing";

Lays its groups into columns that each stay at least columnWidth wide, starting every group at the top of its cell so a short group keeps its own height. Server markup and CSS alone; group titles rule off in --ui-landing-hairline, set in --ui-landing-display-weight.

Composition

The parts the component publishes, each a static property of the host.

  • PriceList
  • PriceList.GroupOne named group: its heading, an optional line under it, then the items as a list.
  • PriceList.ItemOne item: the name and the price on a shared baseline with a dotted leader filling the gap, and the description under them.

Props

Read from the component's own types, so every prop, every default and every allowed value is listed.

PropTypeRequiredDescription
columnWidthstringNoNarrowest a column gets, as a CSS length; the list fits as many columns as clear it.
childrenRemixNodeYesOne or more PriceList.Group elements.

Also accepts everything in TagProps<"div">.

PriceList.Group

PropTypeRequiredDescription
titleRemixNodeYesThe group's name, rendered as a heading at the ambient level.
descriptionRemixNodeNoA line under the title, such as when the group is served.
childrenRemixNodeYesOne or more PriceList.Item elements.

Also accepts everything in Omit<TagProps<"div">, "title">.

PriceList.Item

PropTypeRequiredDescription
nameRemixNodeYesWhat the item is called.
priceRemixNodeYesThe price as the reader should see it, currency included.
childrenRemixNodeNoA short line under the name: what is in it, or how it is sold.

Also accepts everything in Omit<TagProps<"li">, "children">.

@sdxc/ui

Can’t find it? Contact us