page templates

<tc-block-login>

A ready-made split-screen login page — brand panel on the left, sign-in form on the right — that emits your credentials on submit.

import "@ra9/tan-compose-kit/blocks/login"

Props

NameTypeDefaultDescription
brandstring"Acme"Brand wordmark shown in the side panel.
headlinestring"Everything your team needs, in one place."Marketing headline in the side panel.
featuresstring[] (json)[…3 defaults]Bullet list rendered in the side panel.
titlestring"Welcome back"Form heading.
subtitlestring"Sign in to your account to continue."Text under the form heading.
emailLabelstring"Email"Label for the email field.
passwordLabelstring"Password"Label for the password field.
rememberLabelstring"Remember me"Label for the remember-me checkbox.
submitLabelstring"Sign in"Submit button text.
forgotLabelstring"Forgot password?"Text of the forgot-password link.
forgotHrefstring"#"Href of the forgot-password link.

Events

EventDetailWhen
tc-block-login-submit{ values: { email, password, remember } }Fires when the form is submitted (button click or Enter). preventDefault() cancels nothing — it is informational only.

Slots

SlotDescription
sideReplaces the entire left brand panel.
footerContent below the submit button, e.g. a sign-up link.

CSS variables

VariableDefaultDescription
--tc-block-side-bgvar(--tc-color-surface, #ffffff)Side panel background.
--tc-block-side-fgvar(--tc-color-ink, #14171f)Side panel text color.
--tc-block-side-softvar(--tc-color-ink-soft, #4a5061)Side panel secondary text (features, footer).
--tc-block-surfacevar(--tc-color-surface, #ffffff)Form panel background.
--tc-block-rulevar(--tc-color-rule, #ece5d3)Border color.
--tc-block-radiusvar(--tc-radius-lg, 12px)Corner radius for form controls.
--tc-block-shadowvar(--tc-shadow-md, …)Card shadow.
--tc-block-fontvar(--tc-font-sans, …)Font family.

Examples

<tc-block-login> is a complete login page in one element. It composes tc-input, tc-checkbox, and tc-button into a responsive split layout that stacks on narrow screens. The form is novalidate and never navigates — it hands the collected values to your code through a single event.

Basic usage

<tc-block-login brand="Acme"></tc-block-login> import "@ra9/tan-compose-kit/blocks/login"; import "@ra9/tan-compose-kit/themes/tokens"; document.querySelector("tc-block-login").addEventListener( "tc-block-login-submit", (e) => { const { email, password, remember } = e.detail.values; // authenticate(email, password) }, );

Custom copy

Every visible string is a prop, so you can rebrand the whole page without touching the shadow DOM:

<tc-block-login brand="Northwind" headline="One inbox for every team." submit-label="Log in" forgot-href="/reset" ></tc-block-login> const el = document.querySelector("tc-block-login"); el.features = ["Unlimited projects", "SSO & SCIM", "24/7 support"];

Slots

Replace the brand panel or append to the form footer:

<tc-block-login> <div slot="side"> <!-- your own marketing panel --> </div> <p slot="footer"> New here? <a href="/signup">Create an account</a> </p> </tc-block-login>

The blocks demo previews all five page templates with a switcher, including this one.