Package-level declarations

Types

Link copied to clipboard

Width caps for AdaptiveContentContainer, taken from Material's window size class breakpoints.

Link copied to clipboard

Semantic text roles for AppText. The first four are the kommon type scale; the rest re-cut a Material slot at a heavier weight, keeping its size and line height.

Link copied to clipboard
data class AssistantContextBody(val text: String, val isQuoted: Boolean = false)

The optional body line of an AssistantContextCard; isQuoted shows it as an italic quote.

Link copied to clipboard
data class AssistantLimitPromptCopy(val message: String, val supportingText: String, val primaryActionLabel: String, val secondaryActionLabel: String)

The text of an AssistantLimitPromptCard.

Link copied to clipboard
data class AssistantQuickActionState(val isSelected: Boolean, val isEnabled: Boolean)

The selected and enabled state of one AssistantQuickActionChips chip.

Link copied to clipboard

Diameter presets for Avatar. Each follows the user's font scale so initials never clip.

Link copied to clipboard
data class ChatComposerLabels(val placeholder: String = "Message", val send: String = "Send", val startVoice: String = "Start voice input", val stopVoice: String = "Stop voice input", val processingVoice: String = "Processing speech")

Localizable text for ChatComposer.

Link copied to clipboard
data class ChatComposerVoiceInput(val state: ChatComposerVoiceState, val onStart: () -> Unit, val onStop: () -> Unit)

Voice input for a ChatComposer. Start recognition in onStart, write the live transcript into the composer's value so it can be reviewed before sending, update state as recognition progresses, and stop in onStop.

Link copied to clipboard

Where a ChatComposer's voice input is. The caller runs speech recognition and moves between states.

Link copied to clipboard
data class ChatErrorAction(val message: String, val retryLabel: String, val onRetry: () -> Unit)

The text and retry action shown in failed ChatLog bubbles.

Link copied to clipboard
data class ChatMessage(val id: String, val sender: ChatMessageSender, val state: ChatMessageState)

One item of a ChatLog. id must be unique and stable; it is the list key.

Link copied to clipboard

Who sent a chat message, which decides its alignment and colors.

Link copied to clipboard
sealed interface ChatMessageState

What a chat message bubble shows.

Link copied to clipboard
sealed interface CheckStatus

The state of an on-demand check such as "Test connection": not run yet, running, or finished with a message. Messages come from the app, so they can be specific ("Connected to llama3").

Link copied to clipboard
data class CheckStatusLabels(val idle: String = "Not tested", val checking: String = "Checking…")

Localizable strings for CheckStatusRow. Set idle to an empty string to show nothing.

Link copied to clipboard
data class ComposeSpacing(val none: Dp, val extraSmall: Dp, val small: Dp, val medium: Dp, val large: Dp, val extraLarge: Dp)

kommon spacing scale converted to Dp. Read it with MaterialTheme.kmpSpacing.

Link copied to clipboard
data class CopyButtonLabels(val copy: String = "Copy", val copied: String = "Copied")

Localizable labels for CopyButton.

Link copied to clipboard

The axis a FlipCard turns around.

Link copied to clipboard
data class KmpColors(val success: Color, val warning: Color)

Semantic colors kommon defines that have no Material 3 role.

Link copied to clipboard
data class KmpMotion(val fastMillis: Int, val standardMillis: Int, val deliberateMillis: Int)

Animation durations in milliseconds, suitable for tween(durationMillis = ...).

Link copied to clipboard
data class KmpTypography(val code: TextStyle)

Text styles kommon defines that have no Material 3 role.

Link copied to clipboard

Whether a PaginatedContent can be swiped back as well as forward.

Link copied to clipboard

The position footer under a PaginatedContent.

Link copied to clipboard

Where the current page's title sits in a PaginatedContent title row.

Link copied to clipboard
data class PaginationPage(val title: String)

One page of a PaginatedContent, with the title shown in its title row.

Link copied to clipboard
data class ProviderConfigurationLabels(val providerName: String = "Provider name", val baseUrl: String = "Base URL", val model: String = "Model", val apiKey: String = "API key", val apiKeyOptional: String = "API key (optional)", val requiredError: String = "Required", val invalidUrlError: String = "Enter a URL starting with http:// or https://", val showSecret: String = "Show", val hideSecret: String = "Hide", val baseUrlPlaceholder: String = "https://")

Localizable strings for ProviderConfigurationForm.

Link copied to clipboard
data class ProviderConfigurationState(val providerName: String = "", val baseUrl: String = "", val model: String = "", val apiKey: String = "")

Connection settings for an authenticated service such as an AI provider.

Link copied to clipboard
data class SearchFieldLabels(val placeholder: String = "Search", val clear: String = "Clear search")

Localizable labels for SearchField.

Link copied to clipboard

How SecretTextField offers its show/hide control.

Link copied to clipboard

Vertical density of a SegmentedControl.

Link copied to clipboard
data class SegmentedItem(val title: String)

One segment of a SegmentedContent. Custom title slots may ignore title.

Link copied to clipboard

Whether SegmentedContent segments share the width evenly when they fit.

Link copied to clipboard
Link copied to clipboard

How a SegmentedControl's segments share the available width.

Link copied to clipboard
data class SelectionListLabels(val searchPlaceholder: String = "Search", val clearSearch: String = "Clear search", val noResults: String = "No results", val expanded: String = "Expanded", val collapsed: String = "Collapsed")

Localizable labels for SelectionList and SelectionListContent.

Link copied to clipboard
data class SelectionListNode<ID : Any>(val id: ID, val title: String, val subtitle: String? = null, val leadingGlyph: String? = null, val children: List<SelectionListNode<ID>> = emptyList())

A node in a one- or two-level SelectionList tree.

Link copied to clipboard

Declares the sections of a ShowcaseFeed, like a LazyColumn DSL.

Link copied to clipboard
sealed interface ShowcaseItemWidth

How wide each item of a ShowcaseRow is, which decides how much of the next item peeks in.

Link copied to clipboard

How a ShowcaseRow settles after a fling.

Link copied to clipboard

Default bounds and keyboard step for HorizontalSplitPane, as fractions of the width.

Link copied to clipboard
data class SplitPaneLabels(val handleDescription: String = "Resize panes", val splitDescription: (split: Float) -> String = { "${(it * PERCENT).roundToInt()}% leading pane" })

Localizable accessibility strings for HorizontalSplitPane's divider.

Link copied to clipboard

Semantic intent of a StatusMessage; selects its accent color.

Link copied to clipboard

How a TabBar lays out its destinations.

Link copied to clipboard

Defaults for TabBar, NavRail, and AdaptiveNavScaffold. Sizes match Material's bar.

