question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to disable Amplify from loading its Auth CSS theme file in a React app?

See original GitHub issue

** Which Category is your question related to? ** Auth theme CSS files

** What AWS Services are you utilizing? ** aws-amplify-react within a React app

** Provide additional details e.g. code snippets ** I’m using Amplify in my React app. For Auth I don’t use any of the provided UI and just use it programmatically through its provided state changes to interact with Cognito. I hide the default components and provide my own theme object (which basically sets everything to null).

<Authenticator hideDefault={true} onStateChange={this.handleAuthStateChange} theme={theme}>

However, I still see that even after I build my react app for production the CSS theme file that comes with Amplify Auth UI gets loaded in. How do I completely disable this CSS from being included? I’m trying to cut down my deployed file sizes as much as possible. Thanks!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
jordanranzcommented, Mar 11, 2019

This will be a part of our UI Component refactor. I will keep this issue open so we can track this request.

2reactions
jordanranzcommented, Feb 13, 2019

Hey @j0b0sapi3n,

This is currently not possible to do but this seems like a necessary enhancement. I’ll investigate how we can make this happen.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Theming | Amplify UI for React
Step 1: Wrap your App with ThemeProvider import { ThemeProvider } from '@aws-amplify/ui-react'; const App = ( <ThemeProvider> <MyApp>/* AmplifyUI */</MyApp> ...
Read more >
Amplify UI's new Authenticator component makes it easy to ...
Now that your backend is set up, let's go ahead and build our app. First, let's clone our React sample locally and then...
Read more >
React Authentication with AWS Amplify UI React - Egghead.io
You will also learn how to use the Amplify CSS theme ... In the main app component, we'll delete some of the code...
Read more >
Amplify UI is not working proper in React js - Stack Overflow
Add css import, this line before Amplify.configure . import '@aws-amplify/ui/dist/style.css';. This is breaking change of Amplify 3.x to 4.x ...
Read more >
Introducing Amplify UI's React Components
This week, my team at AWS launched React UI components which are ... of your application in /pages/_app.js , import the Amplify CSS...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found