Documentation navigation

Themes

Responsive layout

Combine breakpoint-aware layout utilities with the app breakpoint subscription.

Themes ships responsive utility classes and breakpoint tokens; choose a layout-first approach and let CSS handle visual rearrangement where possible. The app’s breakpointSubscription emits the initial and subsequent distinct breakpoint (xs, sm, md, lg, xl, or initial) when application logic genuinely depends on viewport size. It removes media-query listeners when interrupted.

import { breakpointSubscription } from '@wsagency/wseffect-app'
const viewportChanges = breakpointSubscription((value) => ({ _tag: 'BreakpointChanged' as const, value }))

This is a Foldkit Subscription description, not an immediate standalone stream. Link it to the app’s subscription lifecycle and handle the emitted Message in the Model. See the generated breakpoint API reference and app helper recipe.

./breakpoints

@wsagency/wseffect-themes · MIT · source · MIT license · WS-AGENCY-NOTICE

This entry point is published in @wsagency/wseffect-themes@0.1.0-rc.1. Import it from the package subpath shown below; the signatures and documentation are read from the installed package declarations.

import * as Wseffect from '@wsagency/wseffect-themes/breakpoints'

Exported declarations

BREAKPOINTS

BREAKPOINTS: readonly [Readonly<{
    name: "xs";
    minWidth: 520;
}>, Readonly<{
    name: "sm";
    minWidth: 768;
}>, Readonly<{
    name: "md";
    minWidth: 1024;
}>, Readonly<{
    name: "lg";
    minWidth: 1280;
}>, Readonly<{
    name: "xl";
    minWidth: 1640;
}>]