Link copied to clipboard
data class TabBarItemColors(val selectedIconColor: Color, val selectedTextColor: Color, val selectedIndicatorColor: Color, val unselectedIconColor: Color, val unselectedTextColor: Color, val disabledIconColor: Color, val disabledTextColor: Color)

Colors of a TabBar or NavRail destination in each state.

Link copied to clipboard
data class TabBarItemData<T>(val value: T, val icon: @Composable () -> Unit, val label: @Composable () -> Unit? = null, val badge: @Composable () -> Unit? = null, val enabled: Boolean = true, val contentDescription: String = "")

One destination of a TabBar, NavRail, or AdaptiveNavScaffold. Selection compares value with the current selection, so reordering items keeps the selection.

Link copied to clipboard

Lets a TabBar hide as content scrolls down and come back as it scrolls up, like Material's TopAppBarScrollBehavior for a bottom bar. Attach nestedScrollConnection to the scrolling content with Modifier.nestedScroll and pass this to the bar. Create it with rememberTabBarScrollBehavior.

Link copied to clipboard

User-facing appearance preference. Persist this value rather than a resolved light/dark flag.

Link copied to clipboard
data class ThemeModeLabels(val system: String = "System", val light: String = "Light", val dark: String = "Dark")

Localizable labels for ThemeModeSelector and ThemeModeDropdown.

Link copied to clipboard
interface ToastData

The toast a ToastHost is showing, for custom toast slots.

Link copied to clipboard

How long a toast stays before dismissing itself.

Link copied to clipboard

Shows one toast at a time, like SnackbarHostState: showToast suspends until the toast is dismissed and reports how it ended; concurrent calls wait their turn. Pair it with a ToastHost and create it with rememberToastHostState.

Link copied to clipboard

The screen edge a ToastHost anchors its toast to.

Link copied to clipboard
Link copied to clipboard
data class ZoomableImageLabels(val zoomDescription: (zoom: Float) -> String = { "Zoom ${(it * PERCENT).roundToInt()}%" })

Localizable labels for ZoomableImage.

Properties

Link copied to clipboard

True while the check is running, e.g. enabled = !status.isChecking on its button.

Link copied to clipboard

Overrides the system's reduced-motion preference for decorative looping animations and page hints. null follows the system; desktop hosts can supply their own preference. Changes take effect while the subtree remains composed.

Link copied to clipboard

Turns skeletonShimmer off for the subtree, for example in screenshot tests. It is also off when the system reduces motion and in previews.

Functions

Link copied to clipboard
fun ActionPill(onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, containerColor: Color = MaterialTheme.colorScheme.surfaceVariant, contentColor: Color = MaterialTheme.colorScheme.onSurfaceVariant, contentPadding: PaddingValues = PaddingValues( horizontal = MaterialTheme.kmpSpacing.medium, vertical = MaterialTheme.kmpSpacing.small, ), content: @Composable RowScope.() -> Unit)

A capsule-shaped command with arbitrary content, such as an icon and a styled label. Unlike PillChip it has no selected state; use it for compact links and commands.

Link copied to clipboard
fun AdaptiveContentContainer(modifier: Modifier = Modifier, maxWidth: Dp = AdaptiveContentContainerDefaults.FormMaxWidth, contentAlignment: Alignment = Alignment.TopCenter, content: @Composable BoxScope.() -> Unit)

Centers content and caps its width at maxWidth, so forms and lists do not stretch across tablet and desktop windows. In narrow windows it simply fills the width.

Link copied to clipboard
fun <T> AdaptiveNavScaffold(items: List<TabBarItemData<T>>, selection: T, onSelectionChange: (T) -> Unit, modifier: Modifier = Modifier, topBar: @Composable () -> Unit = {}, colors: TabBarItemColors = TabBarDefaults.itemColors(), scrollBehavior: TabBarScrollBehavior? = null, content: @Composable (PaddingValues) -> Unit)

A scaffold that shows a TabBar in compact windows (narrower than 600 dp) and a NavRail in wider ones, with topBar above the content. scrollBehavior only applies to the tab bar; the rail stays put.

Link copied to clipboard
fun AppText(text: String, modifier: Modifier = Modifier, style: AppTextStyle = AppTextStyle.BODY, color: Color = MaterialTheme.colorScheme.onSurface)

Text in one of the theme's semantic AppTextStyle roles.

Link copied to clipboard
fun AssistantContextCard(title: String, modifier: Modifier = Modifier, highlight: String? = null, body: AssistantContextBody? = null, footnote: String? = null)

What the assistant is looking at: a title, an optional highlight such as the selected item, an optional body line, and an optional footnote. Blank values are not drawn.

Link copied to clipboard
fun AssistantDisclaimerFooter(text: String, modifier: Modifier = Modifier)

A low-emphasis disclaimer or policy line under an assistant conversation. Blank draws nothing.

Link copied to clipboard
fun AssistantLimitPromptCard(copy: AssistantLimitPromptCopy, onPrimaryAction: () -> Unit, onSecondaryAction: () -> Unit, modifier: Modifier = Modifier)

A card for usage limits, quotas, or upgrades, with a primary and a secondary action.

Link copied to clipboard
fun <T> AssistantQuickActionChips(actions: List<T>, actionState: (T) -> AssistantQuickActionState, label: @Composable (T) -> String, onAction: (T) -> Unit, modifier: Modifier = Modifier, icon: (T) -> Painter? = { null })

A scrolling row of filter chips for assistant quick actions ("Summarize", "Explain"). The caller owns the action type, labels, and selection and enablement rules. icon is decorative; the chip's label and selected state carry its meaning.

Link copied to clipboard
fun AssistantStatusBanner(message: String, modifier: Modifier = Modifier)

A full-width error banner for an unavailable provider, degraded service, or a blocking failure. It is announced politely when it appears. For tones other than error, use NoticeCard.

Link copied to clipboard
fun Avatar(name: String, modifier: Modifier = Modifier, size: AvatarSize = AvatarSize.MEDIUM, contentDescription: String? = name, image: @Composable () -> Unit? = null)

A circular avatar for a person or entity: the caller's image when provided, otherwise the initials derived from name on a tinted circle.

Link copied to clipboard
fun badgeCountText(count: Int, maxCount: Int = DEFAULT_MAX_BADGE_COUNT): String

The text a CountBadge shows: count, or "maxCount+" above it. Negative counts show 0.

Link copied to clipboard
fun BottomSheet(onDismissRequest: () -> Unit, modifier: Modifier = Modifier, content: @Composable ColumnScope.() -> Unit)

A modal bottom sheet that always opens fully expanded and pads and stacks content. Show it conditionally and hide it in onDismissRequest (scrim tap, drag down, back).

