Grid track constructors
Build fixed, repeated, auto-fill, and auto-fit grid track definitions.
APIs demonstrated
Section titled “APIs demonstrated”- minmax from
@pibbl/core - repeatTracks from
@pibbl/core - autoFillTracks from
@pibbl/core - autoFitTracks from
@pibbl/core - GridMinMaxTrack from
@pibbl/core - GridRepeatTrack from
@pibbl/core - GridTrack from
@pibbl/core - GridTrackBreadth from
@pibbl/core
Complete example
Section titled “Complete example”Plain source. This example demonstrates a type-level or host-specific contract; it is checked with TypeScript rather than presented as an animated preview.
import { autoFillTracks, autoFitTracks, minmax, repeatTracks, type GridMinMaxTrack, type GridRepeatTrack, type GridTrack, type GridTrackBreadth,} from "@pibbl/core";
const breadth: GridTrackBreadth = "1fr";const bounded: GridMinMaxTrack = minmax({ min: 72, max: breadth });const repeated: GridRepeatTrack = repeatTracks([bounded], { count: 2 });const fill: GridRepeatTrack = autoFillTracks(96);const fit: GridRepeatTrack = autoFitTracks(96);const tracks: readonly GridTrack[] = [repeated, fill, fit];
const output = document.createElement("pre");output.textContent = JSON.stringify(tracks, null, 2);document.body.append(output);Usage notes
Section titled “Usage notes”- Displays immutable track definitions in the document.
Documentation version
Section titled “Documentation version”Documentation built with @pibbl/core 0.0.2, revision a1dcf8e. ALPHA — NOT FOR PRODUCTION USE.