Totality button
The Bionic sign-in button, in three actions and four sizes.
Totality is the Bionic button: a dark face, a heat rim and the eclipse mark with its bead, which flares on hover and focus. It is presentation only. It sends no requests and creates no grants; you attach your sign-in action to it.
The examples on this page are rendered by the Login Kit itself, so they match what ships.
Sign in to Northwind
Bionic shares only what this site needs.
Sign in to Northwind
Bionic shares only what this site needs.
import { createBionicButton } from '@bionic/login-kit/button';
import '@bionic/login-kit/button.css';
const button = createBionicButton({ action: 'login', size: 'default' });
button.addEventListener('click', startLogin);
document.querySelector('#sign-in').append(button);For server or static rendering, renderBionicButton takes the same options and returns the
button as escaped HTML.
Actions
Each action has its own label and detail. Continue adds an arrow; Verify adds a divider and a seal, so it reads as a check rather than a sign-in.
| Action | Label |
|---|---|
login | Private Login with Bionic |
continue | Continue with Bionic |
verify | Verify with Bionic |
Pass label to change the visible text. The button keeps an accessible name either way.
Sizes
Use large for a hero, default for forms, compact for toolbars and icon in a row of providers.
createBionicButton({ action: 'login', size: 'large' });
createBionicButton({ action: 'continue', size: 'default' });
createBionicButton({ action: 'login', size: 'compact' });
createBionicButton({ action: 'login', size: 'icon' });Sizes are minimum heights, so a long label wraps rather than clipping. Compact shortens the visible label to "Bionic" (or "Verify"), and icon shows only the mark; both keep the full accessible name.
Light pages
The button stays dark on every page, like other provider buttons. On a light background, pass
surface: 'light': it softens the shadow and changes nothing else. The light panels above use
it.
createBionicButton({ action: 'login', surface: 'light' });States and width
fullWidth fills a sign-in form. disabled and loading both disable the native button;
loading also sets aria-busy. Keyboard focus shows the same flare as hover, and reduced
motion is respected.
Fonts
button.css includes the Tomorrow typeface from inside the package; it never loads from a font
CDN. To load no font at all, import @bionic/login-kit/button-system.css instead: the same
Totality look with system fallbacks. With the branded stylesheet loaded, font: 'system' opts a
single button out of Tomorrow. Neither stylesheet changes your page's own fonts, and every class
is scoped to .bionic-button.
For a static site, copy the package's ui/ folder intact, including ui/fonts/ and its license
file, and link ui/button.css.
iOS web apps
createBionicButton({ action: 'login', platform: 'ios', fullWidth: true });
createBionicButton({ action: 'continue', platform: 'ios', shape: 'capsule' });platform: 'ios' keeps the Totality face, rim and mark, and sets the title the way native
sign-in buttons do: the system font (SF Pro on iOS, Roboto on Android) at 17pt medium, centred
across the button, with the mark at the leading edge. It's up to 375px wide with 12px corners;
compact is 44px with a 15pt title. Touch has no hover, so a press shrinks the button slightly
and lights the flare instead.
The iOS button always uses the system font, whichever stylesheet you load, so
button-system.css is enough. shape: 'capsule' gives it fully rounded ends and is only
available with platform: 'ios'.
All options
| Option | Values | Default |
|---|---|---|
action | 'login', 'continue', 'verify' | 'login' |
size | 'large', 'default', 'compact', 'icon' | 'default' |
surface | 'dark', 'light' | 'dark' |
platform | 'web', 'ios' | 'web' |
shape | 'default', 'capsule' (iOS only) | 'default' |
font | 'brand', 'system' | 'brand' |
label | Custom visible text | The action's label |
id | Element ID | None |
type | 'button', 'submit' | 'button' |
fullWidth | true, false | false |
disabled | true, false | false |
loading | true, false | false |
Don't use an alias or display name as account authority on the button. It's a way into sign-in, not proof of who someone is.