Skip to contentKino
Skip to Content

Social sign-in

Buttons that sign a person in with Google, GitHub or Apple, each with its own logo, in a stack or a row. The pressed one shows a spinner while the provider opens, and the provider used last can lead.

npx shadcn add https://kinoui.com/r/social-sign-in.json
Share on

Examples

KinoSign in to Kino

Welcome back. Pick up where your team left off.
or

Default

Give the group onSignIn: the pressed button shows a spinner while the provider opens, and the others wait.

KinoCreate your workspace

Free for teams of up to 5. No card needed.
or

Row

layout='row' shows the logos alone, side by side, each named by its label and showing it as a tooltip.

Last used

Pass lastUsed, the provider the person signed in with last: it comes first, marked Last used.

Couldn’t reach GitHub. Try again in a moment.

Failure

A throw or a rejected promise from onSignIn puts the buttons back to rest, so the person can try again, as here after GitHub couldn’t be reached.

Labels

Each button’s children are its label, for a sign-up page or another language; lastUsedLabel translates the badge.

Installation

npx shadcn@latest add https://kinoui.com/r/social-sign-in.json
Files
lib/refs.tslib/reduce-motion.tslib/resize.tslib/swap.tsxcomponents/kino/badge.tsxcomponents/kino/spinner.tsxcomponents/kino/button.tsxlib/popup.tslib/glide.tsxcomponents/kino/tooltip.tsxlib/controllable.tslib/settle.tscomponents/kino/social-sign-in.tsx
Packages
@base-ui/reactclass-variance-authority

New to Kino? Installation covers what your project needs first and the @kino namespace.

API reference

SocialSignIn

PropTypeDefaultDescription
onSignIn(provider) => unknownNoneOpens the provider. The pressed button stays busy until the page moves on; a throw or a rejected promise puts it back to rest.
layout'stack''row''stack'stack: full-width buttons with their labels. row: the logos alone, side by side.
pending'google''github''apple'nullNoneThe provider that is opening, when you hold it yourself.
defaultPending'google''github''apple'nullnullThe provider opening at first, when the group holds it.
onPendingChange(pending) => voidNoneCalled when a provider starts opening, when a sign-in fails, and when Back brings the page out of the browser’s cache.
lastUsed'google''github''apple'nullnullThe provider the person signed in with last. Its button comes first, marked Last used.
lastUsedLabelstring'Last used'The badge’s words.
disabledbooleanfalseDisables every button.

SocialSignInButton

PropTypeDefaultDescription
provider'google''github''apple'NoneWhose logo it shows and whom it opens.
childrenstringNoneThe label. Defaults to “Continue with” and the provider’s name.
onClick(event) => voidNoneRuns before the sign-in starts; event.preventDefault() stops it.

Data attributes

AttributeOnDescription
data-layoutSocialSignInstack or row.
data-providerSocialSignInButtongoogle, github or apple.

Accessibility

  • Each button is a native <button> named by its label; in a row, the label is its aria-label and its tooltip, and the logo is hidden.
  • The pressed button keeps focus and is marked aria-busy, and the others are disabled, so two sign-ins never start at once.
  • Last used is read as the button’s description, once.
  • The spinner shows only after 200ms and then stays at least 300ms, so a quick sign-in never flashes one.