Documentation
The portal bundle (portal.js) mounts <triba-portal>: magic-link sign-in and the signed-in member experience.
triba-key query param, or set data-api-key on the element.<triba-portal></triba-portal> where the widget should render.<script
type="module"
src="https://cdn.triba.tech/latest/portal.js?triba-key=YOUR_TRIBA_KEY"
></script>
<triba-portal></triba-portal>Set custom properties on triba-portal (or on :root for shared defaults). They inherit into the inner root.
--triba-* — fonts and brand colours (shared with other Triba embeds).--portal-* — portal shell only (page background, header bar, hero overlay gradient, header text).Defaults are declared with :where(triba-portal) (low specificity), so a normal triba-portal { … } rule overrides them without !important.
:root vs triba-portalUse :root when every Triba widget on the page should share the same --triba-* values. Use triba-portal { … } to theme only this portal or to override :root for one instance. Shell tokens such as --portal-bg, --portal-header-bg, and hero gradient tokens only affect the portal; define them on triba-portal unless you deliberately set them on :root for multiple portals.
:root — one global --triba-* baseline for the site or page.triba-portal — overrides and portal-only --portal-* for a single embed.| Variable | Purpose |
|---|---|
--triba-primary | Brand accent (primary buttons, accents, highlights, sign-in card accent bar and input focus). Default #000000. Same as other Triba widgets. |
--triba-on-primary, --triba-on-primary-rgb | Text on primary surfaces; RGB used where shadows need it. |
--portal-bg | Page canvas: sign-in, outer embed fill, and signed-in content column (trip list). Default #f2f1ef. Open-trip detail view uses a white content surface via CSS; the hero still respects this token where applied. |
--portal-header-bg | Signed-in top bar only. Default #000000. Independent of --portal-bg. |
--portal-hero-gradient-accent, --portal-hero-gradient-strength | Signed-in experience hero: tint over the photo on .triba-portal-dash__hero-editorial-gradient. Accent defaults to var(--triba-primary); strength is a percentage for color-mix (default 22%). |
--portal-trips-heading-fg, --portal-trips-muted-fg | Optional overrides for the trip list / empty-state title and supporting text. If unset, the embed picks light or dark text from the page background luminance (see also data-trips-typography). |
data-trips-typography | Set to manual on triba-portal to skip automatic trip-list text colours (use your own CSS tokens only). |
--triba-*)| Variable | Purpose |
|---|---|
--triba-font | Optional root font shorthand; otherwise longhands below apply. |
--triba-font-style, --triba-font-weight, --triba-font-size, --triba-line-height, --triba-font-family | Root typography (including the signed-in header bar, which uses --triba-font-family). |
--triba-letter-spacing, --triba-font-variant, --triba-font-feature-settings | Root OpenType / spacing. |
Headings: --triba-font-h1 … --triba-font-h6 shorthands, or --triba-hN-font-* longhands (N = 1–6). Other tags: --triba-font-p, --triba-font-label, --triba-font-input, --triba-font-button (each with matching --triba-*-font-* longhands).
| Element | Tokens |
|---|---|
h1 |