Kimlix

Başlarken

Quickstart (React)

React (Vite, CRA vb.) uygulamanıza Kimlix ekleyin.

Note: The @kimlix/react package is not yet published to npm. SDK packages will be available after the public beta launch. For now, you can use the REST API directly or copy the SDK source from packages/sdk-react.

1. Install the package

Terminal (available after public beta)
pnpm add @kimlix/react

2. Wrap your app with Provider

main.tsx or App.tsx
import { KimlixProvider } from '@kimlix/react';

<KimlixProvider projectId="proj_xxx" apiUrl="https://api.kimlix.co">
  <App />
</KimlixProvider>

3. Use components

Example
import { SignIn, SignUp, UserButton, useAuth } from '@kimlix/react';

// Sign in form
<SignIn redirectUrl="/dashboard" />

// Sign up form
<SignUp redirectUrl="/dashboard" />

// User menu (header)
<UserButton />

// Hook for user info
const { user, isLoaded } = useAuth();