Comments (13)
The new UI components in @aws-amplify/ui-components
are web components which are supported in svelte. @sw-yx and I can collaborate on adding some documentation and example for this use case.
from amplify-ui.
am interested to see official components someday too but in the meantime happy to collaborate if you want to work on a third party open source library for them
from amplify-ui.
Would be great to have Svelte support.
from amplify-ui.
This looks like a feature request for the JavaScript lib. Will move.
from amplify-ui.
@sw-yx @jordanranz Can you provide an example, I can't get it to show
<script>
export let name;
import '@aws-amplify/ui-components';
import {Amplify} from 'aws-amplify';
import awsmobile from './aws-exports';
Amplify.configure(awsmobile);
</script>
<main>
<amplify-authenticator>
<amplify-sign-up header-text="My Custom Sign In Header" slot="sign-up" />
<div>
<h1>Hello {name}!</h1>
<p>Visit the <a href="https://svelte.dev/tutorial">Svelte tutorial</a> to learn how to build Svelte apps.</p>
<amplify-sign-out></amplify-sign-out>
</div>
</amplify-authenticator>
</main>
from amplify-ui.
https://www.swyx.io/writing/svelte-auth/
from amplify-ui.
Thanks @sw-yx , however I can't see where that uses ui-components
from amplify-ui.
it doesn't, sorry about that, i misread you
from amplify-ui.
This is breaking because of an incompatibility between Rollup and aws-amplify. I got this working based off this webpack based template: https://github.com/baileyherbert/svelte-webpack-starter
Here is an example of my main.ts file that imports and registers the html elements:
import App from "./App.svelte";
import {
applyPolyfills,
defineCustomElements,
} from "@aws-amplify/ui-components/loader";
import Amplify, { Auth } from "aws-amplify";
import { awsconfig } from "./aws-exports";
Amplify.configure(awsconfig);
// Bind the custom elements to the window object
applyPolyfills().then(() => {
defineCustomElements(window).then((res) => {
console.log("res", res);
});
});
const app = new App({
target: document.body,
});
export default app;
from amplify-ui.
i jotted down some notes for Amplify + Rollup btw. https://dev.to/swyx/making-aws-amplify-work-with-rollup-2d9m lmk if works for you, i confess i didnt extensively test this but it worked well enough for me
from amplify-ui.
Thanks for posting that. I referenced it already when trying to get this to work with Rollup, but kept getting the error: "UMD and IIFE output formats are not supported for code-splitting builds"
from amplify-ui.
then maybe change the format to cjs https://github.com/sveltejs/template/blob/master/rollup.config.js#L34
from amplify-ui.
The new UI components in
@aws-amplify/ui-components
are web components which are supported in svelte. @sw-yx and I can collaborate on adding some documentation and example for this use case.
How can I customize the Auth.signUp call using the web components?
(For example, I want to create the username for the user and sign up with that. The user will fill the email, which will be an alias.)
from amplify-ui.
Related Issues (20)
- Session Not Found HOT 15
- Authenticator error message overflows if message is long HOT 2
- Issue with `withAuthenticator` hook integration in Next.js app HOT 3
- Ionic Chatbot UI [missing-page] HOT 2
- Ability to specify auth flow to trigger user migration events HOT 2
- Reset Password by Email not showing correct translations HOT 3
- SelectField SVG accessibility
- Liveness - Your account isn't authorized to call this operation HOT 11
- Pass className prop through to StorageImage HOT 1
- Could not resolve all files for configuration ':amazon-cognito-identity-js:debugCompileClasspath'. HOT 1
- Vite React - Component does not work correctly in mobile browsers, especially Google browsers HOT 8
- Liveness - Users getting timeout error as soon as they try to load HOT 13
- Undefined ('S3Object') Error HOT 12
- Customizable Visual Feedback Colors in Liveness Component HOT 3
- Autocomplete footer not allowing onClick HOT 2
- [Face Liveness] Cannot complete check due to server issue. Try again HOT 13
- Authenticator with only social sign in (hide regular sign in fields) HOT 2
- React: Set unique id to each authenticator step's button HOT 3
- Unrecognizable lambda output - When user Create an account HOT 1
- ResizeObserver loop when navigating in the Authenticator component HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amplify-ui.