We've meticulously designed Flux to look great out of the box, however, every project has its own identity. You can choose from our hand-picked color schemes or build your own theme by customizing CSS variables.
import colors from 'tailwindcss/colors';export default { ... theme: { extend: { colors: { // Re-assign Flux's base color (zinc) to a different shade of gray... zinc: colors.slate, }, } },};
<flux:text class="text-slate-800 dark:text-white">...</flux:text>
/* resources/css/app.css */@layer base { :root { --color-accent: var(--color-red-500); --color-accent-content: var(--color-red-600); --color-accent-foreground: var(--color-white); } .dark { --color-accent: var(--color-red-500); --color-accent-content: var(--color-red-400); --color-accent-foreground: var(--color-white); }}
Variable
|
Description
|
---|---|
--color-accent | The main accent color used is the background for primary buttons. |
--color-accent-content | A (typically) darker hue used for text content because it's more readable. |
--color-accent-foreground | The color of (typically) text content on top of an accent colored background. |
<button class="bg-[var(--color-accent)] text-[var(--color-accent-foreground)]">
<button class="bg-accent text-accent-foreground">
export default { ... theme: { extend: { colors: { accent: { DEFAULT: 'var(--color-accent)', content: 'var(--color-accent-content)', foreground: 'var(--color-accent-foreground)', }, }, } },};
<!-- Link --><flux:link :accent="false">Profile</flux:tab><!-- Tabs --><flux:tabs> <flux:tab :accent="false">Profile</flux:tab> <flux:tab :accent="false">Account</flux:tab> <flux:tab :accent="false">Billing</flux:tab></flux:tabs><!-- Navbar --><flux:navbar> <flux:navbar.item :accent="false">Profile</flux:navbar.item> <flux:navbar.item :accent="false">Account</flux:navbar.item> <flux:navbar.item :accent="false">Billing</flux:navbar.item></flux:navbar><!-- Navlist --><flux:navlist> <flux:navlist.item :accent="false">Profile</flux:navlist.item> <flux:navlist.item :accent="false">Account</flux:navlist.item> <flux:navlist.item :accent="false">Billing</flux:navlist.item></flux:navlist>