Link copied to clipboard
fun ChatComposer(value: String, onValueChange: (String) -> Unit, onSend: () -> Unit, modifier: Modifier = Modifier, sendEnabled: Boolean = true, maxLines: Int = DEFAULT_MAX_LINES, voiceInput: ChatComposerVoiceInput? = null, labels: ChatComposerLabels = ChatComposerLabels())

A chat message field with a send button and optional voice input.

Link copied to clipboard
fun ChatLog(messages: List<ChatMessage>, idleHint: String, errorAction: ChatErrorAction, modifier: Modifier = Modifier, contentPadding: PaddingValues = PaddingValues(vertical = MaterialTheme.kmpSpacing.small), typingDescription: String = "Responding", messageContent: @Composable (ChatMessageSender, String) -> Unit = { sender, text -> ChatMessageText(sender, text) })

A chat conversation: user bubbles on the end edge, assistant bubbles on the start edge, a typing bubble for pending replies, and a retryable error bubble. With no messages it shows idleHint.

Link copied to clipboard
fun CheckStatusRow(status: CheckStatus, modifier: Modifier = Modifier, labels: CheckStatusLabels = CheckStatusLabels())

One line describing a CheckStatus: muted text when idle, a small spinner while checking, and the result in the success or error color when readable on page and card surfaces, otherwise the on-surface color. Results are announced through a polite live region.

Link copied to clipboard
fun coerceSplit(split: Float, minSplit: Float, maxSplit: Float): Float

split clamped to minSplit..maxSplit; NaN (e.g. from a corrupt preference) becomes the midpoint.

Link copied to clipboard
fun ConfirmDialog(title: String, message: String, onConfirm: () -> Unit, onDismiss: () -> Unit, modifier: Modifier = Modifier, confirmLabel: String = "Confirm", dismissLabel: String = "Cancel", destructive: Boolean = false)

A two-button confirmation dialog ("Delete all variants?", "Allow Amoo to reinstall the app?").

Link copied to clipboard
fun ContentRow(title: String, modifier: Modifier = Modifier, secondaryText: String? = null, supportingText: String? = null, onClick: () -> Unit? = null, enabled: Boolean = true, selected: Boolean? = null, leadingContent: @Composable () -> Unit? = null, trailingContent: @Composable () -> Unit? = null)

A list row with a title, optional secondaryText beside it, optional supportingText under it, and leading and trailing slots. Use it for recent projects, endpoints, steps, and settings entries.

Link copied to clipboard
fun CopyButton(text: String, modifier: Modifier = Modifier, enabled: Boolean = true, labels: CopyButtonLabels = CopyButtonLabels(), onCopied: () -> Unit? = null)

An icon button that copies text to the system clipboard as plain text. After copying it shows a check mark for a moment and announces CopyButtonLabels.copied. onCopied runs after the copy, for example to log it.

Link copied to clipboard
fun CountBadge(count: Int, modifier: Modifier = Modifier, color: Color = MaterialTheme.colorScheme.secondary, maxCount: Int = DEFAULT_MAX_BADGE_COUNT, contentDescription: String? = null)

A pill showing count, capped as "maxCount+" so it stays compact.

Link copied to clipboard
fun DisclosureCard(expanded: Boolean, onExpandedChange: (Boolean) -> Unit, modifier: Modifier = Modifier, expandedLabel: String = "Expanded", collapsedLabel: String = "Collapsed", summary: @Composable RowScope.() -> Unit, detail: @Composable () -> Unit)

A card that always shows summary and reveals detail when expanded. The summary row is the toggle; it announces expandedLabel or collapsedLabel as its state.

Link copied to clipboard
fun EmptyState(title: String, modifier: Modifier = Modifier, message: String? = null, action: @Composable () -> Unit? = null)

Centered placeholder for a pane with nothing to show yet ("No project loaded", "Choose a report"), with an optional next step such as a button.

Link copied to clipboard
fun ErrorState(title: String, message: String, modifier: Modifier = Modifier, action: @Composable () -> Unit? = null, leadingContent: @Composable () -> Unit? = null)

A full-width, padded error placeholder for a pane that failed to load, with an optional action such as a Retry button and optional leadingContent such as an illustration. The title is an accessibility heading, and the error is announced politely when it appears.

Link copied to clipboard
fun FAB(icon: Painter, contentDescription: String, onClick: () -> Unit, modifier: Modifier = Modifier)

An icon-only floating action button for a screen's primary action.

Link copied to clipboard
fun FlipCard(front: @Composable BoxScope.() -> Unit, back: @Composable BoxScope.() -> Unit, modifier: Modifier = Modifier, flipped: Boolean? = null, onFlippedChange: (Boolean) -> Unit? = null, axis: FlipAxis = FlipAxis.HORIZONTAL, animationSpec: AnimationSpec<Float> = tween(MaterialTheme.kmpMotion.deliberateMillis), enabled: Boolean = true, shape: Shape = MaterialTheme.shapes.large, containerColor: Color = MaterialTheme.colorScheme.surfaceVariant, frontLabel: String? = null, backLabel: String? = null, flipLabel: String? = null)

A two-sided card that turns in 3D between front and back, for flash cards and reveals. Size it with modifier; both faces fill it.

Link copied to clipboard
fun FlowLayout(modifier: Modifier = Modifier, horizontalArrangement: Arrangement.Horizontal = Arrangement.spacedBy(MaterialTheme.kmpSpacing.small), verticalArrangement: Arrangement.Vertical = Arrangement.spacedBy(MaterialTheme.kmpSpacing.small), content: @Composable FlowRowScope.() -> Unit)

Lays content out from start to end, wrapping onto new rows when the width runs out, with the standard small gap between items and rows. Use it for chips, tags, and button groups that must not clip at large font sizes.

Link copied to clipboard

Moves focus to the next control on Tab and the previous one on Shift+Tab, instead of letting the element (typically a multi-line text field on desktop) consume the key. Apply it to fields in forms that keyboard users move through.

Link copied to clipboard
fun FormTextField(value: String, onValueChange: (String) -> Unit, label: String, modifier: Modifier = Modifier, enabled: Boolean = true, placeholder: String? = null, supportingText: String? = null, errorText: String? = null, singleLine: Boolean = true, keyboardOptions: KeyboardOptions = KeyboardOptions.Default, keyboardActions: KeyboardActions = KeyboardActions.Default, visualTransformation: VisualTransformation = VisualTransformation.None, trailingContent: @Composable () -> Unit? = null)

A single form field: an outlined text field with a label and one line of supporting or error text underneath.

