Components

A comprehensive guide to the design system and component library used in the template site.

🛠️ Developer Note: This page serves as both documentation and a testing ground. All components are built with accessibility, responsiveness, and theme support in mind.

Brand Assets

Logos, favicons, and text components for myBetterRates, $MART DEBT Coach, and Talbot Stevens are documented on a dedicated page.

View Brand Assets → Brand Animation Tests

$MART DEBT Coach Logo

Talbot Stevens Assets


More ...

Versatile "More ..." link functionality that adapts to three different modes: Manual Inline (hides text inside paragraph), Auto-Block (truncates content by height), and Simple Link (standard anchor).

Props

Prop Type Default Description
href string undefined If provided, component renders as a standard <a> link. Example: href="/about"
lines number undefined If provided, truncates the wrapped content to this number of lines (approximate) using max-height. Example: lines={3} (note the curly braces for number values)
label string "More ..." The text for the link or button when collapsed.
labelExpanded string "Less" The text for the button when expanded (Inline/Block modes only).

1. Manual Inline Mode

Use Case: You have a paragraph where you want some initial content visible, and the rest hidden until the user clicks the More... link

This is a very long paragraph, that is truncated here,


<p>
  This is a very long paragraph, that is truncated here, 
  <More>
    so that only viewers who want to see all of the content...
  </More>
</p>

2. Auto-Block Mode

Use Case: You have a long section (like a bio or a list) and you want to cap it at a specific height (e.g., 3 lines) with a fade-out effect.

Author Bio (Default Label)

Jane Doe is a senior engineer with over 20 years of experience. She has contributed to major open source projects and speaks at conferences worldwide regarding distributed systems architecture.

She currently lives in Toronto with her two cats.

Author Bio (Custom Label)

Jane Doe is a senior engineer with over 20 years of experience. She has contributed to major open source projects and speaks at conferences worldwide regarding distributed systems architecture.

She currently lives in Toronto with her two cats.


<More lines={3}>
  <p>Jane Doe is a senior engineer...</p>
</More>

<More lines={3} label="Full bio" labelExpanded="Close bio">
  <p>Jane Doe is a senior engineer...</p>
</More>

3. Simple Link Mode

Use Case: A standard link styled consistently with the expanders.

Interested in learning more about our company? More ...


<p>
  Interested in learning more about our company?
  <More href="/about" />
</p>

Video

Responsive video component supporting native HTML5 video, YouTube embeds, and Vimeo embeds with Schema.org VideoObject markup for SEO.

YouTube Embed

Different Aspect Ratios

Usage Notes

  • YouTube: Use youtubeId="VIDEO_ID" for privacy-enhanced embeds (youtube-nocookie.com)
  • Vimeo: Use vimeoId="VIDEO_ID" for Vimeo embeds
  • Native: Use src="VIDEO_URL" for self-hosted HTML5 video
  • Schema.org: Set showSchema={true} to include VideoObject markup for SEO
  • Aspect ratio options: "16/9", "4/3", "1/1"

Typewriter

Animated typewriter effect that cycles through text character by character. Integrates seamlessly with SmartDebt branding and inherits all typography from parent element.

Props

Prop Type Default Description
dynamicText string[] ["one", "two", "three"] Array of strings to cycle through with typewriter effect
typingDelay number 100 Delay in ms between typing each character. Example: typingDelay={150}
deletingDelay number 50 Delay in ms between deleting each character (faster than typing)
dynamicTextDuration number 2000 How long to display complete text before starting to delete
pauseBeforeNext number 500 Pause after deleting before typing next string
cursorChar string "|" Character to use for blinking cursor
showCursor boolean true Whether to show the blinking cursor
dynamicTextClass string undefined CSS class(es) to apply to the dynamic text element. Use this to style the typed text (e.g., dynamicTextClass="smart-debt-entity" to match SmartDebt entity styling)

1. SmartDebt Entities

Showcase all $MART DEBT entities with typewriter effect. The S→$ animation runs independently while entity names cycle. Cursor is hidden for a cleaner look.

SMART DEBT


<h1>
  <Typewriter
    dynamicText={["Coach", "Insights", "Strategies", "Community", "Myths", "App", "Academy"]}
    typingDelay={100}
    dynamicTextDuration={2000}
    dynamicTextClass="smart-debt-entity"
    showCursor={false}
  >
    <SmartDebt delay={0} />
  </Typewriter>
</h1>

2. Hero Title

Use in hero sections with static initial text and dynamic phrases.

