Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AmplifyAuthenticator customize validation modal positioning and style #5604

Closed
sri7vasu opened this issue Apr 28, 2020 · 4 comments
Closed
Labels
feature-request Request a new feature UI Related to UI Components

Comments

@sri7vasu
Copy link

Is your feature request related to a problem? Please describe.
Im using SignUp form like this using React (Typescript) and AmplifyAuthenticator like this below:

import React from "react";
import {AuthState} from "@aws-amplify/ui-components"
import {
  AmplifySignUp,
  AmplifyAuthenticator,
  AmplifySignOut,
} from "@aws-amplify/ui-react";

function SignUp() {
  return (
    <AmplifyAuthenticator initialAuthState={AuthState.SignUp}>
      <AmplifySignUp
        headerText="Sign Up"
        usernameAlias="email"
        slot="sign-up"
        ></AmplifySignUp>
      <div>
        My App
        <AmplifySignOut></AmplifySignOut>
      </div>
    </AmplifyAuthenticator>
  );
}
export default SignUp;

The functionality and validations are working fine , i placed the signup forum in middle right of my page and still when there is a validation error it shows on top of the page and that too wide as shown in the figure. There is no way to customize the modal nor to change the width or style.

79911721-6cd77e00-83e6-11ea-9ea3-7c4aa4ac781e

Describe the solution you'd like
Needed a way to customize the positioning of the validation modal and styles. It will be helpful.

Describe alternatives you've considered
Tried using a different auth framework all together or write my own components using Amplify components but thats lot of work and testing.

@sri7vasu sri7vasu added the feature-request Request a new feature label Apr 28, 2020
@sawyerh
Copy link

sawyerh commented May 4, 2020

+1 to this feature request. Our team is holding off from updating to the new Amplify UI library because of this. We don't feel the current user experience around error messages is the most user friendly, and we'd like to customize the styling further to match our site. We'd like to either be able to fully customize the CSS of this component, or be able to replace it with our own custom Error component.

In aws-amplify-react, we've accomplished this by hiding the default toast component. We then render our own error component by passing a function into the Authenticator component's errorMessage prop, storing triggered errors in our own React state, which we can then render however we like.

@joae
Copy link

joae commented Jul 30, 2020

@sawyerh How do you hide the Toast component? I'm using react and I can't figure out how to do it

@wlee221
Copy link
Contributor

wlee221 commented Mar 16, 2021

Hello all, we had #7129 merged that will allow you to hide the default error toast and implement your own. You can see @Luke-Davies' example here #6479 (comment). We will close this issue as #7129 solves this, but please feel free to ask any questions.

@wlee221 wlee221 closed this as completed Mar 16, 2021
@ErikCH ErikCH added UI Related to UI Components and removed Amplify UI Components labels May 19, 2021
@github-actions
Copy link

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request a new feature UI Related to UI Components
Projects
None yet
Development

No branches or pull requests

6 participants