Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/fresh/plugins/twindv1_deps.ts>tx

The next-gen web framework.
Extremely Popular
Go to Latest
variable tx
import { tx } from "https://deno.land/x/fresh@1.5.1/plugins/twindv1_deps.ts";

Combines tw and cx.

Using the default tw instance:

import { tw } from '@twind/core'
tx`underline ${falsy && 'italic'}`
tx('underline', falsy && 'italic')
tx({'underline': true, 'italic': false})

// using a custom twind instance
import { tw } from './custom/twind'
import { tw } from './custom/twind'
tx.bind(tw)

Using a custom tw instance:

import { tx as tx$ } from '@twind/core'
import { tw } from './custom/twind'

export const tx = tx$.bind(tw)

tx`underline ${falsy && 'italic'}`
tx('underline', falsy && 'italic')
tx({'underline': true, 'italic': false})

type

TxFunction