Link copied to clipboard
fun HorizontalSplitPane(split: Float, onSplitChange: (Float) -> Unit, modifier: Modifier = Modifier, minSplit: Float = SplitPaneDefaults.MIN_SPLIT, maxSplit: Float = SplitPaneDefaults.MAX_SPLIT, keyboardStep: Float = SplitPaneDefaults.KEYBOARD_STEP, labels: SplitPaneLabels = SplitPaneLabels(), leading: @Composable () -> Unit, trailing: @Composable () -> Unit)

Two panes side by side with a draggable divider. split is the leading pane's share of the width, kept between minSplit and maxSplit; persist it if the layout should survive restarts.

Link copied to clipboard
fun InfoTooltip(text: String, modifier: Modifier = Modifier, displayDurationMillis: Long?)

A small "i" glyph that shows text in a tooltip on hover, long-press, or keyboard focus. Use it next to a label whose meaning needs a short explanation.

Link copied to clipboard
fun InlineProgressIndicator(label: String, modifier: Modifier = Modifier, style: TextStyle = MaterialTheme.typography.bodyMedium, color: Color = MaterialTheme.colorScheme.onSurfaceVariant)

A small spinner followed by label, for work in progress inside a row, toolbar, or card ("Checking…", "Booting device…").

Link copied to clipboard
fun ThemeMode.isDark(systemInDarkTheme: Boolean): Boolean

Resolves this preference to a concrete dark/light decision given the platform setting.

Link copied to clipboard
fun ProviderConfigurationState.isValid(apiKeyRequired: Boolean = true): Boolean
Link copied to clipboard
fun KeyValueRow(key: String, value: String, modifier: Modifier = Modifier, valueStyle: TextStyle? = null, trailingContent: @Composable () -> Unit? = null)

A read-only label/value pair such as "Model · llama3" or "Port · 8080", for details panels and popovers. The value is end-aligned and wraps onto its own line when it cannot fit beside the label without splitting words. Screen readers read the pair as one item.

Link copied to clipboard
fun KmpTheme(mode: ThemeMode = ThemeMode.SYSTEM, tokens: ThemeTokens = KommonDesignTokens.default, content: @Composable () -> Unit)

Applies tokens as a Material 3 theme plus the kommon-only values that Material has no slot for (kmpSpacing, kmpColors, kmpMotion, kmpTypography).

Link copied to clipboard
fun LazyList(modifier: Modifier = Modifier, state: LazyListState = rememberLazyListState(), contentPadding: PaddingValues = PaddingValues(vertical = MaterialTheme.kmpSpacing.small), content: LazyListScope.() -> Unit)

A full-width LazyColumn with the standard vertical padding.

Link copied to clipboard
fun LoadingIconButton(loading: Boolean, icon: Painter, contentDescription: String, onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, loadingLabel: String = "Loading")

A ThemeIconButton that swaps its icon for a spinner and ignores clicks while loading, for actions such as "Refresh providers". Screen readers hear loadingLabel as its state.

Link copied to clipboard
fun LoadingOverlay(loading: Boolean, contentDescription: String, modifier: Modifier = Modifier, message: String? = null, showIndicator: Boolean = true, content: @Composable BoxScope.() -> Unit)

Hosts content and, while loading, covers it with a scrim that blocks interaction, for work the user started and must wait for (signing in, submitting, exporting).

Link copied to clipboard
fun LoadingState(label: String, modifier: Modifier = Modifier)

A full-width, padded loading placeholder for a pane: a spinner and label, announced politely. The pane-level counterpart of ProgressIndicator, with EmptyState and ErrorState as its siblings.

Link copied to clipboard
fun LoadMoreFooter(isLoadingMore: Boolean, onLoadMore: () -> Unit, modifier: Modifier = Modifier, loadingLabel: String = "Loading more")

The last item of an infinite-scrolling lazy list. Each time it enters composition (scrolls into view) it calls onLoadMore; while isLoadingMore it shows a spinner named loadingLabel and announced politely. Guard against duplicate requests in onLoadMore, and stop emitting the footer when there is nothing left to load.

Link copied to clipboard
fun <T> MenuPicker(items: List<T>, selected: T, onSelect: (T) -> Unit, label: String, itemLabel: (T) -> String, modifier: Modifier = Modifier, enabled: Boolean = true)

A labeled dropdown for picking one of items, shown as a read-only outlined field that opens a menu. Use it in forms where a segmented control would not fit (providers, languages, methods).

Link copied to clipboard
fun CheckStatus.message(labels: CheckStatusLabels = CheckStatusLabels()): String

The text CheckStatusRow shows for this status.

Link copied to clipboard
fun <T> NavRail(items: List<TabBarItemData<T>>, selection: T, onSelectionChange: (T) -> Unit, modifier: Modifier = Modifier, colors: TabBarItemColors = TabBarDefaults.itemColors())

A side navigation rail for medium and wide windows, sharing TabBarItemData and TabBarItemColors with TabBar. For a desktop-style labeled list, use SidebarNavigation.

Link copied to clipboard
fun NoticeCard(message: String, modifier: Modifier = Modifier, tone: StatusTone = StatusTone.INFO, title: String? = null, actionLabel: String? = null, onAction: () -> Unit? = null, onDismiss: () -> Unit? = null, dismissLabel: String = "Dismiss")

A full-width notice with an optional action and dismiss button, such as "Device disconnected · Retry" or "Provider not configured · Open settings". It uses the same StatusTone colors as StatusMessage; use StatusMessage instead when there is nothing to act on.

Link copied to clipboard
fun OverlayCard(modifier: Modifier = Modifier, contentAlignment: Alignment = Alignment.TopStart, background: Color = MaterialTheme.colorScheme.inverseSurface.copy(alpha = OVERLAY_ALPHA), contentColor: Color = MaterialTheme.colorScheme.inverseOnSurface, content: @Composable BoxScope.() -> Unit)

A rounded, translucent container for labels and controls drawn over images or video. Content defaults to the inverse on-surface color so it reads on the dark overlay.

Link copied to clipboard
fun PageIndicator(pagerState: PagerState, modifier: Modifier = Modifier, pagePositionDescription: (pageIndex: Int, pageCount: Int) -> String? = null, activeColor: Color = MaterialTheme.colorScheme.primary, inactiveColor: Color = MaterialTheme.colorScheme.outlineVariant)

PageIndicator bound to a PagerState. The current dot follows PagerState.currentPage, and the page is read inside this composable, so the caller does not recompose as the pager moves.

fun PageIndicator(pageCount: Int, currentPage: Int, modifier: Modifier = Modifier, pagePositionDescription: (pageIndex: Int, pageCount: Int) -> String? = null, activeColor: Color = MaterialTheme.colorScheme.primary, inactiveColor: Color = MaterialTheme.colorScheme.outlineVariant)

