veylo.tailwind.js is the whole kit as a Tailwind v3 plugin. It is generated from veylo.css, so the markup and the look are identical to the plain CSS version. What you gain is Tailwind tokens and utilities, and theme options in your Tailwind config. The Tailwind showcase runs the same page on the plugin.
<script src="https://cdn.tailwindcss.com/3.4.17"></script>
<script src="https://veylo.ar0.eu/cdn/tailwind"></script>
<script>
tailwind.config = { prefix: 'tw-', corePlugins: { preflight: false }, plugins: [veylo] };
</script>// tailwind.config.js
module.exports = {
prefix: 'tw-',
corePlugins: { preflight: false },
plugins: [require('./veylo.tailwind.js')],
};preflight: false. Veylo draws its own reset, and Tailwind's would flatten the bevels.prefix: 'tw-'. Veylo has its own short helper classes (flex, fixed, outline, grid). Without a prefix Tailwind's utilities of the same name would override them. With it you write tw-flex, tw-bg-face and so on.Every theme token is a Tailwind colour, so utilities follow the active theme:
| Utility | Token |
|---|---|
tw-bg-face, tw-bg-field, tw-bg-desk, tw-bg-stripe, tw-bg-code | Surfaces |
tw-text-text, tw-text-dim, tw-text-link | Text |
tw-text-ok, tw-text-no, tw-text-err | Status |
tw-bg-acc, tw-from-acc-a, tw-to-acc-b | Accent and gradient ends |
tw-bg-b1 to tw-bg-b4, tw-border-rule | Bevel tones and rules |
| Utility | Use |
|---|---|
tw-shadow-raise | Buttons, windows (two-pixel bevel out) |
tw-shadow-sink | Inputs, wells (two-pixel bevel in) |
tw-shadow-flat-raise, tw-shadow-flat-sink | One-pixel versions |
tw-shadow-etch | Etched divider line |
tw-shadow-box | Thin outline |
<div class="tw-bg-face tw-shadow-raise tw-p-3">
<input class="tw-bg-field tw-shadow-sink tw-px-2">
</div>Use veylo.with() instead of the bare plugin to change themes and tokens from config:
plugins: [veylo.with({
default: 'midnight', // theme used when no data-theme is set
themes: { graphite: { acc: '#e11d48', 'acc-b': '#fb7185' } }, // override tokens, no leading --
vars: { fs: '14px', measure: '70rem' }, // global tokens on .veylo
})]The plugin is built from veylo.css by tools/build-tailwind.mjs (needs postcss and postcss-js at build time only). Edit the CSS, run the script, and the plugin and the Tailwind showcase update together.