0.0.24 • Published 10 months ago

@cloudterms/react v0.0.24

Weekly downloads
-
License
-
Repository
-
Last release
10 months ago

@cloudterms/react

React Quickstart

Simplify term agreements in your React applications with @cloudterms/react. This package provides a pre-built CloudTermsProvider component that wraps your app, ensuring users agree to terms before accessing your content.

Docs
Example, uses Hono API example for interacting with CloudTerms.

Key Features:

  • Includes the @cloudterms/js SDK.
  • Pre-built Agree to Terms Component: A modal window that pops up, disabling your app until the user agrees to the terms.
  • Easy Integration: Simply wrap your app with the CloudTermsProvider component to get started.
  • Customizable: Tailor the agreement experience to fit your brand and needs.

Get started with @cloudterms/react today and streamline term agreements in your React applications!

Setup

Install @cloudterms/react

npm install @cloudterms/react

Usage

Wrap your app with the CloudTermsProvider component.

Props:

  • userId A unique userId that identifies the user to track their agreements.
  • terms An array of terms to display to the user.
  • hasAgreed A boolean that indicates if the user has agreed to the terms. When true, the modal will not display. When false, the modal will prompt the user to agree to the terms.
  • onAgree A function that handles the user's agreement to the terms. If you are using React without Next.js, you will need to handle the user's agreement to the terms manually.
<CloudTermsClientProvider
  userId={userId}
  terms={terms}
  hasAgreed={hasAgreed}
  onAgree={onAgree}
>
  <App />
</CloudTermsClientProvider>
0.0.22

10 months ago

0.0.23

10 months ago

0.0.24

10 months ago

0.0.21

1 year ago

0.0.20

1 year ago

0.0.18

1 year ago

0.0.19

1 year ago

0.0.17

1 year ago

0.0.16

1 year ago

0.0.15

1 year ago

0.0.13

1 year ago

0.0.12

1 year ago

0.0.11

1 year ago

0.0.10

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.1

1 year ago