SearchCtrlK

  • ↑↓navigate
  • ↵open
  • escclose

Can’t find it? Contact us

PostStream

A list of posts ruled into sections, such as months or years, whose headings stick to the top of the viewport while their section scrolls past.

November 2026

October 2026

View code
tsx
import { PostEntry, PostStream } from "@sdxc/ui/blog";

<HeadingScope level={2}>
	<PostStream>
		{months.map((month) => (
			<PostStream.Section id={month.id}>
				<PostStream.Heading>{month.label}</PostStream.Heading>
				{month.posts.map((post) => (
					<PostEntry layout="margin">
						<PostEntry.Kind>{post.kind}</PostEntry.Kind>
						<PostEntry.Title>
							<PostEntry.TitleLink href={post.href}>{post.title}</PostEntry.TitleLink>
						</PostEntry.Title>
						<PostEntry.Lead>{post.lead}</PostEntry.Lead>
					</PostEntry>
				))}
			</PostStream.Section>
		))}
	</PostStream>
</HeadingScope>

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

Renders the stream as a column. Entries placed directly inside are divided by hairlines; PostStream.Section children group them under headings instead. Headings stick under --ui-post-stream-offset, which a page with a sticky bar sets to its height; the rest of PostStream.CustomProperties restyle headings and hairlines.

Composition

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

  • PostStream
  • PostStream.SectionA headed group of entries, named by its PostStream.Heading.
  • PostStream.HeadingA section's label at the section's heading level, sticking to the top for as long as its section is on screen, on the page's background, so entries scroll under it.

Examples

tsx
<PostStream>{posts.map((post) => <PostEntry>…</PostEntry>)}</PostStream>

Props

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

Also accepts everything in TagProps<"div">.

PostStream.Section

Also accepts everything in TagProps<"section">.

PostStream.Heading

Also accepts everything in TagProps<"h2">.

@sdxc/ui

Can’t find it? Contact us