Ory Elements

Ory Elements is a component library that makes building login, registration and account pages for Ory a breeze.

  • Reduces time to add complex auth flows to your customer experience, including multi-factor authentication and account recovery
  • Themeable and modular - use only what you need from it
  • Works with the React ecosystem (NextJS, React SPA, Preact SPA)
  • Works with the Express based ecosystem
  • Dynamically adapts the user interface to your Ory identity schema, sign-in and flow configuration

Ory Elements supports integrating with:

  • React
  • Preact
  • ExpressJs (experimental)

Get Started

git clone --depth 1 git@github.com:ory/elements.git
cd elements
npm run initialize
cd examples/react-spa
export VITE_ORY_SDK_URL=http://localhost:4000
npm run dev -- --port 3000

Now run the Ory CLI tunnel.

ory tunnel http://localhost:3000 --project <project-slug> --dev

The tunnel will now mirror the Ory APIs under http://localhost:4000 which we have explicity told our React app to use through the VITE_ORY_SDK_URL export.

Now you can see Ory Elements in action by opening http://localhost:3000 in your browser!

Contributing

Found a bug or want to add a new feature? Please fork this repository and create a pull request. If your changes are large please open an issue first.