Skip to content

Panel

@Composable



fun Panel(
    modifier: Modifier = Modifier, 
    contentAlignment: Alignment = Alignment.TopStart, 
    contentWidth: Int? = null, 
    texture: String = "surface", 
    variant: String = ThemeVariants.DEFAULT, 
    stateName: String = TextureStates.DEFAULT, 
    contentPadding: Int = 8, 
    drawOverContent: Boolean = false, 
    content: @Composable



 () -> Unit
)

A padded themed Surface used as a general-purpose container for grouped UI content.

Parameters

  • contentAlignment: Alignment of content within the panel.

  • contentWidth: When non-null, the panel's inner content area is fixed to this width (in pixels); the panel itself is sized to fit that plus contentPadding on both sides.

  • texture: The themed texture/style key drawn as the panel's background. See Surface.

  • variant: The theme variant of texture to use. See ThemeVariants.

  • contentPadding: Padding (in pixels) inserted between the panel edge and content.

  • drawOverContent: Forwarded straight to Surface's own parameter of the same name - see its KDoc for when a "*_transparent" variant wants this true.