invoke

operator fun BreakpointQueryProvider.invoke(createModifier: () -> Modifier)(source)

Declare a style that applies within the provided breakpoint(s).

When applied to a single breakpoint, this style is active from the beginning of the breakpoint to all larger breakpoints.

When applied to a breakpoint range, this style is active from the beginning of the lower breakpoint to the end of the range, which may be inclusive or exclusive depending on the range.

Examples:

  • MD { ... } will apply to desktops, wide screens, and ultra wide screens.

  • (SM .. MD) { ... } will apply for tablets through desktops but not for mobile devices nor wide screens

  • (SM ..< LG) { ... } will apply for tablets through desktops but not for mobile devices nor wide screens

  • (ZERO ..< SM) { ... } will only apply to mobile devices. Note that until(SM) { ... } is recommended in this case.

See also


operator fun CssRule.invoke(createModifier: () -> Modifier)(source)