Appearance
Colours, font and corner radius for the button and the window. With .inherit (default) the button takes your SwiftUI font and text colour and the window your app’s colours, dark mode included.
Properties
Section titled “Properties”themeThemeRequiredcolorPrimaryTYSColor?RequiredButtons and the tape line on the body; the "connected" dot on the size guide.
colorBackgroundTYSColor?RequiredcolorTextTYSColor?RequiredfontFamilyString?RequiredA CSS font-family for the window (e.g. "Inter, -apple-system, sans-serif"). The native button uses the SwiftUI font of where it is placed.
borderRadiusDouble?RequiredCorner radius in points (0–32) for cards, inputs and buttons.
fonts[URL]RequiredStylesheets with @font-face rules for the window (Google Fonts only).
Example
Section titled “Example”let tys = try TryYourSize(publishableKey: "pk_test_…", configuration: .init( appearance: Appearance(borderRadius: 10), locale: "es"))val tys = TryYourSize(context, "pk_test_…", TryYourSize.Configuration( appearance = Appearance(borderRadius = 10f), locale = "es",))await configure("pk_test_…", { appearance: { variables: { borderRadius: 10 } }, locale: "es" });final tys = await TryYourSize.create('pk_test_…', appearance: const Appearance(borderRadius: 10), locale: 'es');Was this page helpful?
Thank you. We read every answer.