A row of dots marking the current position within pageCount pages, for carousels, onboarding flows, and any pager. PaginatedContent uses it for its dots footer.

Link copied to clipboard
fun PaginatedContent(pages: List<PaginationPage>, pagerState: PagerState, modifier: Modifier = Modifier, titleAlignment: PageTitleAlignment = PageTitleAlignment.LEADING, direction: PageDirection = PageDirection.BIDIRECTIONAL, footerStyle: PageFooterStyle = PageFooterStyle.DOTS, showScrollHint: Boolean = true, onPageChanged: (Int) -> Unit? = null, pagePositionDescription: (pageIndex: Int, pageCount: Int) -> String? = null, pageTitle: @Composable (pageIndex: Int, page: PaginationPage, progress: Float) -> Unit = { _, page, progress -> DefaultPageTitle(page.title, progress) }, pageContent: @Composable PagerScope.(pageIndex: Int, page: PaginationPage) -> Unit)

PaginatedContent driven by a caller-owned pagerState, for jumping to pages from outside. onPageChanged reports the settled page.

fun PaginatedContent(pages: List<PaginationPage>, modifier: Modifier = Modifier, initialPage: Int = 0, titleAlignment: PageTitleAlignment = PageTitleAlignment.LEADING, direction: PageDirection = PageDirection.BIDIRECTIONAL, footerStyle: PageFooterStyle = PageFooterStyle.DOTS, showScrollHint: Boolean = true, onPageChanged: (Int) -> Unit? = null, pagePositionDescription: (pageIndex: Int, pageCount: Int) -> String? = null, pageTitle: @Composable (pageIndex: Int, page: PaginationPage, progress: Float) -> Unit = { _, page, progress -> DefaultPageTitle(page.title, progress) }, pageContent: @Composable PagerScope.(pageIndex: Int, page: PaginationPage) -> Unit)

Horizontally paged content whose title row scrolls in step with the pages: each title is a page width from its neighbors, so the next title slides in as the user swipes. This overload owns its PagerState.

Link copied to clipboard
fun PillChip(label: String, isSelected: Boolean, modifier: Modifier = Modifier, onClick: () -> Unit? = null, selectedBackground: Color = MaterialTheme.colorScheme.primary, unselectedBackground: Color = MaterialTheme.colorScheme.primaryContainer, selectedLabel: Color = MaterialTheme.colorScheme.onPrimary, unselectedLabel: Color = MaterialTheme.colorScheme.onPrimaryContainer)

A capsule-shaped chip with a selected and an unselected look, for filter rows and option toggles. With onClick it is a selectable chip with a minimum touch target that reports its selected state; with null onClick it is a static label.

Link copied to clipboard
fun PrimaryButton(text: String, onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true)

A filled, high-emphasis button for a screen's or dialog's primary action.

Link copied to clipboard
fun ProgressIndicator(label: String, modifier: Modifier = Modifier, progress: Float? = null)

A centered progress indicator with a readable label, for a pane or screen that is loading.

Link copied to clipboard
fun ProviderConfigurationForm(state: ProviderConfigurationState, onStateChange: (ProviderConfigurationState) -> Unit, modifier: Modifier = Modifier, apiKeyRequired: Boolean = true, enabled: Boolean = true, showValidationErrors: Boolean = false, labels: ProviderConfigurationLabels = ProviderConfigurationLabels(), onDone: () -> Unit? = null)

Stateless form for ProviderConfigurationState.

Link copied to clipboard
fun RadioGroup(options: List<String>, selectedIndex: Int, onOptionSelected: (Int) -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true)

A vertical list of radio buttons for choosing one of options. Each row's full width is the tap target, and the rows form one selectable group for screen readers.

Link copied to clipboard

Returns the effective reduced-motion preference, so an app's own animations can follow the same setting as the library's decorative ones.

Link copied to clipboard

Remembers a ToastHostState across recompositions.

Link copied to clipboard
fun rememberTypewriterReveal(text: String, charsPerSecond: Int = DEFAULT_CHARS_PER_SECOND): State<String>

Reveals text a character at a time, at charsPerSecond, instead of showing it all at once.

Link copied to clipboard
fun SearchField(value: String, onValueChange: (String) -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, onSearch: (String) -> Unit? = null, labels: SearchFieldLabels = SearchFieldLabels())

A single-line search field with a search glyph and a clear button that appears once the field has text. The placeholder also supplies the accessible name after typing. Clearing calls onValueChange with an empty string.

Link copied to clipboard
fun SecondaryButton(text: String, onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true)

An outlined, medium-emphasis button for a secondary action next to a PrimaryButton.

Link copied to clipboard
fun SecretTextField(value: String, onValueChange: (String) -> Unit, label: String, modifier: Modifier = Modifier, enabled: Boolean = true, supportingText: String? = null, errorText: String? = null, imeAction: ImeAction = ImeAction.Default, keyboardActions: KeyboardActions = KeyboardActions.Default, showLabel: String = "Show", hideLabel: String = "Hide", revealToggle: SecretRevealToggle = SecretRevealToggle.TEXT)

A FormTextField for secrets such as API keys and passwords.

Link copied to clipboard
fun SectionCard(title: String, modifier: Modifier = Modifier, description: String? = null, action: @Composable () -> Unit? = null, content: @Composable ColumnScope.() -> Unit)

A titled group of related content, e.g. one block on a settings screen.

Link copied to clipboard
fun SectionHeader(title: String, modifier: Modifier = Modifier, actionLabel: String? = null, onAction: () -> Unit? = null, subtitle: String? = null, titleStyle: TextStyle? = null, actions: @Composable RowScope.() -> Unit? = null)

A header above a list or pane: a title on the leading edge, an optional subtitle under it, and trailing actions.

Link copied to clipboard
fun SegmentedContent(items: List<SegmentedItem>, modifier: Modifier = Modifier, initialSelectedIndex: Int = 0, indicator: SegmentSelectionIndicator = SegmentSelectionIndicator.PILL, fitMode: SegmentFitMode = SegmentFitMode.EVEN_WHEN_FITS, widthMode: SegmentWidthMode = SegmentWidthMode.FILL, density: SegmentDensity = SegmentDensity.REGULAR, backgroundColor: Color = MaterialTheme.colorScheme.surfaceVariant, unselectedSegmentColor: Color = Color.Transparent, onSelectionChanged: (Int) -> Unit? = null, segmentTitle: @Composable (index: Int, item: SegmentedItem, isSelected: Boolean) -> Unit = { _, item, isSelected -> DefaultSegmentTitle(item.title, isSelected, indicator) }, segmentContent: @Composable (index: Int, item: SegmentedItem) -> Unit)

