![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
@ory/elements-preact
Advanced tools
> [!CAUTION] This package is in maintenance mode and is no longer actively > developed. Please use [`@ory/elements-react`](../elements-react/README.md) > instead.
[!CAUTION] This package is in maintenance mode and is no longer actively developed. Please use
@ory/elements-react
instead.
Ory Elements is a component library that makes building login, registration and account pages for Ory a breeze.
Ory Elements supports integrating with:
Install Ory Elements into your Preact application
npm i @ory/elements-preact --save
Ory Elements provides you with the ability to theme your application. Wrap your
components with <ThemeProvider />
and import style.css
from Ory Elements.
It is best to add this to your main.tsx
file since it will be reused across
your project. All source code is available in the Ory Elements
examples/preact-spa
folder.
// Ory Elements
// optional global css reset
import "@ory/elements-preact/assets/normalize.css"
// optional fontawesome icons
import "@ory/elements-preact/assets/fa-brands.min.css"
import "@ory/elements-preact/assets/fa-solid.min.css"
import "@ory/elements-preact/assets/fontawesome.min.css"
// optional fonts
import "@ory/elements-preact/assets/inter-font.css"
import "@ory/elements-preact/assets/jetbrains-mono-font.css"
// required styles for Ory Elements
import "@ory/elements-preact/style.css"
const Main = () => {
return (
<ThemeProvider themeOverrides={customTheme}>
<Router>
<Route path="/" component={Dashboard} />
<Route path="/login" component={Login} />
<Route path="/signup" component={Register} />
<Route path="/verification" component={Verification} />
<Route path="/recovery" component={Recovery} />
<Route path="/settings" component={Settings} />
</Router>
</ThemeProvider>
)
}
render(<Main />, document.getElementById("app") as HTMLElement)
Ory Elements supports integrating with Ory out of the box with the
<UserAuthCard/>
, <UserSettingsCard />
and <UserErrorCard />
.
Each flow can be mapped using these components with only a few lines of code.
Let's create a login example, create login.tsx
.
export const Login = () => {
// do sdk calls to get the flow data from Ory
return flow ? (
<UserAuthCard
flow={flow}
flowType={"login"}
additionalProps={{
forgotPasswordURL: "/recovery",
signupURL: "/signup",
}}
title={"Login"}
includeScripts={true}
onSubmit={submitFormData}
/>
) : (
<div>Loading...</div>
)
}
FAQs
> [!CAUTION] This package is in maintenance mode and is no longer actively > developed. Please use [`@ory/elements-react`](../elements-react/README.md) > instead.
We found that @ory/elements-preact demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.