Color

@ExperimentalCoroutinesApi()
interface Color : StyleParams

This context interface offers functions to style the color related CSS properties of a component.

It only offers two functions

  • color for setting the color, and

  • opacity for setting the opacity of a component.

Both functions have two variants, one for setting the property for all media devices at once and another for setting the properties for each media device independently.

Functions

color
Link copied to clipboard
open fun color(value: Colors.() -> ColorProperty)
This function sets the color property for all media devices.
open fun color(sm: Colors.() -> ColorProperty? = null, md: Colors.() -> ColorProperty? = null, lg: Colors.() -> ColorProperty? = null, xl: Colors.() -> ColorProperty? = null)
This function sets the color property for each media device independently.
opacity
Link copied to clipboard
open fun opacity(value: WeightedValueProperty)
This function sets the opacity property for all media devices.
open fun opacity(sm: WeightedValueProperty? = null, md: WeightedValueProperty? = null, lg: WeightedValueProperty? = null, xl: WeightedValueProperty? = null)
This function sets the opacity property for each media device independently.

Properties

lgProperties
Link copied to clipboard
abstract val lgProperties: StringBuilder
collects the properties for large screens
mdProperties
Link copied to clipboard
abstract val mdProperties: StringBuilder
collects the properties for middle-sized screens
smProperties
Link copied to clipboard
abstract val smProperties: StringBuilder
collects the properties for small screens
xlProperties
Link copied to clipboard
abstract val xlProperties: StringBuilder
collects the properties for extra-large screens

Inheritors

BasicParams
Link copied to clipboard