Package-level declarations

The design system: CgsTheme, the color palette, and the type scale. This is what you touch to make the SDK's screens look like your app.

Types

Link copied to clipboard
class CgsColors(val foreground: CgsColors.Foreground, val border: CgsColors.Border, val background: CgsColors.Background, val surface: CgsColors.Surface, val floating: CgsColors.Floating, val buttons: CgsColors.Buttons, val brand: CgsColors.Brand)

The full color palette of the design system, grouped by the semantic groups.

Link copied to clipboard
object CgsTheme

Reads the design system currently in effect.

Link copied to clipboard
class CgsTypography(val title: CgsTypography.Title = Title(), val text: CgsTypography.Text = Text())

The full type scale of the design system, grouped by typeface.

Functions

Link copied to clipboard

Builds the dark color scheme for a brand, derived from a single brand color and an accent color.

Link copied to clipboard

Builds the light color scheme for a brand, derived from a single brand color and an accent color.

Link copied to clipboard

The default color scheme matching darkTheme, e.g. cgsColorScheme(isSystemInDarkTheme()).

fun cgsColorScheme(darkTheme: Boolean, brand: Color, accent: Color): CgsColors

The branded color scheme matching darkTheme, derived from brand and accent.

Link copied to clipboard
fun CgsTheme(colorScheme: CgsColors = CgsTheme.colorScheme, typography: CgsTypography = CgsTheme.typography, content: @Composable () -> Unit)

Provides the SDK's design system to everything composed inside it.

Link copied to clipboard
fun darkColorScheme(foreground: CgsColors.Foreground = StandardDarkColors.foreground, border: CgsColors.Border = StandardDarkColors.border, background: CgsColors.Background = StandardDarkColors.background, surface: CgsColors.Surface = StandardDarkColors.surface, floating: CgsColors.Floating = StandardDarkColors.floating, buttons: CgsColors.Buttons = StandardDarkColors.buttons, brand: CgsColors.Brand = StandardDarkColors.brand): CgsColors

The default dark color scheme. Override a group to customize it wholesale; note that the brand-* tokens of the other groups do not follow a custom brand set — use brandedDarkColorScheme to derive a whole scheme from a brand color.

Link copied to clipboard
fun lightColorScheme(foreground: CgsColors.Foreground = StandardLightColors.foreground, border: CgsColors.Border = StandardLightColors.border, background: CgsColors.Background = StandardLightColors.background, surface: CgsColors.Surface = StandardLightColors.surface, floating: CgsColors.Floating = StandardLightColors.floating, buttons: CgsColors.Buttons = StandardLightColors.buttons, brand: CgsColors.Brand = StandardLightColors.brand): CgsColors

The default light color scheme. Override a group to customize it wholesale; note that the brand-* tokens of the other groups do not follow a custom brand set — use brandedLightColorScheme to derive a whole scheme from a brand color.