Skip to main content
If you would like to use the pre-built Scute UI with your react app, you can do so using the @scute/ui-react package. This package would expose the pre-built Auth and Profile components which you can use to easily integrate Scute to your current app. Head over to the example project repo to clone and run this example project and check out the type docs for more scuteClient methods. To get started, install our React SDKs with your favorite package manager:
Terminal
Add your credentials to your environment variable handler:
NOTE: If you are not using Vite, use “REACT_APP” as your prefix for your environment variables.

Initialize the Scute client

First initialize the Scute client using the createClient method exposed by @scute/react package:

Wrap your React app with Scute AuthContextProvider

To be able to use the useScuteClient and useAuth hooks, wrap your app inside the Scute AuthContextProvider:

Add the Scute pre-built UI

First, create a component to show to your authenticated users:
Then, create a component to switch between the authentication form and the AuthenticatedView based on the session status:
Finally, modify the App.jsx to render the ScuteUI inside the AuthContextProvider:
Congrats! You have a working Scute instance now! No session No session


With session (Profile) With session


With session (UserButton) With session


Component API’s

Auth Component

Profile Component

UserButton Component