Skip to main content

Reflex custom component library for Clerk, a user management platform

Project description

clerk

A Reflex custom component clerk.

Installation

pip install reflex-clerk

Usage

import reflex as rx
from reflex_clerk import clerk_provider, sign_in_button, install_signin_page

publishable_key = "your_clerk_publishable_key"


def index() -> rx.Component:
    return clerk_provider(
        rx.vstack(
            sign_in_button(),
            align="center",
            spacing="7",
        ),
        publishable_key=publishable_key,
    )


app = rx.App()
app.add_page(index)
install_signin_page(app)

In this example:

  1. We import the necessary components from Reflex and the reflex_clerk library.
  2. We define the publishable_key for our Clerk instance.
  3. We create a function index that returns a Reflex component.
  4. Inside the index function, we use the clerk_provider component from reflex_clerk. This component sets up the Clerk context for the rest of the components within it.
  5. Within the clerk_provider, we create a vertical stack (rx.vstack) that contains the sign_in.sign_in_button() component from reflex_clerk. This component renders a sign-in button for Clerk.
  6. We pass the publishable_key to the clerk_provider component.

With this setup, you'll have a page that displays a sign-in button powered by Clerk. You can then add more Clerk components, such as user profile information, sign-out buttons, and more, within the clerk_provider.

Further documentation can be found in the reference docs

License

Apache-2.0

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Acknowledgments

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reflex_clerk-1.0.2.tar.gz (19.1 kB view details)

Uploaded Source

Built Distribution

reflex_clerk-1.0.2-py3-none-any.whl (24.4 kB view details)

Uploaded Python 3

File details

Details for the file reflex_clerk-1.0.2.tar.gz.

File metadata

  • Download URL: reflex_clerk-1.0.2.tar.gz
  • Upload date:
  • Size: 19.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.6

File hashes

Hashes for reflex_clerk-1.0.2.tar.gz
Algorithm Hash digest
SHA256 89e9d0a5fe20bbb9aa2e7257ad7ab603111a0481d85c8269ea9ad44513cd0b0d
MD5 3a84320d5503dabc83c80b73e906bbdb
BLAKE2b-256 01d3d4678bdd95e1e544c75706a094f065f480874815d5bf9db0cce09717736a

See more details on using hashes here.

File details

Details for the file reflex_clerk-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for reflex_clerk-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3136c4c74fbdb0976ed9bcdd38195ec8a6f6ca0d788c0c27165c972206ef0239
MD5 bed697476f3dd9890c06071af6d6542c
BLAKE2b-256 16642fa205a621c0c733b156818a7617ce24e0fad4f42c11aa0f6c458be481bb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page