@riaskov/vk-signin-widget
TypeScript icon, indicating that this package has built-in type declarations

1.0.13 • Public • Published

VK Signin Widget for React

NPM Version NPM Downloads NPM Unpacked Size

Unofficial VK signin button component for React 18

Usage

import { VkSignInButton } from "@riaskov/vk-signin-widget"

<VkSignInButton
    appId={12345678}
    redirectURL={"https://example.com"}>
</VkSignInButton>

Docs

Params

Param Type Description
appId (required) number App ID from VK ID Management Console
redirectURL (required) string One of Trusted redirect URLs from VK ID Management Console
className string One or more space-separated classes (see available further in docs), just names, no dots before classes!
onClickBeforeLogin(e) Function Callback to execute before redirecting to id.vk.com
state string Random data for passing to redirectURL

"className" param and UI

className UI
without any className provided image
btn-secondary image
rounded-1 image
rounded-2 image
rounded-3 image
no-text image
btn-sm image
btn-lg image
btn-secondary no-text image
no-text rounded-3 image

You can combine classes to get the desired UI, e.g. className="btn-secondary rounded-1 no-text"

Acknowledgements

VK logo images received from public VK ID Docs; all rights on VK assets and trademark belong to VK

Package Sidebar

Install

npm i @riaskov/vk-signin-widget

Weekly Downloads

2

Version

1.0.13

License

MIT

Unpacked Size

44.9 kB

Total Files

7

Last publish

Collaborators

  • riaskov