F
Filament13mo ago
Masea

Using filament forms outside filament, how can i configure primary colors?

Pretty much the title
4 Replies
jlove1672
jlove167213mo ago
You should be able to configure global colors in your tailwind.config.js file and use then throughout your livewire application
Masea
MaseaOP13mo ago
i have already set my primary color in my tailwind config file like this:
export default {
presets: [preset],

content: [
'./vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php',
'./storage/framework/views/*.php',
'./resources/views/**/*.blade.php',
],

theme: {
container: {
center: true,
padding: '2rem',
},

extend: {
/*fontFamily: {
sans: ['Jost', ...defaultTheme.fontFamily.sans],
},*/

colors: {
primary: colors.emerald[500],
danger: colors.red,
success: colors.emerald,
warning: colors.amber,
info: colors.blue,

muted: colors.neutral[500]
},
},
},
};
export default {
presets: [preset],

content: [
'./vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php',
'./storage/framework/views/*.php',
'./resources/views/**/*.blade.php',
],

theme: {
container: {
center: true,
padding: '2rem',
},

extend: {
/*fontFamily: {
sans: ['Jost', ...defaultTheme.fontFamily.sans],
},*/

colors: {
primary: colors.emerald[500],
danger: colors.red,
success: colors.emerald,
warning: colors.amber,
info: colors.blue,

muted: colors.neutral[500]
},
},
},
};
this clearly does not suffice tho? any idea what to do next
jlove1672
jlove167213mo ago
you need to include const colors = require('tailwindcss/colors') at the top of that file to access colors
Masea
MaseaOP13mo ago
they work as intended in the rest of my app. app as in outside the filament. but filament forms that i use do not read these colors well i can still override colors with css but it is not wise

Did you find this page helpful?