A tab-style segment bar above caller-supplied content that crossfades when the selection changes. When the titles overflow, the bar scrolls, keeps the selected segment in view, and fades the edge that has more segments. This overload keeps the selection itself (saved across recreation).

fun SegmentedContent(items: List<SegmentedItem>, selectedIndex: Int, onSelectionChanged: (Int) -> Unit, modifier: Modifier = Modifier, indicator: SegmentSelectionIndicator = SegmentSelectionIndicator.PILL, fitMode: SegmentFitMode = SegmentFitMode.EVEN_WHEN_FITS, widthMode: SegmentWidthMode = SegmentWidthMode.FILL, density: SegmentDensity = SegmentDensity.REGULAR, backgroundColor: Color = MaterialTheme.colorScheme.surfaceVariant, unselectedSegmentColor: Color = Color.Transparent, segmentTitle: @Composable (index: Int, item: SegmentedItem, isSelected: Boolean) -> Unit = { _, item, isSelected -> DefaultSegmentTitle(item.title, isSelected, indicator) }, segmentContent: @Composable (index: Int, item: SegmentedItem) -> Unit)

SegmentedContent whose selection the caller owns through selectedIndex. Outgoing content keeps its item until the crossfade ends, including when that item is removed from items.

Link copied to clipboard
fun SegmentedControl(options: List<String>, selectedIndex: Int, onOptionSelected: (Int) -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, density: SegmentDensity = SegmentDensity.REGULAR, widthMode: SegmentWidthMode = SegmentWidthMode.FILL)

A row of pill-shaped segments for choosing one of options, drawn as filled buttons: the selected segment uses the primary color and the others the surface variant. Segments report their selected state and form one selectable group for screen readers.

Link copied to clipboard
fun SelectableCard(selected: Boolean, onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, content: @Composable ColumnScope.() -> Unit)

An outlined card in a list the user picks from (providers, reports, devices). A leading selection box gains a check when selected, in addition to the secondary container color. The whole card reports its selected state to accessibility services and shows an outline on keyboard focus.

Link copied to clipboard
fun <ID : Any> SelectionList(title: String, nodes: List<SelectionListNode<ID>>, selectedId: ID?, onSelect: (ID) -> Unit, onDismissRequest: () -> Unit, modifier: Modifier = Modifier, isSearchable: Boolean = false, labels: SelectionListLabels = SelectionListLabels(), confirmButton: @Composable () -> Unit? = null)

A single-choice SelectionListContent in a modal bottom sheet.

fun <ID : Any> SelectionList(title: String, nodes: List<SelectionListNode<ID>>, selectedIds: Set<ID>, onSelect: (ID) -> Unit, onDismissRequest: () -> Unit, modifier: Modifier = Modifier, isSearchable: Boolean = false, labels: SelectionListLabels = SelectionListLabels(), confirmButton: @Composable () -> Unit? = null)

A multiple-choice SelectionListContent in a modal bottom sheet. Taps only call onSelect; toggle membership in selectedIds yourself and give the sheet a confirmButton to close it.

Link copied to clipboard
fun <ID : Any> SelectionListContent(title: String, nodes: List<SelectionListNode<ID>>, selectedIds: Set<ID>, onSelect: (ID) -> Unit, modifier: Modifier = Modifier, isSearchable: Boolean = false, labels: SelectionListLabels = SelectionListLabels(), confirmButton: @Composable () -> Unit? = null)

A searchable one- or two-level selection list to place in your own screen or pane; SelectionList shows the same list in a bottom sheet.

Link copied to clipboard
fun ShowcaseFeed(modifier: Modifier = Modifier, state: LazyListState = rememberLazyListState(), contentPadding: PaddingValues = PaddingValues(vertical = MaterialTheme.kmpSpacing.medium), verticalItemSpacing: Dp = MaterialTheme.kmpSpacing.large, content: ShowcaseFeedScope.() -> Unit)

An app-store style feed: a vertical list of sections that each scroll horizontally. Declare the sections in content with ShowcaseFeedScope.

Link copied to clipboard
fun <T> ShowcaseRow(items: List<T>, modifier: Modifier = Modifier, itemWidth: ShowcaseItemWidth = ShowcaseItemWidth.Peek(), rows: Int = 1, rowHeight: Dp? = null, snapping: ShowcaseSnapping = ShowcaseSnapping.ITEM, state: LazyListState = rememberLazyListState(), gridState: LazyGridState = rememberLazyGridState(), contentPadding: PaddingValues = PaddingValues(horizontal = MaterialTheme.kmpSpacing.medium), itemSpacing: Dp = MaterialTheme.kmpSpacing.small, key: (index: Int, item: T) -> Any? = null, itemContent: @Composable (item: T) -> Unit)

A lazily composed horizontal carousel of items, sized by itemWidth; by default the next item peeks in to show the row scrolls. With rows above 1 and a rowHeight it becomes a column-major grid of stacked rows ("top charts"). snapping decides whether a fling settles on an item boundary (the default) or stops freely.

Link copied to clipboard
fun SidebarItem(label: String, selected: Boolean, onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, icon: @Composable () -> Unit? = null)

One destination in a SidebarNavigation. The selected item uses the secondary container color and is exposed as a selected tab.

Link copied to clipboard
fun SidebarNavigation(modifier: Modifier = Modifier, header: @Composable ColumnScope.() -> Unit? = null, content: @Composable ColumnScope.() -> Unit)

A full-height side navigation column for desktop-style layouts (app sections, preference panes). Fill it with SidebarItems; header (an app name, a pane title) sits above them.

Link copied to clipboard
fun Skeleton(modifier: Modifier = Modifier)

A full-width placeholder block one line of body text tall, for a list or card that is loading. It is decorative and hidden from screen readers; announce loading with a ProgressIndicator or LoadingState label instead.

Link copied to clipboard
fun SkeletonBlock(height: Dp, modifier: Modifier = Modifier, width: Dp? = null, shape: Shape = MaterialTheme.shapes.small, color: Color = MaterialTheme.colorScheme.surfaceVariant)

A placeholder block of height (and width, or the width modifier gives it) for skeleton layouts. It is decorative and hidden from screen readers.

Link copied to clipboard
fun Modifier.skeletonShimmer(highlight: Color = MaterialTheme.colorScheme.shimmerHighlight()): Modifier

Sweeps a soft highlight band across the placeholders in this subtree so a skeleton reads as loading rather than frozen. Apply it once at the root of a skeleton layout. Every shimmering subtree uses the same frame clock, so separate cards sweep in unison.

