Sign-up split screen
A two-column sign-up page: what you get on one side, the registration form on the other.
Installation
bash
npx bootcn add signup-splitbash
pnpm dlx bootcn add signup-splitbash
yarn dlx bootcn add signup-splitbash
bunx --bun bootcn add signup-splitThe CLI also installs the design tokens and these blocks and components: input, checkbox, button. It prints the <link> and <script> tags to add to your layout.
Usage
Use it as the content of the sign-up page's <main>. Replace the pitch and the feature list with your own. On phones only the logo stays above the form.
Accessibility
- The heading is the page's
<h1>; the feature list is a real list. - The password rule is linked to the field (
aria-describedby); the terms checkbox is required. - The inverted panel keeps its contrast in light and dark mode.
Dependencies
- Bootstrap 5.3+ CSS.
themes/tokens/tokens.css.- The
inputcomponent. - The
checkboxcomponent. - The
buttoncomponent.
Source
The exact files the CLI installs (signup-split@1.0.0). View on GitHub · Report an issue
html
<section class="bootcn-signup-split" aria-labelledby="bootcn-signup-split-title">
<div class="bootcn-signup-split__aside">
<a class="bootcn-signup-split__brand" href="#">
<svg
class="bootcn-icon"
width="16"
height="16"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
aria-hidden="true"
focusable="false"
>
<rect x="3" y="3" width="8" height="8" rx="2" />
<rect x="13" y="13" width="8" height="8" rx="2" />
<path d="M13 7h8M17 3v8M3 17h8" />
</svg>
Acme
</a>
<div>
<p class="bootcn-signup-split__pitch">Start building in minutes.</p>
<ul class="bootcn-signup-split__features">
<li>
<svg
class="bootcn-icon"
width="16"
height="16"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
aria-hidden="true"
focusable="false"
>
<path d="M20 6 9 17l-5-5" />
</svg>
Unlimited projects and pages
</li>
<li>
<svg
class="bootcn-icon"
width="16"
height="16"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
aria-hidden="true"
focusable="false"
>
<path d="M20 6 9 17l-5-5" />
</svg>
Every component, block and template
</li>
<li>
<svg
class="bootcn-icon"
width="16"
height="16"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
aria-hidden="true"
focusable="false"
>
<path d="M20 6 9 17l-5-5" />
</svg>
Light and dark mode out of the box
</li>
</ul>
</div>
</div>
<div class="bootcn-signup-split__main">
<div class="bootcn-signup-split__panel">
<h1 class="bootcn-signup-split__title" id="bootcn-signup-split-title">Create your account</h1>
<p class="bootcn-signup-split__description">Free for your first project. No card needed.</p>
<form class="bootcn-signup-split__form" action="#" method="post">
<div class="bootcn-field">
<label for="bootcn-signup-split-name" class="form-label bootcn-field__label"
>Full name</label
>
<input
type="text"
class="form-control bootcn-input"
id="bootcn-signup-split-name"
name="name"
autocomplete="name"
required
/>
</div>
<div class="bootcn-field">
<label for="bootcn-signup-split-email" class="form-label bootcn-field__label"
>Work email</label
>
<input
type="email"
class="form-control bootcn-input"
id="bootcn-signup-split-email"
name="email"
autocomplete="email"
placeholder="you@company.com"
required
/>
</div>
<div class="bootcn-field">
<label for="bootcn-signup-split-password" class="form-label bootcn-field__label"
>Password</label
>
<input
type="password"
class="form-control bootcn-input"
id="bootcn-signup-split-password"
name="password"
autocomplete="new-password"
required
minlength="8"
aria-describedby="bootcn-signup-split-password-help"
/>
<p class="bootcn-field__help" id="bootcn-signup-split-password-help">
At least 8 characters.
</p>
</div>
<div class="form-check bootcn-checkbox">
<input
class="form-check-input bootcn-checkbox__input"
type="checkbox"
id="bootcn-signup-split-terms"
name="terms"
required
/>
<label class="form-check-label bootcn-checkbox__label" for="bootcn-signup-split-terms">
I agree to the <a class="bootcn-signup-split__link" href="#terms">terms</a>
</label>
</div>
<button type="submit" class="btn bootcn-button bootcn-button--default w-100">
Create account
</button>
</form>
<p class="bootcn-signup-split__footer">
Already registered? <a class="bootcn-signup-split__link" href="#sign-in">Sign in</a>
</p>
</div>
</div>
</section>css
.bootcn-signup-split {
display: grid;
min-height: 36rem;
}
@media (min-width: 768px) {
.bootcn-signup-split {
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
min-height: 100vh;
}
}
/* Inverts the page colors, so it contrasts in light and dark mode. */
.bootcn-signup-split__aside {
display: flex;
flex-direction: column;
justify-content: space-between;
gap: 2rem;
padding: 2rem;
background-color: var(--bs-emphasis-color);
color: var(--bs-body-bg);
}
.bootcn-signup-split__brand {
display: inline-flex;
align-items: center;
gap: 0.5rem;
color: inherit;
font-size: 1.125rem;
font-weight: 600;
text-decoration: none;
}
.bootcn-signup-split__pitch {
margin: 0 0 1rem;
font-size: 1.5rem;
font-weight: 600;
letter-spacing: -0.02em;
}
.bootcn-signup-split__features {
display: flex;
flex-direction: column;
gap: 0.5rem;
margin: 0;
padding: 0;
list-style: none;
}
.bootcn-signup-split__features li {
display: flex;
align-items: center;
gap: 0.5rem;
}
@media (max-width: 767.98px) {
.bootcn-signup-split__aside > div {
display: none;
}
}
.bootcn-signup-split__main {
display: flex;
align-items: center;
justify-content: center;
padding: 2rem 1rem;
}
.bootcn-signup-split__panel {
width: 100%;
max-width: 22rem;
}
.bootcn-signup-split__title {
margin: 0 0 0.25rem;
font-size: 1.5rem;
font-weight: 600;
}
.bootcn-signup-split__description {
margin: 0 0 1.5rem;
color: var(--bootcn-muted-foreground);
}
.bootcn-signup-split__form {
display: flex;
flex-direction: column;
gap: 1rem;
}
.bootcn-signup-split__form .bootcn-field {
margin: 0;
}
.bootcn-signup-split__link {
color: var(--bs-link-color);
text-underline-offset: 0.2em;
}
.bootcn-signup-split__footer {
margin: 1.5rem 0 0;
color: var(--bootcn-muted-foreground);
font-size: 0.875rem;
text-align: center;
}
