Customizing Amplify UI components for ReactJS
Let's open App.tsx
, add the AmplifyAuthenticator
tag back, start our customization, and import the rest of the authentication components:
- Import the
AmplifySignup
,AmplifySignIn
,AmplifySignout
, andAmplifyForgotPassword
components for customization:import { AmplifyAuthenticator, AmplifySignUp, AmplifySignIn, AmplifySignOut, AmplifyForgotPassword } from '@aws-amplify/ui-react';
- The next step is to add the following code blocks inside the
AmplifyAuthenticator
component. We change theusernameAlias
attribute to eitherusername
,email
, orphone_number
. We will useemail
in our example:<AmplifyAuthenticator usernameAlias="email">
- Add the
AmplifySignIn
code block here and change the values of the attributes, such asheaderText
andsubmitButtonText
, as appropriate, as well as changing theformFields
elements:<AmplifySignIn ...