Link copied to clipboard
fun StatusBar(modifier: Modifier = Modifier, start: @Composable RowScope.() -> Unit = {}, end: @Composable RowScope.() -> Unit = {})

A desktop-style status bar along the bottom of a window: a top rule, start items on the start edge, and end items on the end edge, in label-sized text. Separate items with StatusBarSeparator. When space is short, the end side keeps up to two thirds of the width.

Link copied to clipboard
fun RowScope.StatusBarItem(text: String, modifier: Modifier = Modifier, color: Color = Color.Unspecified)

One status bar item on a single line. When space runs out, items share it and end in an ellipsis rather than dropping off the bar. color defaults to the bar's muted text color; pass a tone for states.

Link copied to clipboard
fun StatusBarSeparator(modifier: Modifier = Modifier)

A short vertical rule between StatusBar items, as tall as the label text.

Link copied to clipboard
fun StatusMessage(message: String, modifier: Modifier = Modifier, tone: StatusTone = StatusTone.INFO, title: String? = null)

An inline, non-dismissible message such as "Connection verified" or "API key rejected".

Link copied to clipboard
fun TabBar(modifier: Modifier = Modifier, containerColor: Color = MaterialTheme.colorScheme.surface, windowInsets: WindowInsets = TabBarDefaults.windowInsets, arrangement: TabBarArrangement = TabBarDefaults.arrangement, scrollBehavior: TabBarScrollBehavior? = null, content: @Composable RowScope.() -> Unit)

A bottom navigation bar whose destinations are TabBarItems in content. The destinations form one selectable group. As a scrollBehavior hides the bar, the bar also reports a smaller height, so a Scaffold gives the space back to the content.

fun <T> TabBar(items: List<TabBarItemData<T>>, selection: T, onSelectionChange: (T) -> Unit, modifier: Modifier = Modifier, containerColor: Color = MaterialTheme.colorScheme.surface, windowInsets: WindowInsets = TabBarDefaults.windowInsets, arrangement: TabBarArrangement = TabBarDefaults.arrangement, colors: TabBarItemColors = TabBarDefaults.itemColors(), scrollBehavior: TabBarScrollBehavior? = null)

A bottom navigation bar built from items. With a scrollBehavior it hides while the content scrolls down; attach the behavior's nestedScrollConnection to that content. For per-item control use the overload that takes TabBarItems.

Link copied to clipboard
fun <T> RowScope.TabBarItem(value: T, selection: T, onSelectionChange: (T) -> Unit, icon: @Composable () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, label: @Composable () -> Unit? = null, badge: @Composable () -> Unit? = null, colors: TabBarItemColors = TabBarDefaults.itemColors(), contentDescription: String = "")

One destination of a TabBar; see TabBarItemData for the parameters.

Link copied to clipboard
fun TabChip(label: String, selected: Boolean, onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, onClose: () -> Unit? = null, closeDescription: String = "Close ")

A compact tab, for switching between documents or variants inside a pane.

Link copied to clipboard
fun TabChipRow(modifier: Modifier = Modifier, content: @Composable RowScope.() -> Unit)

A horizontally scrolling row of TabChips that forms one selection group.

Link copied to clipboard
fun ThemeCard(modifier: Modifier = Modifier, onClick: () -> Unit? = null, contentPadding: PaddingValues = PaddingValues(MaterialTheme.kmpSpacing.medium), content: @Composable ColumnScope.() -> Unit)

An elevated, full-width card that stacks content with the standard gap. With onClick the whole card is one click target at least the Material minimum height; buttons inside content stay separately focusable. For a selectable card use SelectableCard; for a titled group use SectionCard.

Link copied to clipboard
fun ThemeCheckbox(checked: Boolean, onCheckedChange: (Boolean) -> Unit, label: String, modifier: Modifier = Modifier, enabled: Boolean = true, supportingText: String? = null, tooltip: String? = null)

A checkbox followed by label (and optional supportingText). Tapping anywhere on the row toggles checked.

Link copied to clipboard
fun ThemeDialog(title: String, text: String, confirmText: String, onConfirm: () -> Unit, onDismissRequest: () -> Unit, modifier: Modifier = Modifier, dismissText: String? = null, destructive: Boolean = false)

An alert dialog with a confirm action and an optional dismiss action. Pass null dismissText for an acknowledge-only dialog. Dismissing it (outside tap, back, Esc) calls onDismissRequest. For the common two-button case, ConfirmDialog has English defaults.

Link copied to clipboard
fun ThemeExtendedFloatingActionButton(text: String, icon: Painter, onClick: () -> Unit, modifier: Modifier = Modifier)

A floating action button with an icon and a visible text label. The icon is decorative because text already names the action. text is also set as the button's accessible name, because Material's extended FAB hides its label from screen readers.

Link copied to clipboard
fun ThemeHorizontalDivider(modifier: Modifier = Modifier, thickness: Dp = DividerDefaults.Thickness, color: Color = MaterialTheme.colorScheme.outlineVariant)

A full-width horizontal rule in the outline variant color.

Link copied to clipboard
fun ThemeIconButton(icon: Painter, contentDescription: String, onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true)

An icon-only button tinted with the primary color. contentDescription names the action for screen readers and is also shown as a tooltip on hover and focus.

Link copied to clipboard
fun ThemeLargeTopAppBar(title: String, modifier: Modifier = Modifier, navigationIcon: @Composable () -> Unit = {}, actions: @Composable RowScope.() -> Unit = {})

A large (three-line) top app bar styled like ThemeTopAppBar.

Link copied to clipboard
fun ThemeListItem(headline: String, modifier: Modifier = Modifier, supportingText: String? = null, leadingContent: @Composable () -> Unit? = null, trailingContent: @Composable () -> Unit? = null)

A Material-style list row: a headline in body text, optional supportingText, and leading and trailing slots, read by screen readers as one item. That item is at least the Material minimum touch target high, so a one-line row still meets target-size audits. For clickable or selectable rows with titles, use ContentRow.

Link copied to clipboard
fun ThemeMediumTopAppBar(title: String, modifier: Modifier = Modifier, navigationIcon: @Composable () -> Unit = {}, actions: @Composable RowScope.() -> Unit = {})

A medium (two-line) top app bar styled like ThemeTopAppBar.

Link copied to clipboard
fun ThemeModeDropdown(selected: ThemeMode, onSelect: (ThemeMode) -> Unit, label: String, modifier: Modifier = Modifier, enabled: Boolean = true, labels: ThemeModeLabels = ThemeModeLabels())

A labeled dropdown for choosing a ThemeMode, for settings forms where a segmented control does not fit. Built on MenuPicker; the menu's open state is internal UI state.