Build wealth with


<h1>
  Build wealth with
  <Typewriter
    dynamicText={["smart strategies", "proven methods", "expert guidance"]}
  />
</h1>

Tabs

Simple tabs component using Alpine state. Keyboard and ARIA friendly.

Props

Prop Type Default Description
items Array of objects [] Array of tab items: {id: string, label: string, content: string}
Overview content goes here.
Detailed information appears here.
User reviews and feedback.

Accordion

Accessible accordion with smooth transitions. Single or multiple open.

Props

Prop Type Default Description
items Array of objects [] Array of accordion items: {id: string, title: string, content: string}
An example accordion item.
Click to expand and collapse.
Yes, with roles and focus states.

Buttons

Versatile button component with 6 variants and 4 sizes for different use cases.

Props

Prop Type Default Description
variant "default" | "secondary" | "outline" | "ghost" | "destructive" | "link" "default" Visual style variant of the button
size "sm" | "default" | "lg" | "icon" "default" Size of the button
disabled boolean false Whether the button is disabled
class string "" Additional CSS classes

Variants

Sizes

States

MegaMenu

Multi-column dropdown navigation with AlpineJS interactions. Hover or click to open, press Escape to close. Hidden on mobile (use hamburger menu instead).

Usage Notes

  • Desktop: Hover to open, click to toggle, Escape to close, click outside to close
  • Mobile: Hidden below 768px width (use hamburger menu instead)
  • Keyboard: Tab to navigate items, Enter to select, Escape to close
  • Columns: Auto-fit grid with minimum 200px per column
  • Featured Item: Optional highlighted item with badge support


Layout Components

Structural components for organizing page content and controlling responsive behavior.

Container

Controls maximum width and centers content. Available in "text" (25-100rem), "content" (20-90rem), and "full" sizes.

Essential Layout

Section

Adds vertical spacing between content areas. Supports 9 spacing levels from "xs" to "5xl" using fluid design tokens.

Vertical Spacing

Grid

Responsive CSS Grid system that collapses to 1 column on mobile. Supports 1-12 columns with 4 gap sizes.

Responsive Layout

Cards

Container components with consistent styling for grouping related content.

Props

Prop Type Default Description
style "none" | "header" "none" Card style variant. "header" adds a colored header section with white text (primary color background)
backgroundColor string undefined Custom background color (e.g., "#ececec"). Defaults to "#ececec" when style="header"
class string "" Additional CSS classes

Usage


import Card from "../components/ui/Card.astro";

// Default card
<Card>Content</Card>

// Header style with default background
<Card style="header">
  <h2 slot="title">Title</h2>
  Content
</Card>

// Header style with custom background
<Card style="header" backgroundColor="#f0f0f0">
  <h2 slot="title">Title</h2>
  Content
</Card>

Card Example 1

Simple card for organizing content with consistent styling and shadow.

Card Example 2

Cards automatically adapt to grid layouts and work at all breakpoints.

Card Example 3

Perfect for product listings, testimonials, or feature highlights.


Badges

Small labels for tagging and categorizing content with multiple style variants.

Default
Secondary
Destructive
Outline

Alerts

Inline notification messages for contextual feedback. For page-level notifications with positioning, use Banner component.

✓ Success: Your changes have been saved successfully.

✕ Error: Unable to process your request. Please try again.

Note: For page-level notifications with fixed positioning (top/bottom), use the Banner component instead.


Form Components

Complete form components for creating accessible and functional input forms.


Labels

Accessible form labels properly associated with inputs.

Separators

Visual dividers for separating content sections.

Content before

Content after


Interactive Components

Components for user interaction and control.

Dropdown Menu

Customizable dropdown menu with positioning options.

Switch Toggle

Accessible toggle switches for boolean settings.


Feedback & Notifications

Components for communicating with users through banners, modals, and alerts.

Banner

Sticky banners positioned above or below header. All dismissible.

Props

Prop Type Default Description
variant "info" | "warning" | "success" | "alert" | "highlight" "highlight" Visual style variant of the banner
position "above-header" | "below-header" "below-header" Position of the banner relative to the header
dismissible boolean true Whether the banner can be dismissed by the user
id string auto-generated Unique ID for the banner (used for localStorage persistence)
class string "" Additional CSS classes

Variants

All banner variants can be positioned above or below the header:

  • info - Informational (blue/primary color)
  • warning - Warning (orange/warning color)
  • success - Success (green)
  • alert - Alert/error (red/destructive)
  • highlight - Special offer/highlight (accent color)

