Responsive
Responsive protocol schemas
Source: packages/spec/src/ui/responsive.zod.ts
TypeScript Usage
import { ResponsiveStylesSchema, StyleMapSchema } from '@objectstack/spec/ui';
import type { ResponsiveStyles, StyleMap } from '@objectstack/spec/ui';
// Validate data
const result = ResponsiveStylesSchema.parse(data);ResponsiveStyles
Per-breakpoint scoped style maps (ADR-0065)
Properties
| Property | Type | Required | Description |
|---|---|---|---|
| large | Record<string, string | number> | optional | Unconditional base (desktop-first) |
| medium | Record<string, string | number> | optional | Applied at ≤ medium breakpoint |
| small | Record<string, string | number> | optional | Applied at ≤ small breakpoint |
| xsmall | Record<string, string | number> | optional | Applied at ≤ xsmall breakpoint |
StyleMap
CSS property → value map (camelCase keys; design tokens encouraged)
Type: Record<string, string | number>