Core Features
TailwindScript combines the power of Tailwind with modern JavaScript patterns, streamlining UI development.
1
JavaScript Integration
Create dynamic UIs with built-in hooks that natively integrate with Tailwind classes. No framework needed – just pure JS with style().
// Example
style(document.getElementById("nav"), "bg-blue-600 text-white px-4 py-3")
showMenu.addEventListener("click", () =>
style(document.getElementById("nav"), "bg-blue-700 text-white px-4 py-3")
)
2
Dynamic Styling
Apply conditionals to styles using JavaScript logic. Respond to state changes with built-in functions.
// Conditional styling
const themeSwitch = document.getElementById("theme-toggle")
themeSwitch.addEventListener("change", e => {
if(e.target.checked) {
style(document.body, "bg-gray-900 text-white")
style(themeSwitch, "bg-green-500")
} else {
style(document.body, "bg-white text-gray-900")
style(themeSwitch, "bg-red-500")
}
})
Advanced Features
🎨
Theme System
Create custom themes using our API that auto-applies to all components
🚀
Performance
Optimized for speed with automatic style purging and code compression
⚙️