Page-Level Demo Banners:

Test Above Header:

Test Below Header:


Modal

Overlayed dialog box with close and action buttons. Test different delay variants.

Props

Prop Type Default Description
title string "Modal" Modal title/heading text
delay number 0 Milliseconds before auto-opening the modal. Use 0 (default) for manual-only open via show(). This showcase keeps delays off so the page stays interactive.
dismissible boolean true Whether the modal can be closed by the user
backdrop boolean true Whether to show the backdrop overlay
size "sm" | "md" | "lg" "md" Size of the modal dialog
id string auto-generated Unique ID for the modal (used for programmatic control)
class string "" Additional CSS classes

Manual Triggers:


Supporting Components

Navigation, gallery, and comparison components for enhanced user experience.

Breadcrumbs

Navigation breadcrumb trail with Schema.org BreadcrumbList markup. Shows hierarchical page location with semantic HTML.

Props

Prop Type Default Description
crumbs Crumb[] - Array of breadcrumb items
showSchema boolean true Include Schema.org markup
separator string "/" Separator character
class string "" Additional CSS classes

Pagination

Page navigation with ellipsis for large page ranges. Includes first/last and prev/next buttons with ARIA labels.

Props

Prop Type Default Description
currentPage number - Current page (1-indexed)
totalPages number - Total number of pages
baseUrl string - Base URL for links
showFirstLast boolean true Show first/last buttons
showPrevNext boolean true Show prev/next buttons
maxVisible number 7 Max visible page numbers

Image Gallery

Responsive image grid with optional lightbox modal. Click images to view fullsize. Keyboard navigation with arrow keys and Escape.

Props

Prop Type Default Description
images GalleryImage[] - Array of image objects
columns 2 | 3 | 4 3 Number of columns
lightbox boolean true Enable lightbox modal
class string "" Additional CSS classes

Comparison Table

Feature comparison table for pricing tiers. Responsive with sticky header and fixed first column for horizontal scrolling.

Props

Prop Type Default Description
title string - Optional table title
features Feature[] - Array of features
highlightColumn "basic" | "pro" | "enterprise" - Column to highlight
class string "" Additional CSS classes

Pricing Plans Comparison

Feature Basic Pro Recommended Enterprise
Users 1-5 1-25 Unlimited
Storage 10 GB 100 GB 1 TB
Email Support
Priority Support
Custom Integrations
Advanced Analytics
API Access
SSO/SAML
Dedicated Account Manager
SLA Guarantee 99.5% 99.9%

Mini-Apps

Standalone SvelteKit apps, embeddable anywhere via a single <iframe> tag.

Architecture

  • Mini-apps live in apps/ — each is a standalone SvelteKit PWA deployed independently to Cloudflare Pages
  • Client-side apps (e.g. gross-up): pure Svelte 5 logic, no backend, deployed as static SPA
  • Proprietary apps (future): SvelteKit frontend + private API backend — backend is invisible to the embedder
  • Embed pattern: one <iframe> tag — works on any website, blog, or third-party page
apps/sd-app → deployed to sd-app-eu1.pages.dev │ ├── /ca/en/gross-up ← client-side SvelteKit, pure math (EN) ├── /ca/fr/gross-up ← same calculator, French (FR) ├── /ca/en/demo ← client-side SvelteKit ├── /ca/en/int-only ← stub └── /ca/en/term-loan ← stub Any website embeds with one line: <iframe src="https://sd-app-eu1.pages.dev/ca/en/gross-up"></iframe> Future proprietary app: <iframe src="https://analysis.smartdebt.ca/equity"></iframe> (backend API called internally — embedder never sees it)

Live Demo — RRSP Gross-Up Calculator:


Embed Code:

<!-- Client-side mini-app (no backend required) -->
<iframe
  src="https://sd-app-eu1.pages.dev/ca/en/gross-up?embed"
  title="RRSP Gross-Up Calculator"
  width="100%" height="400"
  style="border:none; border-radius:0.5rem;"
  loading="lazy"
></iframe>

<!-- Proprietary mini-app (backend called internally) -->
<iframe
  src="https://analysis.smartdebt.ca/equity-report"
  title="Equity Analysis"
  width="100%" height="700"
  style="border:none; border-radius:0.5rem;"
  loading="lazy"
></iframe>

CTA Blocks

4 call-to-action block variants for conversion optimization. All variants are fully responsive and support multiple background styles.

Common Props

