Package-level declarations

Types

Link copied to clipboard
data class ButtonColors(val containerColor: Color, val contentColor: Color, val borderColor: Color? = null, val disabledContainerColor: Color, val disabledContentColor: Color, val disabledBorderColor: Color? = null)
Link copied to clipboard
Link copied to clipboard
data class ButtonStyle(val colors: ButtonColors, val shape: Shape, val elevation: ButtonElevation? = null, val contentPadding: PaddingValues)
Link copied to clipboard
Link copied to clipboard
data class CheckboxColors(val checkedCheckmarkColor: Color, val uncheckedCheckmarkColor: Color, val checkedBoxColor: Color, val uncheckedBoxColor: Color, val disabledCheckedBoxColor: Color, val disabledUncheckedBoxColor: Color, val disabledIndeterminateBoxColor: Color, val checkedBorderColor: Color, val uncheckedBorderColor: Color, val disabledBorderColor: Color, val disabledUncheckedBorderColor: Color, val disabledIndeterminateBorderColor: Color)
Link copied to clipboard
Link copied to clipboard
data class ChipColors(val containerColor: Color, val contentColor: Color, val outlineColor: Color? = null, val selectedContainerColor: Color, val selectedOutlineColor: Color? = null, val selectedContentColor: Color, val disabledContainerColor: Color, val disabledContentColor: Color, val disabledOutlineColor: Color? = null)
Link copied to clipboard
Link copied to clipboard
data class ChipStyle(val colors: ChipColors, val shape: Shape, val elevation: ButtonElevation? = null, val contentPadding: PaddingValues)
Link copied to clipboard
Link copied to clipboard
class DefaultTooltipScope(val getAnchorBounds: () -> LayoutCoordinates?) : TooltipScope
Link copied to clipboard
Link copied to clipboard

Transformer for converting between Dp values and their string representation.

Link copied to clipboard

Transformer for converting between Float values and their string representation.

Link copied to clipboard
data class IconButtonColors(val containerColor: Color, val contentColor: Color, val borderColor: Color? = null, val disabledContainerColor: Color, val disabledContentColor: Color, val disabledBorderColor: Color? = null)
Link copied to clipboard
Link copied to clipboard
data class IconButtonStyle(val colors: IconButtonColors, val shape: Shape, val elevation: ButtonElevation? = null)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Interfaces for positioning a menu within a window. This is the same purpose as the interface PopupPositionProvider, except Vertical and Horizontal separate out the positioning logic for each direction individually.

Link copied to clipboard

Transformer for converting between nullable Dp values and their string representation. Empty strings are converted to null values.

Link copied to clipboard

Transformer for converting between nullable Float values and their string representation. Empty strings are converted to null values.

Link copied to clipboard
data class RadioButtonColors(val selectedColor: Color, val unselectedColor: Color, val disabledSelectedColor: Color, val disabledUnselectedColor: Color)
Link copied to clipboard
Link copied to clipboard
class SwitchColors(checkedThumbColor: Color, checkedTrackColor: Color, checkedBorderColor: Color, checkedIconColor: Color, uncheckedThumbColor: Color, uncheckedTrackColor: Color, uncheckedBorderColor: Color, uncheckedIconColor: Color, disabledCheckedThumbColor: Color, disabledCheckedTrackColor: Color, disabledCheckedBorderColor: Color, disabledCheckedIconColor: Color, disabledUncheckedThumbColor: Color, disabledUncheckedTrackColor: Color, disabledUncheckedBorderColor: Color, disabledUncheckedIconColor: Color)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
sealed interface TooltipScope
Link copied to clipboard
Link copied to clipboard

Scope class providing context for TransformableTextField slot content.

Link copied to clipboard
interface Transformer<Value>

Interface for transforming values to and from string representation.

Functions

Link copied to clipboard
Link copied to clipboard
fun <Value> MutableState<String>.bindTransform(value: Value, onValueChange: (Value) -> Unit, transformer: Transformer<Value>): MutableState<String>

Binds a MutableState to a typed value using a transformer for bidirectional conversion.

