SearchCtrlK

  • ↑↓navigate
  • ↵open
  • escclose

Can’t find it? Contact us

Curriculum

A course or book curriculum.

Open in a new tab
View code
tsx
<Curriculum
	summary={
		<StatStrip>
			<StatStrip.Item label="Chapters">12</StatStrip.Item>
			<StatStrip.Item label="Pages">286</StatStrip.Item>
			<StatStrip.Item label="Videos">18</StatStrip.Item>
			<StatStrip.Item label="Hours of video">4.5</StatStrip.Item>
		</StatStrip>
	}
>
	<Curriculum.Part title="Foundations" meta="4 chapters · 86 pages">
		<Curriculum.Lesson number="01" title="Why type is code" meta="18 pages" badge="Free">
			<CheckList>
				<CheckRow>Glyphs, fonts and the files that carry them</CheckRow>
				<CheckRow>What a browser does between bytes and pixels</CheckRow>
			</CheckList>
			<Link href="/sample.pdf">Read the chapter</Link>
		</Curriculum.Lesson>
		<Curriculum.Lesson number="02" title="The measure" meta="22 pages" />
		…
	</Curriculum.Part>
	<Curriculum.Part title="Systems" meta="4 chapters · 104 pages">…</Curriculum.Part>
	<Curriculum.Part title="Shipping" meta="4 chapters · 96 pages">…</Curriculum.Part>
</Curriculum>

<Curriculum layout="stack">…</Curriculum>

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 { Curriculum } from "@sdxc/ui/landing";

Lays the optional summary over the parts, and opens a heading scope so part titles sit one level under the band's title.

Composition

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

  • Curriculum
  • Curriculum.PartOne part: its title and totals over a ruled list of lessons.
  • Curriculum.LessonOne lesson as a native disclosure row: the summary shows the chevron, number, title, badge and meta; the children open under the title and the chevron turns while open.

Props

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

PropTypeRequiredDescription
layout"columns" | "stack"NoArrangement. Defaults to DEFAULT_LAYOUT.
summaryRemixNodeNoTotals above the parts, such as a StatStrip of chapters, pages and hours.
childrenRemixNodeYesCurriculum.Part children.

Also accepts everything in TagProps<"div">.

Curriculum.Part

PropTypeRequiredDescription
titleRemixNodeYesThe part's title, rendered as a heading at the ambient depth.
metaRemixNodeNoThe part's totals, such as "5 chapters · 112 pages".
childrenRemixNodeYesCurriculum.Lesson children.

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

Curriculum.Lesson

PropTypeRequiredDescription
numberRemixNodeYesThe lesson's number as shown, such as "01".
titleRemixNodeYesThe lesson's title.
metaRemixNodeNoLength at the row's inline end, such as "18 pages" or "12 min".
badgeRemixNodeNoA short flag after the title, such as "Free" or "Preview", drawn as a Badge.
openbooleanNoStarts the lesson expanded.
childrenRemixNodeNoWhat opens under the row: subtopics, usually a CheckList, and a preview link. Without children the row is static and draws no chevron.

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

Types

NameValuesWhat it decides
Layout"columns" | "stack"How parts sit: side by side from the lg container (columns), or one under the other at every width (stack) for a course with many or long parts.
@sdxc/ui

Can’t find it? Contact us