1.0.13 • Published 1 year ago
@riaskov/vk-signin-widget v1.0.13
VK Signin Widget for React
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 (available: "btn-secondary", "rounded-1", "rounded-2", "rounded-3"), just names, no dots before classes! |
| label | string | Button's label |
| 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 passed | |
| btn-secondary | |
| rounded-1 | |
| rounded-2 | |
| rounded-3 |
Acknowledgements
VK logo images received from public VK ID Docs; all rights on VK assets and trademark belong to VK