androidx.compose.ui.graphics

Shape

Interface · from org.jetbrains.compose.ui:ui-graphics:1.12.2

An outline that a component uses for its background, border, shadow and clipping.

Shape is an interface. You don't implement it yourself in most apps. You pass one of the kinds below, or a ready-made value.

interface Shape

Kinds of Shape

Anywhere a Shape is expected, you can pass any of these.

How to get one

The usual way is RoundedCornerShape(8.dp) or a value from the theme, like MaterialTheme.shapes.medium. See the Shapes guide.

Ready-made values and functions that return it

4 more

Or create one of the kinds listed above.

Used by

Parameters that take a Shape.

83 more

Functions

createOutline

fun createOutline(
    size: Size,
    layoutDirection: LayoutDirection,
    density: Density,
): Outline

Creates Outline of this shape for the given size.