react-bannerkit

    Document model

    A BannerTemplate is a JSON document with three breakpoint trees and a handful of top-level fields.

    Top-level fields

    FieldTypeNotes
    idstringStable, URL-safe identifier.
    namestringDisplay name.
    descriptionstringOne line, used in search and gallery captions.
    createdAtstringISO 8601 timestamp.
    breakpoints{ laptop, tablet, mobile }The three independent layouts.

    Breakpoint document

    Each breakpoint owns:

    FieldTypeNotes
    sizeMode"ratio" | "viewport" | "explicit"How the banner's height is determined.
    designHeightnumberUsed with ratio mode.
    rootBannerNodeThe top of the panel/split tree.
    bgstringBackground colour behind the tree.
    gutternumberGap between siblings in a split, in design px.

    The tree

    A BannerNode is either a split or a panel:

    • Split — two children (a and b) divided by a ratio, either cols or rows.
    • Panel — a single surface holding positioned elements, or a carousel of slides.

    Element types

    heading, text, button, link, image, icon, overlay, spacer. Every element has pos (percentage-based placement) and a type-specific set of fields.

    See the TypeScript types in the package source for the full field list, or use the playground to inspect a live template's JSON.