Link copied to clipboard
fun Button(modifier: Modifier = Modifier, text: String? = null, isEnabled: Boolean = true, isSelected: Boolean = false, isLoading: Boolean = false, variant: ButtonVariant = ButtonVariant.Primary, shape: Shape? = null, onClick: () -> Unit = {}, contentPadding: PaddingValues = ButtonDefaults.contentPadding, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, content: @Composable () -> Unit? = null)
Link copied to clipboard
Link copied to clipboard
fun Checkbox(modifier: Modifier = Modifier, checked: Boolean, onCheckedChange: (Boolean) -> Unit? = null, enabled: Boolean = true, colors: CheckboxColors = CheckboxDefaults.colors(), interactionSource: MutableInteractionSource = remember { MutableInteractionSource() })
Link copied to clipboard
fun Chip(modifier: Modifier = Modifier, enabled: Boolean = true, selected: Boolean = false, onClick: () -> Unit = {}, contentPadding: PaddingValues = ChipDefaults.contentPadding, shape: Shape = ChipRectShape, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, leadingIcon: @Composable () -> Unit? = null, trailingIcon: @Composable () -> Unit? = null, label: @Composable () -> Unit)
Link copied to clipboard
fun ChipComponent(modifier: Modifier, enabled: Boolean = true, selected: Boolean = false, style: ChipStyle, onClick: () -> Unit, contentPadding: PaddingValues = ChipDefaults.contentPadding, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, leadingIcon: @Composable () -> Unit? = null, trailingIcon: @Composable () -> Unit? = null, label: @Composable () -> Unit)
Link copied to clipboard
fun CommonIconButton(painter: Painter, contentDescription: String? = null, onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, variant: IconButtonVariant = IconButtonVariant.Ghost, tint: Color? = null)
fun CommonIconButton(imageVector: ImageVector, contentDescription: String? = null, onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, variant: IconButtonVariant = IconButtonVariant.Ghost, tint: Color? = null)
Link copied to clipboard
fun CommonListHeader(title: String, actions: @Composable () -> Unit, modifier: Modifier = Modifier)
Link copied to clipboard
fun CommonListItem(isSelected: Boolean, onSelect: () -> Unit? = null, modifier: Modifier = Modifier, isEnabled: Boolean = true, content: @Composable () -> Unit)

Common list item with custom content

fun CommonListItem(title: String, isSelected: Boolean, onSelect: () -> Unit? = null, isEnabled: Boolean = true, modifier: Modifier = Modifier)

Common list item with title display

fun CommonListItem(title: String, isSelected: Boolean, onSelect: () -> Unit? = null, modifier: Modifier = Modifier, isEnabled: Boolean = true, leadingContent: @Composable () -> Unit? = null)

Common list item with title and optional leading content

