Package-level declarations

Types

Link copied to clipboard

A set of 4 paddings, each with a start, top, end, and bottom value.

Properties

Link copied to clipboard

Determine whether the current color is a bright tone.

Determine whether the current color is a bright tone.

val <Error class: unknown class>.isBrightColor: <Error class: unknown class>

Determine whether the current color is a bright tone.

Link copied to clipboard

Functions

Link copied to clipboard
fun Modifier.borderOrElse(border: BorderStroke, shape: Shape = RectangleShape): Modifier
fun Modifier.borderOrElse(width: Dp, color: Color, shape: Shape = RectangleShape): Modifier

Workaround for BorderStroke.width is 0.dp like Dp.Hairline, you can see another borderOrElse for more details.

fun Modifier.borderOrElse(width: Dp, brush: Brush, shape: Shape = RectangleShape): Modifier

Workaround for BorderStroke.width is 0.dp like Dp.Hairline, which will cause the Modifier.border still draw a border, see here.

Link copied to clipboard
fun Modifier.clickable(interactionSource: MutableInteractionSource? = null, indication: Indication? = null, enabled: Boolean = true, onClickLabel: String? = null, role: Role? = null, onClick: () -> Unit): Modifier

Extension for foundationClickable.

Link copied to clipboard
fun Modifier.combinedClickable(interactionSource: MutableInteractionSource? = null, indication: Indication? = null, enabled: Boolean = true, onClickLabel: String? = null, role: Role? = null, onLongClickLabel: String? = null, onLongClick: () -> Unit? = null, onDoubleClick: () -> Unit? = null, onClick: () -> Unit): Modifier
Link copied to clipboard

Creates a padding of all dp along all 4 edges.

fun ComponentPadding(horizontal: Dp = 0.dp, vertical: Dp = 0.dp): ComponentPadding

Creates a padding of horizontal dp along the left and right edges, and of vertical dp along the top and bottom edges.

fun ComponentPadding(start: Dp = 0.dp, top: Dp = 0.dp, end: Dp = 0.dp, bottom: Dp = 0.dp): ComponentPadding

Creates a padding to be applied along the edges inside a box.

Link copied to clipboard
fun Modifier.componentState(enabled: Boolean, disabledAlpha: Float = 0.5f): Modifier

Draw content with disabledAlpha if enabled is false.

Link copied to clipboard
fun HapticFeedback(type: HapticFeedbackType = HapticFeedbackType.LongPress, handler: () -> Unit): () -> Unit

Returns a callback to add haptic feedback on touch or click event.

Link copied to clipboard
inline fun ImageVector(name: String = DefaultGroupName, defaultWidth: Dp, defaultHeight: Dp, viewportWidth: Float, viewportHeight: Float, tintColor: Color = Color.Unspecified, tintBlendMode: BlendMode = BlendMode.SrcIn, autoMirror: Boolean = false, builder: ImageVector.Builder.() -> Unit): ImageVector
Link copied to clipboard
fun mixColorOf(color1: Color, color2: Color, ratio: Float = 0.5f): Color

Mix two colors.

fun mixColorOf(color1: Color, color2: Color, ratio: Float = 0.5f): Color

Mix two colors.

fun mixColorOf(color1: <Error class: unknown class>, color2: <Error class: unknown class>, ratio: Float = 0.5f): <Error class: unknown class>

Mix two colors.

Link copied to clipboard

Offset extension, if Offset is not specified, return null.

Size extension, if Size is not specified, return null.

Color extension, if Color is not specified, return null.

ScaleFactor extension, if ScaleFactor is not specified, return null.

fun Dp.orNull(): Dp?

Dp extension, if Dp is not specified, return null.

DpOffset extension, if DpOffset is not specified, return null.

DpSize extension, if DpSize is not specified, return null.

TextUnit extension, if TextUnit is not specified, return null.

Link copied to clipboard
fun Modifier.selectable(selected: Boolean, interactionSource: MutableInteractionSource? = null, indication: Indication? = null, enabled: Boolean = true, role: Role? = null, onClick: () -> Unit): Modifier

Extension for foundationSelectable.

Link copied to clipboard
fun BorderStroke.solidColor(default: Color = Color.Unspecified): Color

Returns the solid color of the BorderStroke.brush, or default if the BorderStroke.brush is not a SolidColor.

Link copied to clipboard
fun <Error class: unknown class>.toComposeColor(): Color

Convert UIColor to Color.

Link copied to clipboard
fun Modifier.toggleable(value: Boolean, interactionSource: MutableInteractionSource? = null, indication: Indication? = null, enabled: Boolean = true, role: Role? = null, onValueChange: (Boolean) -> Unit): Modifier

Extension for foundationToggleable.

Link copied to clipboard

Convert Color to hex string.

Convert AwtColor to hex string.

fun <Error class: unknown class>.toHexColor(): <Error class: unknown class>

Convert UIColor to hex string.

toPlatformColor
Link copied to clipboard
fun Color.toPlatformColor(): <Error class: unknown class>

Convert Color to UIColor.