articles

abstract fun articles(onEvent: (ArticlesBlockEvent) -> Unit, source: ArticlesBlockSource = ArticlesBlockSource.all(), layout: ArticlesLayout = ArticlesLayout.list(), title: String? = null, showHeaderAction: Boolean = false, limit: Int? = null, header: @Composable () -> Unit? = null, footer: @Composable () -> Unit? = null)

Adds a list of articles. Same behaviour as ArticlesBlock.

Parameters

onEvent

invoked when the user interacts with this block.

source

which articles to show. The whole catalogue by default.

layout

the cell and the arrangement. A vertical list must be capped with limit: the page scrolls, not the block. ArticlesLayout.richHorizontal may stay uncapped.

title

optional heading shown above the items.

showHeaderAction

draws the heading's "see all" arrow, reported as ArticlesBlockEvent.HeaderActionClick. Requires a title.

limit

caps the block to its first limit items, never paginating — see ArticlesBlock.

header

replaces the built-in heading with caller-owned content, ignoring title and showHeaderAction. Collapses with the block, which content declared through custom does not.

footer

optional caller-owned content drawn below the items, inside the block.

Throws

if layout is vertical and limit is null, if limit is not strictly positive, or if showHeaderAction is set without a title.