Tailwind CSS integration — scan source files for candidates and compile CSS.
Uses Oxide for fast parallel content scanning and QuickBEAM to run the Tailwind CSS compiler. No Node.js or CLI required.
Usage
# In your config:
config :volt, :tailwind,
sources: [
%{base: "lib/", pattern: "**/*.{ex,heex}"},
%{base: "assets/", pattern: "**/*.{vue,ts,tsx}"}
]
# Generate CSS:
{:ok, css} = Volt.Tailwind.build()Tailwind directives
Volt supports Tailwind's CSS-first directives like @theme, @source,
@utility, @variant, and @apply through the Tailwind compiler.
Volt also resolves local @import, @reference, @plugin, and @config
files inside QuickBEAM, plus installed package plugins like
@tailwindcss/typography.
Summary
Functions
Compile Tailwind CSS from scanned candidates.
Returns a specification to start this module under a supervisor.
Incremental build — only process changed files and return CSS if new candidates found.
Functions
Compile Tailwind CSS from scanned candidates.
Scans all configured source directories for Tailwind class candidates, then runs the Tailwind compiler to generate CSS.
Options
:css— custom input CSS (default: Tailwind's base with theme + preflight + utilities):css_base— base directory for resolving local@import,@reference,@plugin, and@configpaths:sources— override source patterns (default: from config):minify— minify the output CSS (default:false)
Returns a specification to start this module under a supervisor.
See Supervisor.
Incremental build — only process changed files and return CSS if new candidates found.
Returns {:ok, css} if new candidates were found, :unchanged otherwise.