Ir al contenido

Appearance

Esta página aún no está disponible en tu idioma.

Type@tryyoursize/sdk

Look and feel of the elements and our windows, modelled on Stripe’s Appearance API: a theme, a few variables, and web fonts. The default theme, inherit, reads your page where the element is mounted, so it looks native to your store.

interface Appearance
themeThemeOpcional

"inherit" (default): your page's font, text colour and background. "tryyoursize": our light beige brand.

variablesAppearanceVariablesOpcional
Propiedades
colorPrimarystringOpcional

Buttons and the tape line on the body.

colorBackgroundstringOpcional
colorTextstringOpcional
fontFamilystringOpcional
borderRadiusnumberOpcional

Corner radius in px for cards, inputs and buttons.

fonts{ cssSrc: string }[]Opcional

Stylesheets with @font-face rules (Google Fonts only), like Stripe's cssSrc.

tys.elements({
appearance: {
theme: "inherit",
variables: { colorPrimary: "#3b2f26", fontFamily: "Inter, sans-serif", borderRadius: 8 },
fonts: [{ cssSrc: "https://fonts.googleapis.com/css2?family=Inter:wght@400;600" }],
},
});

¿Te ha resultado útil esta página?