{"library":"react-google-button","title":"React Google Button","description":"react-google-button is a React component that provides a pre-styled Google Sign-In button, adhering to Google's official branding and style guidelines for identity solutions. The current stable version is 0.8.0, released in 2024. The package maintains a steady but not rapid release cadence, focusing on compatibility updates and minor feature enhancements. It ships with TypeScript types, offering a robust development experience for TypeScript users. Its primary differentiator is its simplicity and strict adherence to Google's visual guidelines, making it a drop-in solution for integrating Google authentication without manual styling efforts. It supports both modern ESM module environments and older CommonJS setups, and also offers UMD builds for direct browser script usage.","language":"javascript","status":"active","last_verified":"Sun Apr 19","install":{"commands":["npm install react-google-button"],"cli":null},"imports":["import GoogleButton from 'react-google-button'","const GoogleButton = require('react-google-button')","import type { GoogleButtonProps } from 'react-google-button'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import React from 'react';\nimport GoogleButton from 'react-google-button';\n\nfunction MySignInPage() {\n  const handleGoogleSignIn = () => {\n    console.log('Google button clicked. Initiate Google Sign-In flow.');\n    // In a real application, you would typically redirect to Google's OAuth endpoint\n    // or use a library like react-google-login or @react-oauth/google.\n    // For demonstration, we'll just log.\n    alert('Imagine Google Sign-In popup opening now!');\n  };\n\n  return (\n    <div>\n      <h1>Sign In to My App</h1>\n      <GoogleButton\n        type=\"dark\" // or \"light\"\n        onClick={handleGoogleSignIn}\n      />\n      <p>Click the button to sign in with your Google account.</p>\n    </div>\n  );\n}\n\nexport default MySignInPage;\n","lang":"typescript","description":"This quickstart demonstrates how to import and render the GoogleButton component, providing a basic onClick handler to simulate a sign-in attempt. It highlights the primary usage pattern.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}