Skip to content

Commit 3bc7031

Browse files
committed
feature framework integrations
1 parent 2aa5b79 commit 3bc7031

File tree

5 files changed

+212
-0
lines changed

5 files changed

+212
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
title: "Angular Integration"
3+
description: "Procaptcha has an official Angular component, that provides seamless integration of Prosopo Procaptcha into any Angular project."
4+
i18nReady: true
5+
---
6+
7+
Procaptcha has an official Angular component, that provides seamless integration of Prosopo Procaptcha into any Angular project.
8+
The integration component supports all the [Procaptcha render options](/en/basics/client-side-rendering/#procaptcha-options).
9+
10+
## 1. Installation
11+
12+
`npm install @prosopo/angular-procaptcha-wrapper`
13+
14+
## 2. Example of usage
15+
16+
### 2.1) Basic setup
17+
18+
```typescript
19+
import { Component } from "@angular/core";
20+
import {
21+
ProcaptchaComponent,
22+
type ProcaptchaRenderOptions,
23+
} from "@prosopo/angular-procaptcha-wrapper";
24+
25+
@Component({
26+
selector: "app-root",
27+
imports: [ProcaptchaComponent],
28+
template: `
29+
<procaptcha-component [settings]="procaptchaSettings"
30+
[htmlAttributes]="{class:'my-app__procaptcha'}"/>`,
31+
styles: "",
32+
})
33+
export class AppComponent {
34+
procaptchaSettings: ProcaptchaRenderOptions = {
35+
siteKey: "your-site-key",
36+
};
37+
}
38+
```
39+
40+
### 2.2) Advanced usage
41+
42+
```typescript
43+
// ...
44+
45+
export class AppComponent {
46+
procaptchaSettings: ProcaptchaRenderOptions = {
47+
siteKey: environment.PROCATCHA_SITE_KEY,
48+
captchaType: "pow",
49+
language: "en",
50+
callback: (token: string) => {
51+
console.log("verified", token);
52+
},
53+
};
54+
}
55+
```
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
title: "React Integration"
3+
description: "Procaptcha has an official React component, that provides seamless integration of Prosopo Procaptcha into any React project."
4+
i18nReady: true
5+
---
6+
7+
Procaptcha has an official React component, that provides seamless integration of Prosopo Procaptcha into any React project.
8+
The integration component supports all the [Procaptcha render options](/en/basics/client-side-rendering/#procaptcha-options).
9+
10+
## 1. Installation
11+
12+
`npm install @prosopo/react-procaptcha-wrapper`
13+
14+
## 2. Example of usage
15+
16+
### 2.1) Basic setup
17+
18+
```typescript jsx
19+
import {ProcaptchaComponent} from "@prosopo/react-procaptcha-wrapper";
20+
21+
// ...
22+
23+
<ProcaptchaComponent siteKey={"my-site-key"}/>;
24+
```
25+
26+
### 2.2) Advanced usage
27+
28+
```typescript jsx
29+
// ...
30+
31+
<ProcaptchaComponent
32+
siteKey={siteKey}
33+
captchaType={"pow"}
34+
language={"en"}
35+
callback={(token: string): void => {
36+
console.log("verified", token);
37+
}}
38+
htmlAttributes={{
39+
className: "my-app__procaptcha",
40+
style: {
41+
maxWidth: "600px",
42+
},
43+
}}
44+
/>
45+
```
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
title: "Svelte Integration"
3+
description: "Procaptcha has an official Svelte component, that provides seamless integration of Prosopo Procaptcha into any Svelte project."
4+
i18nReady: true
5+
---
6+
7+
Procaptcha has an official Svelte component, that provides seamless integration of Prosopo Procaptcha into any Svelte project.
8+
The integration component supports all the [Procaptcha render options](/en/basics/client-side-rendering/#procaptcha-options).
9+
10+
## 1. Installation
11+
12+
`npm install @prosopo/svelte-procaptcha-wrapper`
13+
14+
## 2. Example of usage
15+
16+
### 2.1) Basic setup
17+
18+
```sveltehtml
19+
<script lang="ts">
20+
import {ProcaptchaComponent} from "@prosopo/svelte-procaptcha-wrapper";
21+
</script>
22+
23+
<ProcaptchaComponent siteKey={"my-site-key"}/>;
24+
```
25+
26+
### 2.2) Advanced usage
27+
28+
```sveltehtml
29+
<script lang="ts">
30+
import {ProcaptchaComponent} from "@prosopo/svelte-procaptcha-wrapper";
31+
32+
const siteKey = "my-site-key";
33+
const handleVerification = (token: string): void => {
34+
console.log('verified', token);
35+
};
36+
</script>
37+
38+
<ProcaptchaComponent siteKey="{siteKey}"
39+
captchaType="pow"
40+
language="en"
41+
callback={handleVerification}
42+
htmlAttributes={{class: "my-app__procaptcha"}} />
43+
```
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
title: "Vue Integration"
3+
description: "Procaptcha has an official Vue component, that provides seamless integration of Prosopo Procaptcha into any Vue project."
4+
i18nReady: true
5+
---
6+
7+
Procaptcha has an official Vue component, that provides seamless integration of Prosopo Procaptcha into any Vue project.
8+
The integration component supports all the [Procaptcha render options](/en/basics/client-side-rendering/#procaptcha-options).
9+
10+
## 1. Installation
11+
12+
`npm install @prosopo/vue-procaptcha-wrapper`
13+
14+
## 2. Example of usage
15+
16+
### 2.1) Basic setup
17+
18+
```vue
19+
<script setup lang="ts">
20+
import {ProcaptchaComponent} from "@prosopo/vue-procaptcha-wrapper";
21+
</script>
22+
23+
<template>
24+
<ProcaptchaComponent :siteKey={"my-site-key"}/>
25+
</template>
26+
```
27+
28+
### 2.2) Advanced usage
29+
30+
```vue
31+
// ...
32+
33+
<ProcaptchaComponent
34+
:siteKey={"my-site-key"}
35+
:captchaType={"image"}
36+
:callbacks={{
37+
onVerified: (token: string): void => {
38+
console.log("verified", token);
39+
},
40+
}}
41+
:htmlAttributes={{
42+
className: "my-app__procaptcha",
43+
style: {
44+
maxWidth: "600px",
45+
},
46+
}}
47+
/>;
48+
```

src/i18n/en/nav.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,27 @@ export default [
4444
slug: 'basics/faq',
4545
key: 'basics/faq',
4646
},
47+
{text: 'Framework integrations', header: true, type: 'learn', key: 'framework-integrations'},
48+
{
49+
text: 'Angular Integration',
50+
slug: 'framework-integrations/angular-integration',
51+
key: 'framework-integrations/angular-integration',
52+
},
53+
{
54+
text: 'React Integration',
55+
slug: 'framework-integrations/react-integration',
56+
key: 'framework-integrations/react-integration',
57+
},
58+
{
59+
text: 'Svelte Integration',
60+
slug: 'framework-integrations/svelte-integration',
61+
key: 'framework-integrations/svelte-integration',
62+
},
63+
{
64+
text: 'Vue Integration',
65+
slug: 'framework-integrations/vue-integration',
66+
key: 'framework-integrations/vue-integration',
67+
},
4768
{text: 'Demos', header: true, type: 'learn', key: 'demos'},
4869
{
4970
text: 'React Frontend Client Example',

0 commit comments

Comments
 (0)