Section

@sushindustries/ui

Kicker, heading and body, revealing top-down with an 80ms offset.

4 min read
View as MarkdownEdit on GitHub

Examples are the tab where the component is shown doing a job, not demonstrating a prop. The API tab already lists the props.

Viewport width
Phone22remthe floor, the narrowest this promises to work at
tanstacktanstack add https://adamjurek.com/r/tanstack/section.jsonshadcnpnpm dlx shadcn@latest add https://adamjurek.com/r/shadcn/section.json

Press Compare. The frames are real viewports, so a layout that breaks at 320 breaks here too rather than in somebody's hands.

In a page

import { Section } from "@sushindustries/ui";

export function ComponentsPage() {
	return (
		<>
			<Section label="Packages" title="What's installable">
				<p>Every visible element on this site is a component in `ui`.</p>
			</Section>
			<Section
				id="conventions"
				label="Conventions"
				title="How a file gets placed"
			>
				<p>Kebab-case filenames, one component per file, flat.</p>
			</Section>
		</>
	);
}
tsx
UsesRevealRevealFades and rises its children the first time they reach the viewport. Never un-reveals.@sushindustries/ui · motion