Skip to Content

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.

390 × 844

badges - Emphasize consumer-provided labels and policies.

390 × 844

compliance - Group supplied compliance information by category.

390 × 844

split - Highlight one control beside the rest of the details.

390 × 844

certifications - Link to certification or compliance records supplied by you.

390 × 844

checklist - Display a concise, readable checklist of controls.

390 × 844

cards - Separate each control into a reusable card.

390 × 844

featured - Give one supplied security item visual emphasis.

390 × 844

dark - Use an inverted, theme-aware security surface.

390 × 844

metrics - Present only the security metrics supplied in each item.

390 × 844

audit - Add optional audit information without inventing a report.

390 × 844

trust-center - Pair security details with a trust-center action.

390 × 844

API

PropTypeDescription
variantSecurityVariantSelects one of twelve compositions; defaults to grid.
itemsreadonly SecurityItem[]Consumer-provided security information with stable id and title.
SecurityItem.descriptionReactNodeOptional explanatory copy.
SecurityItem.categorystringOptional grouping value for compliance and certification layouts.
SecurityItem.labelReactNodeOptional compliance, certification, or status label.
SecurityItem.valueReactNodeOptional metric value, rendered in the metrics variant.
SecurityItem.hrefstringOptional link to a record or external resource.
SecurityItem.iconReactNodeOptional consumer-provided icon.
auditInfoReactNodeOptional audit details, rendered only by the audit variant.
Shared section propsMarketing section propsHeader, 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.

PropRequiredDefault
variantNo"grid"
itemsYes—
auditInfoNo—

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.