Bionic Docs

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.

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.

On a dark page
action: 'login'
action: 'continue'
action: 'verify'
On a light page
action: 'login'
action: 'continue'
action: 'verify'
ActionLabel
loginPrivate Login with Bionic
continueContinue with Bionic
verifyVerify 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.

On a dark page
large · 56px
default · 50px
compact · 40px
icon · 44px
On a light page
large · 56px
default · 50px
compact · 40px
icon · 44px
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

On a dark page
fullWidth: true
loading: true
disabled: true
On a light page
fullWidth: true
loading: true
disabled: true

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

On a dark page
font: 'brand'
font: 'system'
On a light page
font: 'brand'
font: 'system'

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

On a dark page
platform: 'ios'
shape: 'capsule'
size: 'compact' · 44px
On a light page
platform: 'ios'
shape: 'capsule'
size: 'compact' · 44px
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

OptionValuesDefault
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'
labelCustom visible textThe action's label
idElement IDNone
type'button', 'submit''button'
fullWidthtrue, falsefalse
disabledtrue, falsefalse
loadingtrue, falsefalse

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.

On this page