-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
How to disable Amplify from loading its Auth CSS theme file in a React app? #2691
Comments
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. |
This will be a part of our UI Component refactor. I will keep this issue open so we can track this request. |
Hey @jordanranz also removing any !important flags, thanks. |
FYI, we have started an RFC discussion for a proposed Amplify UI Component refactor to increase customizability and flexibility for our components. Please feel free to add any additional comments to the following issue: |
Would be really great here if the imported styles avoided the use of global color variables that don't carry any sort of namespacing… For example, a color named |
Encouraging that this seems to be being worked on. Just being able to remove all CSS i.e. pass a |
** 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!
The text was updated successfully, but these errors were encountered: