Documentation

Triba portal embed

The portal bundle (portal.js) mounts <triba-portal>: magic-link sign-in and the signed-in member experience.

Add it to your page

  1. Load the module script with your Concord API key via the triba-key query param, or set data-api-key on the element.
  2. Place <triba-portal></triba-portal> where the widget should render.
index.html
<script
  type="module"
  src="https://cdn.triba.tech/latest/portal.js?triba-key=YOUR_TRIBA_KEY"
></script>
<triba-portal></triba-portal>

Customize with CSS variables

Set custom properties on triba-portal (or on :root for shared defaults). They inherit into the inner root.

Defaults are declared with :where(triba-portal) (low specificity), so a normal triba-portal { … } rule overrides them without !important.

1. Scoping: :root vs triba-portal

Use :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.

2. Colour

VariablePurpose
--triba-primaryBrand 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-rgbText on primary surfaces; RGB used where shadows need it.
--portal-bgPage 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-bgSigned-in top bar only. Default #000000. Independent of --portal-bg.
--portal-hero-gradient-accent, --portal-hero-gradient-strengthSigned-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-fgOptional 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-typographySet to manual on triba-portal to skip automatic trip-list text colours (use your own CSS tokens only).

3. Typography (--triba-*)

VariablePurpose
--triba-fontOptional root font shorthand; otherwise longhands below apply.
--triba-font-style, --triba-font-weight, --triba-font-size, --triba-line-height, --triba-font-familyRoot typography (including the signed-in header bar, which uses --triba-font-family).
--triba-letter-spacing, --triba-font-variant, --triba-font-feature-settingsRoot OpenType / spacing.

Per element

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).

ElementTokens
h1–h6--triba-font-hN or --triba-hN-font-{family,size,weight,line-height}; optional --triba-h1-letter-spacing
p--triba-font-p or --triba-p-font-{family,size,weight,line-height}
label--triba-font-label or --triba-label-font-{family,size,weight,line-height}
input, textarea, select--triba-font-input or --triba-input-font-{family,size,weight,line-height}
button--triba-font-button or --triba-button-font-{family,size,weight,line-height}

HTML attributes

AttributePurpose
data-api-keyConcord API key (x-api-key). Omit if the script URL includes triba-key.
data-router-basenamePrefix for hash routes (default /triba-portal). Use when another script shares location.hash.

Routing

After sign-in, navigation uses only the URL hash; the host path does not change. Examples: #/triba-portal (home) and #/triba-portal/experience/<booking-id>. If that clashes with another router, set data-router-basename or load the embed in an iframe / on a page without competing hash routes.

Live theme

Tweaks apply as inline CSS on <triba-portal> — same tokens as in the docs.

Brand
#fcb124
auto
Shell & background
#2a2927
#444444
auto
Signed-in hero overlay
#fcb124
28%
Typography
16px