Status Layout
openstatus/status-layoutFreeBlock
Layout primitives for composing status displays (Status, StatusHeader, StatusTitle, etc.)
Install it
npx shadcn@latest add https://openstatus.dev/r/status-layout.jsonSource
1import { StatusIcon as UnifiedStatusIcon } from "@/components/blocks/status-icon";2import { cn } from "@/lib/utils";34/**5 * Status - Root container component for status page layouts6 *7 * This component serves as the primary container for status page content, providing8 * consistent spacing and establishing the status type context via data attributes.9 * The status type controls the visual appearance of child StatusIcon components10 * through CSS data attribute selectors (group-data-[variant=...]).11 *12 * The component acts as both a CSS group and peer for advanced selector patterns,13 * enabling child components to style themselves based on the parent's status.14 *15 * @param variant - The status type that determines the overall status indicator appearance16 *17 * @example18 * ```tsx19 * <Status variant="success">20 * <StatusHeader>21 * <StatusBrand src="/logo.png" alt="Company" />22 * <StatusTitle>System Status</StatusTitle>23 * </StatusHeader>24 * <StatusContent>25 * {// Status components here}26 * </StatusContent>27 * </Status>28 * ```29 *30 * @see StatusHeader - For header content with brand and title31 * @see StatusContent - For main status content area32 * @see StatusIcon - For status indicator icons that respond to variant33 */34export function Status({35 children,36 className,37 variant = "success",38 ...props39}: React.ComponentProps<"div"> & {40 variant?: "success" | "degraded" | "error" | "info";41}) {42 return (43 <div44 data-variant={variant}45 data-slot="status"46 className={cn("group peer flex flex-col gap-8", className)}47 {...props}48 >49 {children}50 </div>51 );52}53Status.displayName = "Status";5455/**56 * StatusBrand - Brand logo/image component for status page headers57 *58 * Displays a brand image (typically a company logo) with consistent sizing.59 * The default size is 32x32px (size-8), suitable for header placement.60 *61 * @param src - Image source URL62 * @param alt - Alternative text for the image (required for accessibility)63 *64 * @example65 * ```tsx66 * <StatusHeader>67 * <StatusBrand src="/logo.png" alt="Company Name" />68 * <StatusTitle>System Status</StatusTitle>69 * </StatusHeader>70 * ```71 *72 * @see StatusHeader - For positioning brand within header layout73 */74export function StatusBrand({75 src,76 alt,77 className,78 ...props79}: React.ComponentProps<"img">) {80 return (81 <img src={src} alt={alt} className={cn("size-8", className)} {...props} />82 );83}84StatusBrand.displayName = "StatusBrand";8586/**87// … truncated
What it pulls in
Other registry items
Files it writes
More from openstatus
All 26 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Status Bannerstatus-banner | openstatus | Blocks | Free | no deps | |
| Status Barstatus-bar | openstatus | Blocks | Free | 1 dep | |
| Status Blank Statesstatus-blank | openstatus | Blocks | Free | no deps | |
| Status Calendarstatus-calendar | openstatus | Blocks | Free | 3 deps | |
| Status Page Chromestatus-chrome | openstatus | Blocks | Free | no deps | |
| Status Page (Complete)status-complete | openstatus | Blocks | Free | no deps | |
| Status Componentstatus-component | openstatus | Blocks | Free | 2 deps | |
| Status Component Groupstatus-component-group | openstatus | Blocks | Free | no deps |
