ObjectStackObjectStack

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

PropertyTypeRequiredDescription
largeRecord<string, string | number>optionalUnconditional base (desktop-first)
mediumRecord<string, string | number>optionalApplied at ≤ medium breakpoint
smallRecord<string, string | number>optionalApplied at ≤ small breakpoint
xsmallRecord<string, string | number>optionalApplied at ≤ xsmall breakpoint

StyleMap

CSS property → value map (camelCase keys; design tokens encouraged)

Type: Record<string, string | number>


On this page