Users of the legacy Userfront pre-built forms are invited to migrate to our new Userfront UI Toolkit. Userfront UI Toolkit features full multi-factor authentication (MFA) support, so you can embed multi-factor login directly in your app. Userfront UI Toolkit also allows for greater customization to match your branding and style guide.
<html> <head>
<script id="Userfront-script"> (function(m,o,d,u,l,a,r,i,z,e) { u[m]={rq:[],ready:function(j){u[m].rq.push(j);},m:m,o:o,d:d,r:r};function j(s){return encodeURIComponent(btoa(s));}z=l.getElementById(m+"-"+a);r=u.location; e=[d+"/page/"+o+"/"+j(r.pathname)+"/"+j(r.host)+"?t="+Date.now(),d];e.map(function(w){i=l.createElement(a);i.defer=1;i.src=w;z.parentNode.insertBefore(i,z);});u.amvartem=m; })("Userfront", "wbm95g4b", "https://cdn.userfront.com/@userfront/toolkit@latest/dist/web-component.umd.js",window,document,"script"); </script>
</head> <body>
<!-- Signup form --> <div id="userfront-kdkraba"></div>
</body>
<html><head>
<script defer src="https://cdn.userfront.com/@userfront/toolkit@latest/dist/web-component.umd.js"></script>
</head><body>
<signup-form tenant-id="8vbqr9nq"></signup-form>
</body></html>
npm install @userfront/react
import * as React from "react";import Userfront from "@userfront/react";
Userfront.init("wbm95g4b");
const SignupForm = Userfront.build({ toolId: "kdkraba"});
function App() { return <SignupForm />;}
export default App;
npm install @userfront/toolkit
The Userfront Core JS library is included in both the legacy and new Toolkits.
import * as React from "react";import Userfront, { SignupForm } from "@userfront/toolkit/react";
Userfront.init("8vbqr9nq");
function App() { return <SignupForm />;}
export default App;
Be sure to import from @userfront/toolkit/react
.
npm install @userfront/vue
<template> <div id="app"> <signup-form tool-id="kdkraba" /> </div></template>
<script>import Userfront, { SignupForm } from "@userfront/vue";
Userfront.init("wbm95g4b");
export default { name: "App", components: { SignupForm, },};</script>
<style>...</style>
npm install @userfront/toolkit
// App.vue<template> <div id="app"> <signup-form /> </div></template>
<script setup>import Userfront from "@userfront/toolkit/vue";
Userfront.init("8vbqr9nq");</script>
<style>...</style>
Be sure to import from @userfront/toolkit/vue
.
You don't need to register the individual components. Import the library when your app loads, and the forms will be available anywhere in your app.
The Userfront UI Toolkit makes its forms available as Web Components, which means that it's compatible with many front-end libraries, including Angular, Svelte, Polymer, Lit and Solid.