Link copied to clipboard
fun ThemeModeSelector(selected: ThemeMode, onSelect: (ThemeMode) -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, labels: ThemeModeLabels = ThemeModeLabels())

Segmented control for choosing a ThemeMode; pair it with KmpTheme's mode parameter.

Link copied to clipboard
fun ThemeSingleChoiceSegmentedButtonRow(options: List<String>, selectedIndex: Int, onOptionSelected: (Int) -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true)

Material's connected, outlined segmented buttons for choosing one of options, with a check mark on the selected segment. Each segment is at least the Material minimum touch target high. Labels retain their intrinsic width; the connected row scrolls horizontally when space is tight.

Link copied to clipboard
fun ThemeSlider(value: Float, onValueChange: (Float) -> Unit, modifier: Modifier = Modifier, valueRange: ClosedFloatingPointRange<Float> = 0f..1f, steps: Int = 0, enabled: Boolean = true, label: String? = null, valueDescription: String? = null)

A full-width slider for one value in valueRange.

Link copied to clipboard
fun ThemeSnackbar(message: String, modifier: Modifier = Modifier, actionLabel: String? = null, onAction: () -> Unit? = null)

A snackbar message with an optional action, usable on its own or as a SnackbarHost's snackbar slot. Standalone it announces itself politely. The action shows when both actionLabel and onAction are set.

Link copied to clipboard
fun ThemeSurface(modifier: Modifier = Modifier, contentPadding: PaddingValues = PaddingValues(MaterialTheme.kmpSpacing.medium), content: @Composable ColumnScope.() -> Unit)

A flat, full-width surface-colored container that stacks content with the standard gap.

Link copied to clipboard
fun ThemeSwitch(checked: Boolean, onCheckedChange: (Boolean) -> Unit, label: String, modifier: Modifier = Modifier, enabled: Boolean = true, supportingText: String? = null, tooltip: String? = null)

A setting row with label (and optional supportingText) on the leading edge and a switch on the trailing edge. Tapping anywhere on the row toggles checked.

Link copied to clipboard
fun ThemeTabRow(tabs: List<String>, selectedIndex: Int, onItemSelected: (Int) -> Unit, modifier: Modifier = Modifier)

Material's primary tab row for switching between tabs at the same level.

Link copied to clipboard
fun ThemeTextButton(text: String, onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, destructive: Boolean = false)

A low-emphasis text button for tertiary or dismissive actions ("Cancel", "Learn more").

Link copied to clipboard
fun ThemeTopAppBar(title: String, modifier: Modifier = Modifier, navigationIcon: @Composable () -> Unit = {}, actions: @Composable RowScope.() -> Unit = {})

A small top app bar on the surface color with primary-tinted navigation and action icons.

Link copied to clipboard
fun ThemeTriStateCheckbox(state: ToggleableState, onClick: () -> Unit, label: String, modifier: Modifier = Modifier, enabled: Boolean = true, supportingText: String? = null, tooltip: String? = null)

A three-state checkbox row for "select all" over a group, where state is ToggleableState.Indeterminate when only some items are selected. Tapping the row calls onClick; the caller decides the next state (usually all on, or all off when everything is on).

Link copied to clipboard
fun ThemeVerticalDivider(modifier: Modifier = Modifier, thickness: Dp = DividerDefaults.Thickness, color: Color = MaterialTheme.colorScheme.outlineVariant)

A full-height vertical rule in the outline variant color.

Link copied to clipboard
fun Toast(message: String, modifier: Modifier = Modifier, icon: Painter? = null, iconContentDescription: String? = null, iconTint: Color? = null, actionLabel: String? = null, onAction: () -> Unit? = null)

A transient message on an inverse surface with an optional leading icon and action, announced politely. Usually shown through a ToastHost; it can also be placed directly.

Link copied to clipboard
fun ToastHost(hostState: ToastHostState, modifier: Modifier = Modifier, position: ToastPosition = ToastPosition.BOTTOM, dismissLabel: String = "Dismiss", toast: @Composable (ToastData) -> Unit = { data -> DefaultToast(data, dismissLabel) })

Shows the toast held by hostState over the screen, sliding it in from position, dismissing it after its ToastDuration adjusted for the user's accessibility timeout, and keeping it inside the safe drawing area. Place it as the last child of the screen so it floats above the content.

Link copied to clipboard
fun ThemeMode.toggled(systemInDarkTheme: Boolean): ThemeMode

The explicit mode that flips what is currently shown, for a single light/dark toggle button.

Link copied to clipboard
fun TonalBadge(text: String, modifier: Modifier = Modifier, color: Color = MaterialTheme.colorScheme.primary)

A short label on a tinted background, such as an HTTP method, a status code, or a severity.

fun TonalBadge(text: String, tone: StatusTone, modifier: Modifier = Modifier)

A TonalBadge colored like a StatusMessage of the same tone.

Link copied to clipboard
fun TypingIndicator(modifier: Modifier = Modifier, contentDescription: String = "", color: Color = MaterialTheme.colorScheme.onSurfaceVariant)

Three dots pulsing in turn, for "a reply is being written", usually inside a chat bubble. It reads as composing rather than loading. The wave runs in the draw phase without recomposing, and the dots hold still when the system reduces motion and in previews.

Link copied to clipboard

Validates every field and returns the first problem found per field; an empty map means valid.

Link copied to clipboard
fun VerticalSplitPane(split: Float, onSplitChange: (Float) -> Unit, modifier: Modifier = Modifier, minSplit: Float = SplitPaneDefaults.MIN_SPLIT, maxSplit: Float = SplitPaneDefaults.MAX_SPLIT, keyboardStep: Float = SplitPaneDefaults.KEYBOARD_STEP, labels: SplitPaneLabels = SplitPaneLabels(splitDescription = { "${(it * PERCENT).roundToInt()}% top pane" }), top: @Composable () -> Unit, bottom: @Composable () -> Unit)

Two panes stacked vertically with a draggable divider, such as an editor above a console. split is the top pane's share of the height, kept between minSplit and maxSplit.

Link copied to clipboard
fun ZoomableImage(image: ImageBitmap, contentDescription: String, modifier: Modifier = Modifier, marker: Offset? = null, maxZoom: Float = DEFAULT_MAX_ZOOM, labels: ZoomableImageLabels = ZoomableImageLabels())

Shows image fitted to the space, for screenshots and previews. Zoom with the mouse wheel or the plus and minus keys when focused, drag to pan while zoomed, and double-click or press 0 to reset. marker, in image pixels, draws a ring where something happened, such as a tap. The zoom level is internal UI state; it resets when the image size changes while not zoomed. maxZoom must be finite and at least 1; lowering it clamps the current zoom.