Cartesiandocs

Android · cartesian-ui

Options

CartesianOptions, CartesianFeatures, CartesianTheme, CartesianColors, CartesianStrings and CartesianSlots.

All option classes are immutable. You build them with a Builder, start from DEFAULT, and copy them with toBuilder().

CartesianOptions

BuilderTypeDefault
themeCartesianThemeCartesianTheme.DEFAULT
titleString"Cartesian"
startersList<String>Vertical defaults
featuresCartesianFeaturesCartesianFeatures.DEFAULT
slotsCartesianSlotsAll built-in
stringsCartesianStringsVertical defaults

CartesianFeatures

BuilderTypeDefault
cartFeatureMode (BuiltIn, Host, Off)BuiltIn
wishlistFeatureModeBuiltIn
suggestionsSuggestionMode (Off, Starters, StartersAndFollowUps)StartersAndFollowUps
suggestionPlacementSuggestionPlacement (AboveComposer, Inline)AboveComposer
feedbackBooleantrue
newChatBooleantrue
traceBooleantrue
productTapBooleantrue
voiceBooleantrue

CartesianTheme

BuilderTypeDefault
colorsCartesianColorsSee Theme
fontFamilyFontFamilySpline Sans
displayFontFamilyFontFamilySpline Sans
emphasisFontFamilyFontFamilyIBM Plex Serif Italic
cornerRadiusDp12.dp
showOrbBooleantrue

CartesianColors

background, surface, surfaceMuted, line, lineStrong, ink, inkMuted, inkSubtle, inkFaint, accent, primary, onPrimary, sale, success, successSoft and badge, each a Color. The defaults are listed in Theme.

CartesianStrings

heading(before, emphasis = "", after = ""), subtitle, placeholder, disclaimer, cartName, signedOut.

CartesianSlots

One builder method per slot. The full list and their signatures are in Slots and components. The slot type aliases are:

typealias ControllerSlot = @Composable (controller: CartesianChatController) -> Unit
typealias HeaderSlot = @Composable (controller: CartesianChatController, onClose: (() -> Unit)?) -> Unit
typealias ProductSlot = @Composable (product: Product, controller: CartesianChatController) -> Unit
typealias ProductListSlot = @Composable (products: List<Product>, controller: CartesianChatController) -> Unit
typealias UserMessageSlot = @Composable (message: UserMessage, controller: CartesianChatController) -> Unit
typealias AssistantMessageSlot = @Composable (message: AssistantMessage, controller: CartesianChatController) -> Unit
typealias ComparisonSlot = @Composable (comparison: Comparison, controller: CartesianChatController) -> Unit
typealias CartUpdateSlot = @Composable (update: CartUpdate, controller: CartesianChatController) -> Unit
typealias SuggestionsSlot = @Composable (suggestions: List<String>, controller: CartesianChatController) -> Unit
kotlin