Link copied to clipboard
fun CommonMenu(expanded: Boolean, onDismissRequest: () -> Unit, content: @Composable CommonMenuScope.() -> Unit)
Link copied to clipboard
fun DefaultChipComponent(modifier: Modifier = Modifier, leadingIcon: @Composable () -> Unit? = null, trailingIcon: @Composable () -> Unit? = null, label: @Composable () -> Unit)
Link copied to clipboard
fun ColumnScope.Divider(modifier: Modifier = Modifier, thickness: Dp = DividerDefaults.Thickness, color: Color = DividerDefaults.color)
fun RowScope.Divider(modifier: Modifier = Modifier, thickness: Dp = DividerDefaults.Thickness, color: Color = DividerDefaults.color)
Link copied to clipboard
fun ElevatedChip(modifier: Modifier = Modifier, enabled: Boolean = true, selected: Boolean = false, onClick: () -> Unit = {}, contentPadding: PaddingValues = ChipDefaults.contentPadding, shape: Shape = ChipRectShape, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, leadingIcon: @Composable () -> Unit? = null, trailingIcon: @Composable () -> Unit? = null, label: @Composable () -> Unit)
Link copied to clipboard
fun HorizontalDivider(modifier: Modifier = Modifier, thickness: Dp = DividerDefaults.Thickness, color: Color = DividerDefaults.color)
Link copied to clipboard
fun Icon(bitmap: ImageBitmap, modifier: Modifier = Modifier, contentDescription: String? = null, tint: Color = LocalContentColor.current)
fun Icon(painter: Painter, modifier: Modifier = Modifier, contentDescription: String? = null, tint: Color = LocalContentColor.current)
fun Icon(imageVector: ImageVector, modifier: Modifier = Modifier, contentDescription: String? = null, tint: Color = LocalContentColor.current)
Link copied to clipboard
fun IconButton(modifier: Modifier = Modifier, enabled: Boolean = true, loading: Boolean = false, variant: IconButtonVariant = IconButtonVariant.Primary, shape: Shape = IconButtonDefaults.ButtonSquareShape, onClick: () -> Unit = {}, contentPadding: PaddingValues = IconButtonDefaults.ButtonPadding, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, content: @Composable () -> Unit)
Link copied to clipboard
fun IconButtonContent(painter: Painter, contentDescription: String? = null, onClick: () -> Unit, modifier: Modifier = Modifier, variant: IconButtonVariant = IconButtonVariant.Ghost, tint: Color? = null, enabled: Boolean = true)
Link copied to clipboard
fun OutlinedChip(modifier: Modifier = Modifier, enabled: Boolean = true, selected: Boolean = false, onClick: () -> Unit = {}, contentPadding: PaddingValues = ChipDefaults.contentPadding, shape: Shape = ChipRectShape, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, leadingIcon: @Composable () -> Unit? = null, trailingIcon: @Composable () -> Unit? = null, label: @Composable () -> Unit)
Link copied to clipboard
fun RadioButton(modifier: Modifier = Modifier, selected: Boolean, onClick: () -> Unit? = null, enabled: Boolean = true, colors: RadioButtonColors = RadioButtonDefaults.colors(), interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, content: @Composable () -> Unit? = null)
Link copied to clipboard
fun rememberTooltipPositionProvider(spacingBetweenTooltipAndAnchor: Dp = TooltipDefaults.SpacingBetweenTooltipAndAnchor): PopupPositionProvider
Link copied to clipboard
fun rememberTooltipState(initialIsVisible: Boolean = false, isPersistent: Boolean = false, mutatorMutex: MutatorMutex = BasicTooltipDefaults.GlobalMutatorMutex): TooltipState
Link copied to clipboard
fun SelectableText(text: AnnotatedString, modifier: Modifier = Modifier, color: Color = LocalContentColor.current, fontSize: TextUnit = TextUnit.Unspecified, fontStyle: FontStyle? = null, fontWeight: FontWeight? = null, fontFamily: FontFamily? = null, letterSpacing: TextUnit = TextUnit.Unspecified, textDecoration: TextDecoration? = null, textAlign: TextAlign = TextAlign.Start, lineHeight: TextUnit = TextUnit.Unspecified, overflow: TextOverflow = TextOverflow.Clip, softWrap: Boolean = true, maxLines: Int = Int.MAX_VALUE, minLines: Int = 1, inlineContent: Map<String, InlineTextContent> = mapOf(), onTextLayout: (TextLayoutResult) -> Unit = {}, style: TextStyle = LocalTextStyle.current)
Link copied to clipboard
fun <V> SelectButton(value: V, choices: List<V>, onSelect: (V) -> Unit, title: (V) -> String, modifier: Modifier = Modifier, itemDetail: (V) -> String? = { null })
fun <V> SelectButton(choices: List<V>, currentIndex: Int, onSelect: (Int) -> Unit, title: (V) -> String, modifier: Modifier = Modifier, itemDetail: (V) -> String? = { null })
Link copied to clipboard
fun SimpleModal(isVisible: Boolean, onDismissRequest: () -> Unit, contentPadding: PaddingValues = PaddingValues(12.dp), content: @Composable () -> Unit)
Link copied to clipboard
fun Surface(modifier: Modifier = Modifier, shape: Shape = RectangleShape, color: Color = PreviewLabTheme.colors.surface, contentColor: Color = contentColorFor(color), shadowElevation: Dp = 0.dp, border: BorderStroke? = null, content: @Composable () -> Unit)
fun Surface(onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, shape: Shape = RectangleShape, color: Color = PreviewLabTheme.colors.background, contentColor: Color = contentColorFor(color), shadowElevation: Dp = 0.dp, border: BorderStroke? = null, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, content: @Composable () -> Unit)
fun Surface(selected: Boolean, onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, shape: Shape = RectangleShape, color: Color = PreviewLabTheme.colors.background, contentColor: Color = contentColorFor(color), shadowElevation: Dp = 0.dp, border: BorderStroke? = null, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, content: @Composable () -> Unit)
fun Surface(checked: Boolean, onCheckedChange: (Boolean) -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, shape: Shape = RectangleShape, color: Color = PreviewLabTheme.colors.background, contentColor: Color = contentColorFor(color), shadowElevation: Dp = 0.dp, border: BorderStroke? = null, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, content: @Composable () -> Unit)
Link copied to clipboard
fun Switch(checked: Boolean, onCheckedChange: (Boolean) -> Unit?, modifier: Modifier = Modifier, thumbContent: @Composable () -> Unit? = null, enabled: Boolean = true, colors: SwitchColors = SwitchDefaults.colors(), interactionSource: MutableInteractionSource = remember { MutableInteractionSource() })
Link copied to clipboard
fun Tab(selected: Boolean, onClick: () -> Unit, text: @Composable () -> Unit)
Link copied to clipboard
fun <T> TabPager(tabs: List<T>, title: (T) -> String, pagerState: PagerState, modifier: Modifier = Modifier, content: @Composable (tab: T) -> Unit)
Link copied to clipboard
fun TabRow(modifier: Modifier = Modifier, content: @Composable () -> Unit)
Link copied to clipboard
fun Text(text: String, modifier: Modifier = Modifier, color: Color = LocalContentColor.current, fontSize: TextUnit = TextUnit.Unspecified, fontStyle: FontStyle? = null, fontWeight: FontWeight? = null, fontFamily: FontFamily? = null, letterSpacing: TextUnit = TextUnit.Unspecified, textDecoration: TextDecoration? = null, textAlign: TextAlign = TextAlign.Start, lineHeight: TextUnit = TextUnit.Unspecified, overflow: TextOverflow = TextOverflow.Clip, softWrap: Boolean = true, maxLines: Int = Int.MAX_VALUE, minLines: Int = 1, onTextLayout: (TextLayoutResult) -> Unit = {}, style: TextStyle = LocalTextStyle.current)
fun Text(text: AnnotatedString, modifier: Modifier = Modifier, color: Color = LocalContentColor.current, fontSize: TextUnit = TextUnit.Unspecified, fontStyle: FontStyle? = null, fontWeight: FontWeight? = null, fontFamily: FontFamily? = null, letterSpacing: TextUnit = TextUnit.Unspecified, textDecoration: TextDecoration? = null, textAlign: TextAlign = TextAlign.Start, lineHeight: TextUnit = TextUnit.Unspecified, overflow: TextOverflow = TextOverflow.Clip, softWrap: Boolean = true, maxLines: Int = Int.MAX_VALUE, minLines: Int = 1, inlineContent: Map<String, InlineTextContent> = mapOf(), onTextLayout: (TextLayoutResult) -> Unit = {}, style: TextStyle = LocalTextStyle.current)
Link copied to clipboard
fun TooltipScope.Tooltip(modifier: Modifier = Modifier, caretSize: DpSize = TooltipDefaults.CaretSize, maxWidth: Dp = TooltipDefaults.MaxWidth, shape: Shape = TooltipDefaults.Shape, containerColor: Color = PreviewLabTheme.colors.surface, shadowElevation: Dp = TooltipDefaults.ShadowElevation, content: @Composable () -> Unit)
Link copied to clipboard
fun TooltipBox(modifier: Modifier = Modifier, positionProvider: PopupPositionProvider = rememberTooltipPositionProvider(), tooltip: @Composable TooltipScope.() -> Unit, state: TooltipState = rememberTooltipState(), focusable: Boolean = true, enableUserInput: Boolean = true, content: @Composable () -> Unit)
fun TooltipBox(tooltip: String, modifier: Modifier = Modifier, positionProvider: PopupPositionProvider = rememberTooltipPositionProvider(), state: TooltipState = rememberTooltipState(), focusable: Boolean = true, enableUserInput: Boolean = true, content: @Composable () -> Unit)
Link copied to clipboard
fun <Value> TransformableOutlinedTextField(value: Value, onValueChange: (Value) -> Unit, transformer: Transformer<Value>, modifier: Modifier = Modifier, enabled: Boolean = true, readOnly: Boolean = false, textStyle: TextStyle = PreviewLabTheme.typography.input, keyboardOptions: KeyboardOptions = KeyboardOptions.Default, keyboardActions: KeyboardActions = KeyboardActions.Default, singleLine: Boolean = false, maxLines: Int = if (singleLine) 1 else Int.MAX_VALUE, minLines: Int = 1, visualTransformation: VisualTransformation = VisualTransformation.None, onTextLayout: TransformableTextFieldSlotScope.(TextLayoutResult) -> Unit = {}, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, placeholder: @Composable TransformableTextFieldSlotScope.() -> Unit? = null, prefix: @Composable TransformableTextFieldSlotScope.() -> Unit? = null, suffix: @Composable TransformableTextFieldSlotScope.() -> Unit? = null, label: @Composable TransformableTextFieldSlotScope.() -> Unit? = null, leadingIcon: @Composable TransformableTextFieldSlotScope.() -> Unit? = null, trailingIcon: @Composable TransformableTextFieldSlotScope.() -> Unit? = null, supportingText: @Composable TransformableTextFieldSlotScope.() -> Unit? = null, isError: Boolean? = null, shape: Shape = TextFieldDefaults.Shape, colors: TextFieldColors = TextFieldDefaults.colors(), cursorBrush: Brush = SolidColor(colors.cursorColor(isError == true).value))
Link copied to clipboard
fun <Value> TransformableTextField(value: Value, onValueChange: (Value) -> Unit, transformer: Transformer<Value>, modifier: Modifier = Modifier, enabled: Boolean = true, readOnly: Boolean = false, textStyle: TextStyle = PreviewLabTheme.typography.input, keyboardOptions: KeyboardOptions = KeyboardOptions.Default, keyboardActions: KeyboardActions = KeyboardActions.Default, singleLine: Boolean = false, maxLines: Int = if (singleLine) 1 else Int.MAX_VALUE, minLines: Int = 1, visualTransformation: VisualTransformation = VisualTransformation.None, onTextLayout: TransformableTextFieldSlotScope.(TextLayoutResult) -> Unit = {}, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, placeholder: @Composable TransformableTextFieldSlotScope.() -> Unit? = null, prefix: @Composable TransformableTextFieldSlotScope.() -> Unit? = null, suffix: @Composable TransformableTextFieldSlotScope.() -> Unit? = null, label: @Composable TransformableTextFieldSlotScope.() -> Unit? = null, leadingIcon: @Composable TransformableTextFieldSlotScope.() -> Unit? = null, trailingIcon: @Composable TransformableTextFieldSlotScope.() -> Unit? = null, supportingText: @Composable TransformableTextFieldSlotScope.() -> Unit? = null, isError: Boolean? = null, shape: Shape = TextFieldDefaults.Shape, colors: TextFieldColors = TextFieldDefaults.colors(), cursorBrush: Brush = SolidColor(colors.cursorColor(isError == true).value))
Link copied to clipboard
fun TriStateCheckbox(state: ToggleableState, onClick: () -> Unit?, modifier: Modifier = Modifier, enabled: Boolean = true, colors: CheckboxColors = CheckboxDefaults.colors(), interactionSource: MutableInteractionSource = remember { MutableInteractionSource() })
Link copied to clipboard
fun VerticalDivider(modifier: Modifier = Modifier, thickness: Dp = DividerDefaults.Thickness, color: Color = DividerDefaults.color)