Unofficial VK signin button component for React 18
import { VkSignInButton } from "@riaskov/vk-signin-widget"
<VkSignInButton
appId={12345678}
redirectURL={"https://example.com"}>
</VkSignInButton>
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 | UI |
---|---|
without any className provided | |
btn-secondary | |
rounded-1 | |
rounded-2 | |
rounded-3 | |
no-text | |
btn-sm | |
btn-lg | |
btn-secondary no-text | |
no-text rounded-3 |
You can combine classes to get the desired UI, e.g. className="btn-secondary rounded-1 no-text"
VK logo images received from public VK ID Docs; all rights on VK assets and trademark belong to VK