Skip to content

Login

The Login template provides a responsive two-column layout for authentication screens. It features a branded image panel on the left and a content area on the right, automatically collapsing to a single centered column below the lg breakpoint. The content area fills its grid column; apply your own max-w-* on the slotted content if a width cap is needed.

Loading Code Block...

The default configuration renders a two-column grid. The left column displays your branded image or illustration using object-cover to fill the panel. The right column holds your authentication content. Below the lg breakpoint (1024 px), the image column is hidden and only the content area is shown.


This example pairs the Login template with AuthButton to create a complete sign-in screen with OAuth provider buttons.


Loading Code Block...

When , the template switches from a two-column grid to a single centered column. The content area is horizontally and vertically centered on the page at every breakpoint.

Loading Code Block...

The accepts any content, so you can embed the Hubtel Authentication SDK via an iframe instead of using AuthButton components. You will need two values from your Hubtel dashboard:

  • BASE_URL — The authentication service endpoint (e.g. https://auth.hubtel.com)
  • APP_ID — Your application’s unique identifier
Loading Code Block...

The Login template adapts automatically based on viewport width.

ViewportLayout
Below sm (~640 px)Image column hidden; content area fills full width and is centered.
sm and aboveTwo-column grid: image panel (left, sticky h-screen) + content area (right, max-w-[480px]).

When , the template renders a single centered column at every breakpoint — no grid is used.

With image:

┌──────────────────────────────────────────────────┐
│ min-h-screen │
│ ┌─────────────────┐ ┌──────────────────────┐ │
│ │ Image Panel │ │ Content Area │ │
│ │ (sticky top) │ │ (max-w: 480px) │ │
│ │ hidden < sm │ │ centered vertically │ │
│ │ │ │ │ │
│ └─────────────────┘ └──────────────────────┘ │
└──────────────────────────────────────────────────┘

Without image:

┌──────────────────────────────────────────────────┐
│ min-h-screen │
│ ┌──────────────────────┐ │
│ │ Content Area │ │
│ │ (max-w: 480px) │ │
│ │ centered both axes │ │
│ └──────────────────────┘ │
└──────────────────────────────────────────────────┘

  • Always set a descriptive title attribute on iframes (e.g. title="Hubtel Authentication") so screen readers can announce the embedded content.
  • Use semantic <form>, <label>, and <button> elements when building custom sign-in forms.
  • Provide alt text on all images in the branding panel.
  • The image column is purely decorative — it is hidden on smaller screens and should not contain interactive content that users would miss.