ParaPort exposes design tokens as CSS variables under the .paraport root and ships its styles in named cascade layers to avoid clashes with host apps. You can theme globally or per instance.
If your app uses Tailwind or other utility CSS, declare a global layer order and import ParaPort CSS into its own layer to keep utility precedence predictable.
/* e.g., src/styles.css or assets/main.css */
@layer base, components, paraport-base, paraport-components, utilities, paraport-utilities;
/* Import the SDK CSS into the paraport-base layer */
@import '@paraport/vue/style' layer(paraport-base);
/* Optional minimal reset */
@layer base {
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
}
Import this stylesheet once in your app entry (Nuxt/Nuxt Content: add to nuxt.config.ts via css: ['~/assets/main.css']).
Tip: Avoid unlayered global resets like
* { margin:0 }outside a layer — they will outrank layered utilities and can break spacing.
appearance)Override tokens on a single component using the appearance prop (or option) — a map of CSS variables to values.
@paraport/vue):<Paraport
:appearance="{ '--radius': '12px', '--accent-blue': '#4f46e5' }"
themeMode="auto"
...
/>
@paraport/react):<Paraport
appearance={{ '--radius': '12px', '--accent-blue': '#4f46e5' }}
themeMode="dark"
{...otherProps}
/>
@paraport/sdk):paraport.init({
integratedTargetId: 'paraport-root',
appearance: { '--radius': '12px', '--accent-blue': '#4f46e5' },
themeMode: 'auto', // 'light' | 'dark' | 'auto'
...
})
Common variables include border radii, colors, and surfaces. Inspect the .paraport node in DevTools to discover applied variables.
themeMode)Control tokens with themeMode:
auto (default) — follows the system preference. The SDK listens for dark‑mode changes.light — forces light tokens.dark — forces dark tokens.Use either globally (by setting variables under .paraport) or per instance via the prop.
import '@paraport/vue/style' (in main.ts or global stylesheet). For Tailwind, prefer the layered @import approach above.import '@paraport/react/style' in your root entry. With Tailwind, you may also import the Vue style into a global stylesheet with layer(paraport-base) to control precedence.import '@paraport/sdk/style' before init().The full list of CSS variables used by the SDK (tokens and component styles) lives in the Vue package stylesheet:
Use this as the canonical reference to see available variables and their defaults.
@layer order is declared and avoid unlayered resets.layer(paraport-base) so Tailwind defaults don’t override your utilities.If you import @paraport/vue/style from a plugin, it can load after your Tailwind utilities. Tailwind’s universal variables rule inside the SDK (*,::before,::after { --tw-translate-...: 0; }) may then reset translate variables and break centering like -translate-1/2.
Fix: import the SDK CSS earlier and within a named layer so your utilities win:
/* Keep existing order */
@layer base, components, paraport-base, paraport-components, utilities, paraport-utilities;
@import '@paraport/vue/style' layer(paraport-base);
@import 'tailwindcss';
/* your app styles */
@import '@nuxt/ui';
@import './theme-new-york.css';
This preserves Tailwind utility precedence while keeping ParaPort styles safely layered.
← Parameters