Skip to content

Appearance

TypeTryYourSize (Swift)

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.

themeThemeRequired
colorPrimaryTYSColor?Required

Buttons and the tape line on the body; the "connected" dot on the size guide.

colorBackgroundTYSColor?Required
colorTextTYSColor?Required
fontFamilyString?Required

A 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?Required

Corner radius in points (0–32) for cards, inputs and buttons.

fonts[URL]Required

Stylesheets with @font-face rules for the window (Google Fonts only).

let tys = try TryYourSize(publishableKey: "pk_test_…", configuration: .init(
appearance: Appearance(borderRadius: 10),
locale: "es"))

Was this page helpful?