StyleSchema

@Serializable
data class StyleSchema(val size: SizeSchema, val margin: MarginSchema? = null, val padding: PaddingSchema? = null, val background: BackgroundSchema? = null, val border: BorderSchema? = null, val clip: ClipSchema? = null, val windowInsets: WindowInsetsSchema? = null)

Container for all visual layout and decoration properties applied to a tile.

The client applies these properties in the following order (via Modifier.styledWith()):

  1. windowInsets — padding to avoid overlapping system UI (status bar, nav bar, IME…)

  2. margin — outer spacing around the tile (applied as Modifier.padding outside the size)

  3. size — width and height constraints

  4. clip — shape clip applied before background, so the background respects the shape

  5. background — fill: solid color or gradient, with an optional alpha

  6. onClick (injected by tile, not part of this schema)

  7. border — drawn over the background, after clip

  8. padding — inner spacing between the border and content

Notes:

  • size is the only mandatory field; all others are optional.

  • StyleSchema.default() fills both width and height.

  • The order of clip before background means the background is already clipped — no need to set both clip and a rounded border.radius to get rounded corners; clip alone is sufficient for a rounded background.

  • background supports solid colors and linear/horizontal/vertical/radial/sweep gradients (see BackgroundSchema); blur is not implemented yet.

Constructors

Link copied to clipboard
constructor(size: SizeSchema, margin: MarginSchema? = null, padding: PaddingSchema? = null, background: BackgroundSchema? = null, border: BorderSchema? = null, clip: ClipSchema? = null, windowInsets: WindowInsetsSchema? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
@SerialName(value = "background")
val background: BackgroundSchema?
Link copied to clipboard
@SerialName(value = "border")
val border: BorderSchema?
Link copied to clipboard
@SerialName(value = "clip")
val clip: ClipSchema?
Link copied to clipboard
@SerialName(value = "margin")
val margin: MarginSchema?
Link copied to clipboard
@SerialName(value = "padding")
val padding: PaddingSchema?
Link copied to clipboard
@SerialName(value = "size")
val size: SizeSchema
Link copied to clipboard
@SerialName(value = "windowInsets")
val windowInsets: WindowInsetsSchema?