SearchCtrlK

  • ↑↓navigate
  • ↵open
  • escclose

Can’t find it? Contact us

DetailSheet

A non-modal side sheet showing one record whose open state lives in the URL.

Open in a new tab
View code
tsx
{selected ? (
	<DetailSheet
		id="monitor"
		title="api.example.com"
		description="HTTPS · every 30 seconds"
		closeHref="/monitors#monitor-3"
		permalink="/monitors/3"
		position={{ index: 3, total: 84, previousHref: "/monitors?pane=2", nextHref: "/monitors?pane=4" }}
		footer={<Button variant="outline">Pause monitor</Button>}
		labels={{
			close: "Close",
			copyLink: "Copy link",
			linkCopied: "Link copied",
			previous: "Previous monitor",
			next: "Next monitor",
			position: "Monitor",
		}}
	>
		<PropertyList>…</PropertyList>
		<Timeline aria-label="Recent activity">…</Timeline>
	</DetailSheet>
) : null}

Demo apps

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

Renders an <aside> named by its heading over the viewport, passing the pointer through to the page, with the panel docked to its inline end at --ui-app-detail-sheet-width, or a bottom sheet below 40rem. Never a modal; destructive actions confirm in the app's flow.

Props

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

PropTypeRequiredDescription
idstringYesThe sheet's id; its heading takes ${id}-title.
titleRemixNodeYesThe record's name, in the sheet's heading.
descriptionRemixNodeNoA line under the title: an id, a status, a host.
closeHrefstringYesThe list URL without the record open. Close and Esc follow it.
permalinkstringNoThe URL a teammate can open this record at; shows the copy button.
positionPositionNoShows n / N with previous/next links and their keys.
actionsRemixNodeNoExtra header controls, placed before the navigation.
footerRemixNodeNoPinned under the body: the record's own actions.
keysDetailSheetKeyScopeNoWhere Esc, k/j and ↑/↓ answer: "page" document-wide with focus moved into the sheet on open, "sheet" only while focus is inside it.
insetbooleanNoFloats the sheet off the viewport edges as a rounded card.
labelsLabelsYes
childrenRemixNodeNoThe record's detail: a PropertyList, a Timeline, notes.

Also accepts everything in Omit<TagProps<"aside">, "id" | "title">.

@sdxc/ui

Can’t find it? Contact us