Prop Type Default Description
title string Required Main heading text
description string? - Optional description text
primaryCTA { text: string, href: string } Required Primary call-to-action button
secondaryCTA { text: string, href: string }? - Optional secondary CTA button
background "default" | "muted" | "primary" | "gradient" "muted" Background style variant
class string "" Additional CSS classes

CTACentered

Centered CTA with title, description, and buttons. Supports 4 background variants.

Ready to Transform Your Practice?

Join thousands of financial advisors who've mastered client-first leveraging strategies.

Exclusive Webinar Starting Soon

Don't miss our live training on advanced debt optimization techniques.

Limited Time Offer

Get 50% off your first year of our premium membership.

CTASideBySide

Two-column layout with copy and optional image. Image position is configurable (left or right).

Professional consultation

Unlock Your Clients' Financial Potential

Our proven framework helps you implement strategic debt solutions that deliver measurable results for high-net-worth clients.

Training materials

Comprehensive Training Program

Master every aspect of client-first leveraging with our step-by-step certification course.

CTABanner

Slim horizontal banner for in-content CTAs. Dismissible with localStorage persistence.

CTANewsletter

Email capture CTA that wraps the NewsletterForm component. Supports multiple background styles.

Usage Notes

  • CTACentered: Best for section endings, conversion points, or page transitions. Use padding="lg" for high-impact CTAs.
  • CTASideBySide: Ideal for feature highlights or promotional sections. Image position can be configured with imagePosition="left|right".
  • CTABanner: Perfect for announcements, limited-time offers, or secondary CTAs. Dismissal state persists via localStorage using the id prop.
  • CTANewsletter: Email capture CTA wrapping NewsletterForm. Includes GDPR consent checkbox (configurable) and form validation.
  • All CTA buttons automatically stack on mobile devices (width < 640px) for better usability.
  • Background variants: "default" (transparent), "muted" (subtle), "primary" (brand color), "gradient" (gradient effect).

Hero Blocks

5 hero block variants for different page types and use cases. All variants are fully responsive and WCAG AA compliant.

Common Props

Prop Type Default Description
title string Required Main heading text
subtitle string? - Optional subtitle above title
description string? - Optional description below title
primaryCTA { text: string, href: string } - Primary call-to-action button
secondaryCTA { text: string, href: string }? - Optional secondary CTA button
class string "" Additional CSS classes

HeroCentered

Default homepage hero with centered copy and CTAs. Supports optional background image with overlay.

Smart Debt Coaching

Transform Your Clients' Financial Future

Help your clients leverage debt strategically to build wealth faster while protecting what matters most.

HeroImageLeft

Two-column layout with image on left, copy on right. Ideal for services pages or feature highlights.

Financial advisor consulting with client

Our Services

Client-First Leveraging Strategy

Comprehensive debt optimization framework designed specifically for financial advisors serving high-net-worth clients.

HeroImageRight

Two-column layout with copy on left, image on right. Perfect for about pages or alternating content layouts.

About Us

Trusted by Financial Advisors Nationwide

With 25+ years of experience, we've helped thousands of advisors implement smart debt strategies that deliver results for their clients.

Professional team meeting

HeroBackgroundImage

Full-width background image with customizable overlay and text alignment. High-impact design for landing pages.

Free Webinar

Master the Art of Strategic Debt

Join our exclusive webinar and discover how top advisors use debt to accelerate wealth building for their clients.

HeroWithStats

Hero section with stats strip for credibility. Combines centered hero with key metrics to build trust.

Industry Leader

Empowering Advisors to Deliver Exceptional Results

Our proven framework helps financial advisors implement client-first leveraging strategies that drive measurable outcomes.

10,000+
Clients Served

Financial advisors nationwide

95%
Success Rate

Client satisfaction

$500M+
Assets Managed

Under advisement

25+
Years Experience

Industry expertise

Usage Notes

  • All hero variants use fluid typography with clamp() for responsive text sizing
  • Background images and overlays maintain WCAG AA contrast ratios for text readability
  • CTA buttons automatically stack on mobile devices (width < 640px)
  • Image variants use aspect-ratio: 4/3 and loading="lazy" for performance
  • HeroWithStats imports the Stats component - ensure stats array has 2-4 items for optimal display

Component Library Overview

16+
Components
100%
Accessible
100%
TypeScript
Themeable

All components are built with Astro + Alpine.JS, fully typed with TypeScript, fully accessible, and include comprehensive documentation. Visit the documentation for more details.