Skip to main content
Deno 2 is finally here 🎉️
Learn more
Extremely Popular
Go to Latest
interface TwindUserConfig
import { type TwindUserConfig } from "https://deno.land/x/fresh@1.6.3/plugins/twindv1_deps.ts";

Type Parameters

optional
Theme = BaseTheme
optional
Presets extends Preset<any>[] = Preset[]

Properties

optional
presets: Presets
optional
darkMode: DarkModeConfig

Allows to change how the dark variant is used (default: "media")

optional
variants: Variant<BaseTheme & ExtractThemes<Theme, Presets>>[]
optional
rules: Rule<BaseTheme & ExtractThemes<Theme, Presets>>[]
optional
hash: boolean | undefined | HashFunction

Enables hashing of all classes (default: false).

If a function is given it can be used to hash only certain classes:

{
  hash(className, defaultHash) {
    if (/^[~@]\(/.test(className)) {
      // a shortcut like `~(...)` or apply like `@(...)`
      return defaultHash(className)
    }
    return className
  }
}
optional
ignorelist: MaybeArray<string | RegExp>
optional
finalize: MaybeArray<Finalize<Theme & BaseTheme>>