Package-level declarations

Types

Link copied to clipboard

Receiver of every tile builder's style = { } lambda. Accumulates size, spacing, background, border, clip and window-insets settings and compiles them into a StyleSchema via buildStyle. Every setter (size, margin, padding, background, border, clip, windowInsets) simply overwrites its own field — calling one twice keeps only the last value.

Functions

Link copied to clipboard

Fully circular/oval shape — the tile is clipped to an ellipse inscribed in its bounds.

Link copied to clipboard
fun horizontalGradient(vararg colorStops: Pair<Float, ColorSchema>, startX: Int = 0, endX: Int? = null, tileMode: TileModeSchema = TileModeSchema.CLAMP, alpha: Float = 1.0f): BackgroundSchema.HorizontalGradient

Horizontal gradient background running from startX to endX, with explicit color stops. Dimensions are in dp; endX left null means the tile's right edge.

fun horizontalGradient(colors: List<ColorSchema>, startX: Int = 0, endX: Int? = null, tileMode: TileModeSchema = TileModeSchema.CLAMP, alpha: Float = 1.0f): BackgroundSchema.HorizontalGradient

Horizontal gradient background running from startX to endX, with colors spread evenly along the line. Dimensions are in dp; endX left null means the tile's right edge.

Link copied to clipboard
fun linearGradient(vararg colorStops: Pair<Float, ColorSchema>, start: OffsetSchema = OffsetSchema.Zero, end: OffsetSchema? = null, tileMode: TileModeSchema = TileModeSchema.CLAMP, alpha: Float = 1.0f): BackgroundSchema.LinearGradient

Linear gradient background running from start to end, with explicit color stops. Dimensions are in dp; end left null means the far edge of the tile.

fun linearGradient(colors: List<ColorSchema>, start: OffsetSchema = OffsetSchema.Zero, end: OffsetSchema? = null, tileMode: TileModeSchema = TileModeSchema.CLAMP, alpha: Float = 1.0f): BackgroundSchema.LinearGradient

Linear gradient background running from start to end, with colors spread evenly along the line. Dimensions are in dp; end left null means the far edge of the tile.

Link copied to clipboard
fun offset(x: Int? = null, y: Int? = null): OffsetSchema

A dp offset used to position gradients (e.g. linearGradient's start/end, radialGradient/sweepGradient's center).

Link copied to clipboard
fun radialGradient(vararg colorStops: Pair<Float, ColorSchema>, center: OffsetSchema? = null, radius: Int? = null, tileMode: TileModeSchema = TileModeSchema.CLAMP, alpha: Float = 1.0f): BackgroundSchema.RadialGradient

Radial gradient background radiating out from center, with explicit color stops. Dimensions are in dp; center left null means the tile's own center, and radius left null means the largest radius that still fits the tile.

fun radialGradient(colors: List<ColorSchema>, center: OffsetSchema? = null, radius: Int? = null, tileMode: TileModeSchema = TileModeSchema.CLAMP, alpha: Float = 1.0f): BackgroundSchema.RadialGradient

Radial gradient background radiating out from center, with colors spread evenly along the radius. Dimensions are in dp; center left null means the tile's own center, and radius left null means the largest radius that still fits the tile.

Link copied to clipboard
fun radius(topStart: Int = 0, topEnd: Int = 0, bottomStart: Int = 0, bottomEnd: Int = 0): RadiusSchema

Corner radius, in dp, individually per corner — the value fed into roundedCornerShape and border(...).

Link copied to clipboard

Plain rectangular shape — no corner rounding, no clipping applied.

Link copied to clipboard

Rounded-rectangle shape with a fully custom radius per corner.

Rounded-rectangle shape with the same radius, in dp, applied to all four corners.

fun roundedCornerShape(topStart: Int, topEnd: Int, bottomStart: Int, bottomEnd: Int): ShapeSchema.RoundedCornerRectangle

Rounded-rectangle shape with an independent radius per corner, in dp.

Link copied to clipboard

Solid-color background — the shorthand background(color(...)) form used inside a style = { } block also accepts this explicitly when a custom alpha is needed.

Link copied to clipboard
fun sweepGradient(vararg colorStops: Pair<Float, ColorSchema>, center: OffsetSchema? = null, alpha: Float = 1.0f): BackgroundSchema.SweepGradient

Sweep (conic) gradient background rotating around center, with explicit color stops. center left null means the tile's own center.

fun sweepGradient(colors: List<ColorSchema>, center: OffsetSchema? = null, alpha: Float = 1.0f): BackgroundSchema.SweepGradient

Sweep (conic) gradient background rotating around center, with colors spread evenly around the sweep. center left null means the tile's own center.

Link copied to clipboard
fun verticalGradient(vararg colorStops: Pair<Float, ColorSchema>, startY: Int = 0, endY: Int? = null, tileMode: TileModeSchema = TileModeSchema.CLAMP, alpha: Float = 1.0f): BackgroundSchema.VerticalGradient

Vertical gradient background running from startY to endY, with explicit color stops. Dimensions are in dp; endY left null means the tile's bottom edge.

fun verticalGradient(colors: List<ColorSchema>, startY: Int = 0, endY: Int? = null, tileMode: TileModeSchema = TileModeSchema.CLAMP, alpha: Float = 1.0f): BackgroundSchema.VerticalGradient

Vertical gradient background running from startY to endY, with colors spread evenly along the line. Dimensions are in dp; endY left null means the tile's bottom edge.