Skip to content
brix.v2.15.0+b120c49

Search documentation

Loading search…

    Documentation menu
    Docs / Pages and UIRead Markdown
    On this page

    Fragments

    Brix fragments let pages render ordinary Preact components inline while a trusted edge can defer and compose selected instances independently.

    Use a fragment when part of a page needs its own HTML endpoint or edge-cache lifetime—for example, a shared header reused across many pages. You do not need fragments just to reuse markup: start with an ordinary Preact component. For browser interaction, use an island.

    Build and test the inline fragment first. Add edge composition only when your deployment includes a trusted assembler; declaring a fragment does not install that infrastructure.

    Author a fragment endpoint

    #

    Generate a component and sidecar, model URL-serialized endpoint inputs, configure caching and auth, and test the endpoint.

    Compose and test fragments

    #

    Merge application manifests, compose deferred shells, follow the cache admission contract, hydrate fragment islands, and test composition.