Vue + Tailwind: Themeable profile page
P粉155710425
2023-09-03 14:50:24
<p>I want to create an application (similar to a social network) that lets users sign up and enter a bunch of profile information. Thereafter, the user can select a theme (from a set of predefined themes) to display this information to other users viewing the profile. </p>
<p>This is very similar to Shopify’s storefront theme. </p>
<p>How should I try to design a solution for this? </p>
<p>Sorry in advance for a very advanced vague question. </p>
<p>I know how to set the theme and/or colors etc while writing code (or maybe during the build step), but I'm even trying to reason about how to do this inside the product. </p>
You can use tw-colors to create a predefined theme p>
Then apply the theme to the card container
If subject class names come from API responses, you should safelist them, otherwise tailwind will not generate them, see tailwind documentation for more details