Pager

fun TileSchemaBuilderScope.Pager(id: String = randomId(), events: EventSchemaBuilderScope.() -> Unit = {}, style: StyleSchemaBuilderScope.() -> Unit = {}, visibility: TileSchema.Visibility = visible(), searchableTerms: List<String>? = null, pageSize: PagerTileSchema.PageSizeSchema = pageFill(), pageSpacing: Int = 0, contentPadding: Int = 0, beyondViewportPageCount: Int = 0, tiles: TileSchemaBuilderScope.() -> Unit)

Renders a horizontal-only Compose HorizontalPager over tiles, one page per child. pageSize chooses between full-width pages (pageFill) and fixed-width pages (pageFixed, in dp); pageSpacing and contentPadding (horizontal only) are dp values, and beyondViewportPageCount controls how many off-screen pages stay composed. Listens for scroll-to-begin/end and next/previous-page broadcasts addressed to its id — requesting the next page past the last one (or the previous one before the first) is a no-op. Children are rendered by index with no scope CompositionLocal. Dispatches onDisplay once when composed, and onPageChanged whenever the settled current page changes (skipping the initial page) — once per matching direction (any / start / end / that exact index); wiring several directions runs several chains for the same page change.

Parameters

id

Unique identifier of the tile. Defaults to a random id.

events

Events owned by this tile, wired to its triggers (onDisplay, onPageChanged).

style

Layout/appearance modifiers (size, padding, background, etc).

visibility

Whether the tile is shown, hidden but occupies space, or removed from layout. Defaults to visible.

searchableTerms

Terms used by an ancestor's search/filter to decide whether this tile matches. Defaults to none.

pageSize

Page width strategy — pageFill (full width) or pageFixed (fixed dp width). Defaults to fill.

pageSpacing

Spacing between pages, in dp. Defaults to 0.

contentPadding

Horizontal padding applied to the pager's content, in dp. Defaults to 0.

beyondViewportPageCount

Number of off-screen pages kept composed on each side. Defaults to 0.

tiles

Child tiles rendered one per page.