Moving border button

The sign-in page's one-off call to action. A navy glow travels its edge once every 2 seconds while it is hovered or focused, and keeps going while it is working. Use it once per page, for the action the page exists for; everywhere else, Button. Under reduced motion the glow holds still and the edge turns the focus blue.

BetaReady to use. Its API can still change in a minor release; the changelog says when.

import { MovingBorderButton } from "@leap-crm/design-system";

Playground

Change a prop and the component follows. Its code is under Props.

Props

children
loading
icon

Best practices

When to use it, and the rules that apply in particular places.

GuidancePractice
DoUse it once per page, for the action the page exists for, like Sign in with LEAP.
DoSet loading while the work runs and say so in the label, like Signing in… The glow keeps travelling and the button is marked busy.
DoGive it a width through className, like w-full on a sign-in card. Its height is fixed at 48 px.
Don'tUse it in the CRM's own screens, dialogs or forms. Use Button with intent="primary".
Don'tRely on the glow alone to show that it is working. Under reduced motion the glow holds still, so the label has to say it.

Props

PropTypeDefaultDescription
children *ReactNode—The label, like "Sign in with LEAP".
iconReactNode—A 16 px mark before the label, like the LEAP icon.
loadingbooleanfalseWorking, like signing in: the glow keeps travelling and the button is busy.
classNamestring—Its width, like "w-full" (it is 48 px tall).

Code

What the playground shows, ready to copy.

import { MovingBorderButton } from "@leap-crm/design-system";

<MovingBorderButton>Sign in</MovingBorderButton>

Keyboard

The keys it answers to. Tab moves between components, arrows move within them.

KeysWhat they do
EnterSpacePresses the focused button.