This document describes the foundation layer exposed by @codemonster-ru/vueforge-core.
The foundation layer exists so packages such as vueforge-layouts can depend on stable platform helpers without importing the entire UI surface area.
Use foundation when you need:
- breakpoint constants
- media-query helpers
- responsive composables
- generic scroll-lock behavior
- token-only or foundation-only CSS entry points
@codemonster-ru/vueforge-core/foundation@codemonster-ru/vueforge-core/tokens.css@codemonster-ru/vueforge-core/foundation.css
import {
vfBreakpoints,
toMinWidthQuery,
toMaxWidthQuery,
useBreakpoint,
useBreakpoints,
useBreakpointValue,
useScrollLock,
} from "@codemonster-ru/vueforge-core/foundation";Canonical breakpoint map:
xs:480sm:640md:768lg:1024xl:12802xl:1536
toMinWidthQuery(vfBreakpoints.md);
// -> "(min-width: 768px)"toMaxWidthQuery(vfBreakpoints.md);
// -> "(max-width: 767.98px)"const isLgUp = useBreakpoint("lg");
const isMdDown = useBreakpoint("md", { direction: "max" });const breakpoints = useBreakpoints();
breakpoints.value.md;
breakpoints.value.xl;const columns = useBreakpointValue({
base: 1,
md: 2,
lg: 3,
});const open = ref(false);
useScrollLock(open);This is generic and can be reused by overlays or layout-level primitives.
Contains canonical design tokens only:
- colors
- semantic colors
- spacing
- radius
- typography tokens
- breakpoint tokens
- sizing tokens
No component class rules live there.
Currently includes:
tokens.csstheme.css
This is the narrow CSS entry point for packages that need token and theme baseline without full component styles.
Stable foundation API for 1.0.0:
vfBreakpointstoMinWidthQuerytoMaxWidthQueryuseBreakpointuseBreakpointsuseBreakpointValueuseScrollLocktokens.cssfoundation.css
Layout primitives such as grids, stacks, shells, containers, or sidebar state are intentionally out of scope for this layer.