Customize
CSS
How to create a new style?
To avoid file loss, overrides of your custom styles or any other conflicts during the upgrade process, create or modify your styles with add your custom css or scss in src/precss/tailwindcss.css
file. If you want to add other plugin css, please paste css or scss in this file.
/* Insert your css in here */
.test-class {
@apply relative;
}
Core Tailwind css in src/precss/tailwindcss.css
file.
:root {
--primary:#6366F1;
--secondary:#EC4899;
--green:#22C55E;
--yellow:#F59E0B;
--gray:#84848f;
}
@tailwind base;
@tailwind components;
@tailwind utilities;
********************
plugins css
Remove all plugin css from this file.
More information about custom in Tailwindcss is in here
How Edit RTL CSS?
Add or edit rtl css from html file like thistext-start
More information about rtl in here Tailwind RTL
JS
How to create a new Javascript?
To avoid file loss, overrides of your custom styles or any other conflicts during the upgrade process, create or modify your custom javascript in src/js/demo.js
file.
// Custom JS
const myCustom = function () {
// insert your javascript in here
}
How to edit Demo Javascript?
demo.js
is a javascript that is used to display sample layouts such as charts, datepickers, vectormaps and event calendars. Copy some scripts you need and paste them in the footer before </body>
. Replace the javascript demo value with the dynamic data you have.
Example:
<!-- Demo Chart.js and all vendors config -->
<script src="src/js/demo.js"></script>
<script>
const date_range = document.getElementById('startDate');
if ( date_range != null) {
flatpickr('#startDate', {
enableTime: true,
allowInput: true,
dateFormat: "m/d/Y h:iK",
"plugins": [new rangePlugin({ input: "#endDate"})]
});
}
</script>
</body>
Theme Skin
Tailback is ready in light and dark mode. Very simple to change color skin, just editing html file and add "dark" classes like this <html class="dark" lang="en">
.
Read more information about Tailwind dark mode in here https://tailwindcss.com/docs/dark-mode
Theme Colors
We use a subset of Tailwindcss color palette for generating color schemes.
You can use text-
or bg-
before color like this text-indigo-500
or bg-indigo-600
Our primary color is text-indigo-
. You can change all primary color on html file with change text-indigo-
and bg-indigo-
with others color.
We also use customize color for -gray-
. Edit this color from tailwind.config.js
colors: {
indigo: {
50: '#eef2ff',
100: '#e0e7ff',
200: '#c7d2fe',
300: '#a5b4fc',
400: '#818cf8',
500: '#6366f1',
600: '#4f46e5',
700: '#4338ca',
800: '#3730a3',
900: '#312e81',
950: '#1e1b4b'
},
gray: {
50: '#f8f7ff',
100: '#f6f5ff',
200: '#eff0fe',
300: '#e0e0fc',
400: '#98A5C0',
500: '#84848f',
600: '#595983',
700: '#1e1f48',
800: '#141430',
900: '#0a0a18',
950: '#050329'
}
}
More complete color can see in Official Tailwindcss
Option
You can change setting about Tailwindcss from this file. For example: Change Google fonts from tailwind.config.js
// tailwind.config.js
module.exports = {
mode: 'layers',
content: ['*.html/','./src/js/*.js',
'./docs/**/*.html','./ecommerce/*.html'],
darkMode: false, // or 'media' or 'class'
theme: {
extend: {},
fontFamily: {
sans: ['Nunito', 'sans-serif'],
serif: ['Merriweather', 'serif'],
},
},
variants: {
extend: {
backgroundOpacity: ['dark']
}
},
plugins: [
require('@mertasan/tailwindcss-variables')
]
}
For more information about Theme configuration please read in here