SecuritySection
Present consumer-supplied security controls, compliance labels, links, metrics, and optional audit information.
SecuritySection provides layouts for security controls, certification records, compliance labels, and trust-center content. It renders only the information supplied by the consumer and does not create, verify, or imply security claims.
Beta API maturity: Beta.
Installation
import {
SecuritySection,
type SecurityItem,
} from "@puzzle-ui/pieces";Variant previews
Each variant has a standalone preview. The records are explicitly fictional examples, not claims about Puzzle or another service.
grid - Summarize supplied security controls in a grid.
badges - Emphasize consumer-provided labels and policies.
compliance - Group supplied compliance information by category.
split - Highlight one control beside the rest of the details.
certifications - Link to certification or compliance records supplied by you.
checklist - Display a concise, readable checklist of controls.
cards - Separate each control into a reusable card.
featured - Give one supplied security item visual emphasis.
dark - Use an inverted, theme-aware security surface.
metrics - Present only the security metrics supplied in each item.
audit - Add optional audit information without inventing a report.
trust-center - Pair security details with a trust-center action.
API
| Prop | Type | Description |
|---|---|---|
variant | SecurityVariant | Selects one of twelve compositions; defaults to grid. |
items | readonly SecurityItem[] | Consumer-provided security information with stable id and title. |
SecurityItem.description | ReactNode | Optional explanatory copy. |
SecurityItem.category | string | Optional grouping value for compliance and certification layouts. |
SecurityItem.label | ReactNode | Optional compliance, certification, or status label. |
SecurityItem.value | ReactNode | Optional metric value, rendered in the metrics variant. |
SecurityItem.href | string | Optional link to a record or external resource. |
SecurityItem.icon | ReactNode | Optional consumer-provided icon. |
auditInfo | ReactNode | Optional audit details, rendered only by the audit variant. |
| Shared section props | Marketing section props | Header, section element, theme, native attributes, actions, and children. |
Required and default values
Requiredness follows the exported TypeScript type. A dash means no component-level default is applied; variant-specific requirements are described in the API table above.
| Prop | Required | Default |
|---|---|---|
variant | No | "grid" |
items | Yes | — |
auditInfo | No | — |
Usage
const securityItems: SecurityItem[] = [
{
id: "access-policy",
title: "Workspace access policy",
description: "Describe the controls configured by your organization.",
category: "Access",
label: "Customer-provided",
},
{
id: "audit-material",
title: "Audit documentation",
description: "Link the materials your team has reviewed.",
href: "https://example.com/security",
},
];
<SecuritySection
variant="trust-center"
title="Security information"
items={securityItems}
actions={<a href="https://example.com/trust">Open trust center</a>}
/>;For audit, pass auditInfo only when there is actual content to display. Certification and compliance links remain the supplied destinations; the component does not validate those records.
Accessibility
Status and compliance text remains visible rather than relying on color alone. Linked items use native anchors, and the cards, checklist, and metric layouts preserve semantic lists. Provide meaningful labels for informative icons and use appropriate link text.
No certifications, audit dates, metrics, or controls are generated as defaults.
Customization
Use the component's className and documented slots to adapt the composition. Prefer a caller-provided ReactNode for media, actions, or controls rather than adding domain behavior to the section.
import type { ComponentProps } from "react";
import { SecuritySection } from "@puzzle-ui/pieces";
type SecuritySectionProps = ComponentProps<typeof SecuritySection>;
export function CustomizedSection(props: SecuritySectionProps) {
return <SecuritySection {...props} className={[props.className, "brand-section"].filter(Boolean).join(" ")} />;
}Responsive behavior
Use the preview device selector to review mobile, tablet, and desktop widths. The built-in variant controls section structure; ensure application-provided media, form controls, and children can shrink or wrap without horizontal overflow. Use the existing responsive breakpoints in scoped CSS when the consuming layout needs a product-specific adjustment.
Theme support
The section consumes semantic variables from @puzzle-ui/theme and inherits active or scoped themes. Wrap the application with Theme, and use semantic roles such as text, surface, border, and primary for local overrides. Avoid hard-coded colors, spacing, radii, and shadows.
.brand-section {
color: var(--puzzle-color-text);
background: var(--puzzle-color-surface);
border-color: var(--puzzle-color-border);
}Composition
Compose this section with the UI primitives named in its API and use the documented slots for consumer-owned controls or media. Keep data fetching, routing, validation, permissions, and persistence in the application. The children slot is intended for additional content that belongs with this section, not as a substitute for its typed data model.
TypeScript example
The package exports this component from its root. Derive a wrapper's exact prop type from the public component rather than widening it:
import type { ComponentProps } from "react";
import { SecuritySection } from "@puzzle-ui/pieces";
type SecuritySectionProps = ComponentProps<typeof SecuritySection>;
export function SectionWrapper(props: SecuritySectionProps) {
return <SecuritySection {...props} />;
}Framework compatibility
The section is router-independent. Static compositions can be server-rendered; place callback-driven interactions in the framework's client boundary. See Next.js and TanStack Start integration for runnable framework examples and SSR guidance.