Package-level declarations
The strip layout, the default Material 3 strip and its defaults.
Types
Link copied to clipboard
Shows a short "Back online" confirmation for duration after an offline period. Off unless passed.
Link copied to clipboard
Link copied to clipboard
object ConnectivityStripDefaults
Defaults of the strip: Material 3 snackbar tokens (neutral "status", not "error").
Link copied to clipboard
What the strip is currently showing.
Link copied to clipboard
Where the strip sits.
Functions
Link copied to clipboard
fun ConnectivityStrip(state: ConnectivityStripState = ConnectivityStripState.Offline, modifier: Modifier = Modifier, offlineText: String = ConnectivityStripDefaults.OfflineText, backOnlineText: String = ConnectivityStripDefaults.BackOnlineText, colors: ConnectivityStripColors = ConnectivityStripDefaults.colors(), textStyle: TextStyle = MaterialTheme.typography.bodyMedium, shape: Shape = RectangleShape, contentPadding: PaddingValues = ConnectivityStripDefaults.ContentPadding, textAlign: TextAlign = TextAlign.Center, icon: @Composable (ConnectivityStripState) -> Unit? = null, action: @Composable (ConnectivityStripState) -> Unit? = null)
The default strip: a full-width bar with centred text, announced politely by screen readers.
Link copied to clipboard
fun ConnectivityStripLayout(monitor: ConnectivityMonitor, modifier: Modifier = Modifier, enabled: Boolean = true, position: StripPosition = StripPosition.Top, mode: StripMode = StripMode.PushContent, scrimColor: Color = MaterialTheme.colorScheme.surface, enter: EnterTransition = ConnectivityStripDefaults.enter(position), exit: ExitTransition = ConnectivityStripDefaults.exit(position), backOnline: BackOnlineConfig? = null, strip: @Composable (ConnectivityStripState) -> Unit = { ConnectivityStrip(it) }, content: @Composable () -> Unit)
Wraps the app's root content and shows the connectivity strip while monitor reports offline. Add it once, around the root navigation host; no screen needs to change.
fun ConnectivityStripLayout(isConnected: Boolean, modifier: Modifier = Modifier, enabled: Boolean = true, position: StripPosition = StripPosition.Top, mode: StripMode = StripMode.PushContent, scrimColor: Color = MaterialTheme.colorScheme.surface, enter: EnterTransition = ConnectivityStripDefaults.enter(position), exit: ExitTransition = ConnectivityStripDefaults.exit(position), backOnline: BackOnlineConfig? = null, strip: @Composable (ConnectivityStripState) -> Unit = { ConnectivityStrip(it) }, content: @Composable () -> Unit)
Like the monitor overload, driven by a plain isConnected value (from your own state holder, a ViewModel, or a test).