ArticleUiState

data class ArticleUiState(val title: String, val preview: String? = null, val theme: String? = null, val imageUrl: String? = null, var isBookmarked: Boolean = false, val offsetReleaseDate: OffsetDateTime? = null, val readingTime: Double? = null)

What the Article component renders.

Map an ArticleShort or an Article into this before handing it over — the component holds no state of its own and reads nothing from the SDK.

Parameters

title

the headline. The only required field.

preview

the teaser shown under the title, if there is one.

theme

the category label shown above the title, if there is one.

imageUrl

the cover image, if there is one. Loaded remotely; a placeholder holds its place until it arrives.

isBookmarked

whether the bookmark control shows as set. You own this: update it in response to the component's bookmark callback.

offsetReleaseDate

when the article came out. Rendered as a relative age ("2 h ago"); omitted when null.

readingTime

the estimated read, in minutes. Omitted when null.

Constructors

Link copied to clipboard
constructor(title: String, preview: String? = null, theme: String? = null, imageUrl: String? = null, isBookmarked: Boolean = false, offsetReleaseDate: OffsetDateTime? = null, readingTime: Double? = null)

Properties

Link copied to clipboard
val imageUrl: String? = null
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val preview: String? = null
Link copied to clipboard
val readingTime: Double? = null
Link copied to clipboard
val theme: String? = null
Link copied to clipboard