TabsTileSchema

@Serializable
@SerialName(value = "Tabs")
data class TabsTileSchema(val id: String, val events: SerializableImmutableList<EventSchema>?, val style: StyleSchema, val searchableTerms: SerializableImmutableList<String>?, val visibility: TileSchema.Visibility, val selectedTabId: String, val tabItems: SerializableImmutableList<TabsTileSchema.TabItem>, val tabType: TabsTileSchema.Type, val scrollable: Boolean) : TileSchema

Renders a Material 3 tab row with one Tab per entry in tabItems. tabType picks the emphasis — Type.PRIMARY uses the primary tab rows, Type.SECONDARY the secondary ones — and scrollable chooses between the fixed row (false) and the scrollable one (true). Each tab shows its TabItem.label and TabItem.icon, both optional. The selected tab is the one whose TabItem.id equals selectedTabId.

Badges: when TabItem.badgeText is non-null the tab gets a BadgedBox — attached to the icon when the tab has one, otherwise to the label. An empty string renders the small dot badge; any other value renders as the badge's text. A null value renders no badge.

Selection: tapping a tab dispatches a local TabsTileEvents.OnTabClicked and the holder stores the new selectedTabId, so the indicator moves immediately without a server round trip. The tile only tracks the selection — swapping the content shown below the tabs is up to the events wired to the tab clicks.

Triggers dispatched:

  • OnTabItemClickEventTrigger — fired when a tab is tapped, carrying that tab's TabItem.id, so events can be wired per tab.

Notes: when selectedTabId matches none of the tabItems the first tab is highlighted as a fallback. An empty tabItems renders nothing at all.

Constructors

Link copied to clipboard
constructor(id: String, events: SerializableImmutableList<EventSchema>?, style: StyleSchema, searchableTerms: SerializableImmutableList<String>?, visibility: TileSchema.Visibility, selectedTabId: String, tabItems: SerializableImmutableList<TabsTileSchema.TabItem>, tabType: TabsTileSchema.Type, scrollable: Boolean)

Types

Link copied to clipboard
@Serializable
data class TabItem(val id: String, val label: String?, val icon: IconSchema?, val badgeText: String?)
Link copied to clipboard

Properties

Link copied to clipboard
@SerialName(value = "events")
open override val events: SerializableImmutableList<EventSchema>?
Link copied to clipboard
@SerialName(value = "id")
open override val id: String
Link copied to clipboard
@SerialName(value = "scrollable")
val scrollable: Boolean
Link copied to clipboard
@SerialName(value = "searchableTerms")
open override val searchableTerms: SerializableImmutableList<String>?
Link copied to clipboard
@SerialName(value = "selectedTabId")
val selectedTabId: String
Link copied to clipboard
@SerialName(value = "style")
open override val style: StyleSchema
Link copied to clipboard
@SerialName(value = "tabItems")
val tabItems: SerializableImmutableList<TabsTileSchema.TabItem>
Link copied to clipboard
@SerialName(value = "tabType")
val tabType: TabsTileSchema.Type
Link copied to clipboard
@SerialName(value = "visibility")
open override val visibility: TileSchema.Visibility

Functions

Link copied to clipboard
open fun isGone(): Boolean
Link copied to clipboard
open fun isVisible(): Boolean