Style
How do I change the font in the login and signup page which use stitches and are in the wasp.out dir
2 Replies
Hi @Bruno Njeru. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
To customize the font in the login and signup pages that use Stitches in Wasp, you have a few options:
Using the appearance prop
The Auth UI components in Wasp use Stitches for styling, and you can customize them by passing an
appearance
prop:
You can customize various design tokens through this approach as described in the Auth UI documentation.
Adding fonts to your app
For adding custom fonts to your Wasp app, you have these options:
1. Using the app.head property: You can add font links in your app declaration:
This approach is documented in the Customizing the App documentation.
2. Using @fontsource packages: If you're using the @fontsource package, there's a known issue with Vite not including these files in the .wasp/out
directory. This is a common issue with Vite and serving fonts from node_modules
. The Wasp team is aware of this issue and is working on it as mentioned in a GitHub issue.
Alternative approach
If you need more customization, you can create your own custom login and signup forms instead of using the built-in components. As mentioned in a Discord support thread:
You could not use our SignupForm, but instead go "level deeper" and implement your own form for signup while using our lower-level primitives. For example, if you are using username/pass auth method, you could use signup and login actions that Wasp exposes for it.This approach gives you full control over styling but requires more work to implement the authentication logic yourself. Note that the Wasp team is also planning to switch away from Stitches for Auth UI as mentioned in this GitHub issue, since Stitches is no longer maintained. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Bruno Njeru, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
Great got it