Package-level declarations

Types

Link copied to clipboard

Holds default values for Coachmark.

Link copied to clipboard

CoachmarkDirection is used to specify the direction of the coachmark.

Link copied to clipboard
interface CoachmarkScope

Scope for coachmark content.

Link copied to clipboard

Object that contains the default values for DatePickerDialog

Link copied to clipboard
interface SnackbarAction

Represents an action that can be performed in a snack.

Link copied to clipboard
@JvmInline
@Immutable
value class SnackbarDuration

Represents the duration for which a snack should be displayed.

Link copied to clipboard
@Stable
interface SnackbarHostState

State of the SnackbarHost, can be retrieved by LocalSnackbarHostState inside composable function

Link copied to clipboard
sealed class SnackbarResult

Possible results of the SnackbarHostState.show call

Link copied to clipboard

hold the default values for SpatialPopup

Link copied to clipboard

Determines the placement of the subwindow.

Link copied to clipboard

TabBarPlacement is a enum class that determines the placement of the TabBar.

Link copied to clipboard
interface TabBarScope

TabBarScope is a scope that provides the item function to the TabBar.

Properties

Link copied to clipboard
val LocalSnackbarHostState: ProvidableCompositionLocal<SnackbarHostState>

Functions

Link copied to clipboard
@Composable
fun AlertDialog(modifier: Modifier = Modifier, cornerRadius: Dp = AlertDialogDefaults.DialogCornerRadius, properties: DialogProperties = AlertDialogDefaults.DefaultAlertDialogProperties, onDismissRequest: () -> Unit? = null, icon: @Composable () -> Unit? = null, title: @Composable () -> Unit? = null, content: @Composable () -> Unit? = null, buttons: @Composable () -> Unit? = null, orientation: Orientation = Orientation.Horizontal, padding: PaddingValues = AlertDialogDefaults.DialogPadding, followViewpoints: Set<ViewPoint> = ViewPoint.All)

Dialogs provide important prompts in a user flow. They can require an action, communicate information, or help users accomplish a task.

Link copied to clipboard
@Composable
fun BasicAlertDialog(onDismissRequest: () -> Unit, properties: DialogProperties = AlertDialogDefaults.DefaultAlertDialogProperties, cornerRadius: Dp = AlertDialogDefaults.DialogCornerRadius, followViewpoints: Set<ViewPoint> = ViewPoint.All, dialogContent: @Composable () -> Unit)

Dialogs provide important prompts in a user flow. They can require an action, communicate information, or help users accomplish a task.

Link copied to clipboard
@Composable
fun BasicSheet(onDismissRequest: () -> Unit, properties: DialogProperties = SheetDefaults.DefaultSheetsProperties, cornerRadius: Dp = SheetDefaults.CornerRadius, followViewpoints: Set<ViewPoint> = ViewPoint.All, sheetContent: @Composable () -> Unit)

A basic sheet, can be used to show a sheet with custom content. usually used when the design is different from the default sheet, likes SheetHeadImageSheet.

Link copied to clipboard
@Composable
fun CoachmarkBox(coachmark: @Composable CoachmarkScope.() -> Unit, modifier: Modifier = Modifier, showCoachmark: Boolean = true, direction: CoachmarkDirection = CoachmarkDirection.ToEnd, gap: Dp = CoachmarkDefaults.DefaultGap, content: @Composable BoxScope.() -> Unit)

CoachmarkBox is a container for displaying a coachmark.

Link copied to clipboard
@Composable
fun DatePickerDialog(onDismissRequest: () -> Unit, modifier: Modifier = Modifier, title: @Composable () -> Unit? = null, positiveButton: @Composable () -> Unit? = null, negativeButton: @Composable () -> Unit? = null, properties: DialogProperties = DatePickerDialogDefaults.DefaultDialogProperties, cornerRadius: Dp = LocalTokensBearer.current.dimension.RadiusLarge, followViewpoints: Set<ViewPoint> = ViewPoint.All, content: @Composable () -> Unit)

A dialog for displaying a DatePicker and DateRangePicker. Date pickers let people select a date.

Link copied to clipboard
@Composable
fun HeadImageSheet(headerImage: @Composable () -> Unit, modifier: Modifier = Modifier, properties: DialogProperties = SheetDefaults.DefaultSheetsProperties, onDismissRequest: () -> Unit? = null, cornerRadius: Dp = SheetDefaults.CornerRadius, followViewpoints: Set<ViewPoint> = ViewPoint.All, closeIcon: @Composable () -> Unit = { HeadImageSheetCloseIconButton { onDismissRequest?.invoke() } }, title: @Composable () -> Unit? = null, bottom: @Composable () -> Unit? = null, content: @Composable () -> Unit)

A sheet. It includes a head image, a title, a content body, and a bottom area. Only provides basic layout, you can customize it by passing headerImage, title, content and bottom. The headerImage will be shown at the top, the title will be shown at the bottom of head image, the content will be shown in the middle of sheet, the bottom will be shown at the bottom of sheet. The closeIcon will be shown at top leading corner of sheet.

Link copied to clipboard
@Composable
fun CoachmarkScope.ImageCoachmark(image: @Composable () -> Unit, modifier: Modifier = Modifier, button: @Composable () -> Unit? = null, backgroundColor: Color = CoachmarkDefaults.DefaultBackgroundColor, cornerSize: Dp = LocalTokensBearer.current.dimension.RadiusLarge, padding: Dp = ImagePadding)

ImageCoachmark usually used to display image for anchor UI. It typically contains an image and an optional button.

Link copied to clipboard
@Composable
fun rememberSpatialPopupPositionProvider(horizontalPlacement: HorizontalPlacement = HorizontalPlacement.alignStart(), verticalPlacement: VerticalPlacement = VerticalPlacement.above(offset = MenuDefaults.DefaultMenuOffset)): PopupPositionProvider

Provides a SpatialPositionProvider that places the SpatialPopup relative to it's anchor view.

Link copied to clipboard
@Composable
fun CoachmarkScope.RichCoachmark(modifier: Modifier = Modifier, image: @Composable () -> Unit? = null, title: @Composable () -> Unit? = null, buttons: @Composable RowScope.() -> Unit? = null, backgroundColor: Color = CoachmarkDefaults.DefaultBackgroundColor, cornerSize: Dp = if (image != null) LocalTokensBearer.current.dimension.RadiusLarge else LocalTokensBearer.current.dimension.RadiusMedium, content: @Composable () -> Unit)

ImageCoachmark usually used to display rich message for anchor UI. It typically contains an optional image, title, content and buttons.

Link copied to clipboard
@Composable
fun Sheet(modifier: Modifier = Modifier, properties: DialogProperties = SheetDefaults.DefaultSheetsProperties, onDismissRequest: () -> Unit? = null, cornerRadius: Dp = SheetDefaults.CornerRadius, followViewpoints: Set<ViewPoint> = ViewPoint.All, title: @Composable () -> Unit? = null, leadingAction: @Composable () -> Unit? = { DefaultCloseIconButton(onClick = { onDismissRequest?.invoke() }) }, trailingAction: @Composable () -> Unit? = null, bottom: @Composable () -> Unit? = null, content: @Composable () -> Unit)

A sheet. It includes a title, a content body, and a bottom area. Only provides basic layout, you can customize it by passing title, content and bottom. In the title area, you can customize the leading action and trailing action.

Link copied to clipboard
@Composable
fun CoachmarkScope.SimpleCoachmark(text: @Composable () -> Unit, modifier: Modifier = Modifier, button: @Composable () -> Unit? = null, backgroundColor: Color = CoachmarkDefaults.DefaultBackgroundColor, cornerSize: Dp = LocalTokensBearer.current.dimension.RadiusMedium)

SimpleCoachmark usually used to display brevity message for anchor UI. It typically contains text and an optional button.

Link copied to clipboard
@Composable
fun SnackbarHost(content: @Composable () -> Unit)

A host of snack, provides SnackbarHostState for content to use

Link copied to clipboard
@Composable
fun SpatialPopup(onDismissRequest: () -> Unit?, modifier: Modifier = Modifier, popupPositionProvider: PopupPositionProvider = rememberSpatialPopupPositionProvider(), cornerRadius: Dp = SpatialPopupDefaults.CornerRadius, defaultMinWidth: Dp = SpatialPopupDefaults.DefaultWidth, defaultMinHeight: Dp = SpatialPopupDefaults.DefaultHeight, properties: PopupProperties = SpatialPopupDefaults.DefaultPopupProperties, content: @Composable BoxScope.() -> Unit)

Opens a popup with the given content.

Link copied to clipboard
@Composable
fun Subwindow(rotation3D: Rotation3D? = null, followViewpoints: Set<ViewPoint> = ViewPoint.All, placement: SubwindowPlacement = SubwindowPlacement.Default, offset: DpOffset3D = getGap(getLayoutDirection(placement)), content: @Composable BoxScope.() -> Unit)

Subwindow is a component shown at left or right side of the window container. and it's height always fill the height of the window container.

Link copied to clipboard
@Composable
fun TabBar(placement: TabBarPlacement, followViewpoints: Set<ViewPoint> = ViewPoint.All, content: TabBarScope.() -> Unit)

TabBar is a component shown at top or left or right of the window container.

Link copied to clipboard
@Composable
fun Toolbar(cornerSize: Dp = ToolbarDefaults.CornerRadius, followViewpoints: Set<ViewPoint> = ViewPoint.All, content: @Composable RowScope.() -> Unit)

Toolbar is floating window will be placed at center bottom of WindowContainer