Home / File/ types.ts — tailwindcss Source File

types.ts — tailwindcss Source File

Architecture documentation for types.ts, a typescript file in the tailwindcss codebase. 5 imports, 17 dependents.

File typescript Oxide Extractor 5 imports 17 dependents 1 functions

Entity Profile

Dependency Diagram

graph LR
  479eaf18_f640_94ff_bd07_456688f9ac14["types.ts"]
  da5d1116_ab2a_437a_6b13_c1429fd546fa["plugin-api.ts"]
  479eaf18_f640_94ff_bd07_456688f9ac14 --> da5d1116_ab2a_437a_6b13_c1429fd546fa
  aace5133_6deb_d0f7_e1a1_d3e530878a5b["Plugin"]
  479eaf18_f640_94ff_bd07_456688f9ac14 --> aace5133_6deb_d0f7_e1a1_d3e530878a5b
  ffe0b7b8_e1fc_a7de_d070_1fd07c3c9a6b["PluginWithConfig"]
  479eaf18_f640_94ff_bd07_456688f9ac14 --> ffe0b7b8_e1fc_a7de_d070_1fd07c3c9a6b
  cad44155_17aa_e1d6_081a_8f3b4f06bcde["resolve-config.ts"]
  479eaf18_f640_94ff_bd07_456688f9ac14 --> cad44155_17aa_e1d6_081a_8f3b4f06bcde
  b521a87d_7940_0a07_a022_4bf8a651911f["PluginUtils"]
  479eaf18_f640_94ff_bd07_456688f9ac14 --> b521a87d_7940_0a07_a022_4bf8a651911f
  ffe9c87e_35ad_f431_9625_80fc875792a7["migrate-js-config.ts"]
  ffe9c87e_35ad_f431_9625_80fc875792a7 --> 479eaf18_f640_94ff_bd07_456688f9ac14
  ee07edaa_f575_f9a5_6581_1200f759b32c["migrate-media-screen.test.ts"]
  ee07edaa_f575_f9a5_6581_1200f759b32c --> 479eaf18_f640_94ff_bd07_456688f9ac14
  80bb9840_1d91_d6ca_549c_09209ffc25a6["migrate-modernize-arbitrary-values.test.ts"]
  80bb9840_1d91_d6ca_549c_09209ffc25a6 --> 479eaf18_f640_94ff_bd07_456688f9ac14
  2745c5e0_8ea4_a1c7_4f84_369746e3eb63["apply-compat-hooks.ts"]
  2745c5e0_8ea4_a1c7_4f84_369746e3eb63 --> 479eaf18_f640_94ff_bd07_456688f9ac14
  8d84257d_f3b2_cdf8_542f_835967da0481["apply-config-to-theme.ts"]
  8d84257d_f3b2_cdf8_542f_835967da0481 --> 479eaf18_f640_94ff_bd07_456688f9ac14
  c366ff81_32f3_ab43_fb66_6ea38913c09a["apply-keyframes-to-theme.ts"]
  c366ff81_32f3_ab43_fb66_6ea38913c09a --> 479eaf18_f640_94ff_bd07_456688f9ac14
  a0ec45fb_d162_d87d_7041_fadd217a3619["create-compat-config.ts"]
  a0ec45fb_d162_d87d_7041_fadd217a3619 --> 479eaf18_f640_94ff_bd07_456688f9ac14
  cad44155_17aa_e1d6_081a_8f3b4f06bcde["resolve-config.ts"]
  cad44155_17aa_e1d6_081a_8f3b4f06bcde --> 479eaf18_f640_94ff_bd07_456688f9ac14
  7a8b38fe_f674_f253_e4c8_9043c8b072e0["container.ts"]
  7a8b38fe_f674_f253_e4c8_9043c8b072e0 --> 479eaf18_f640_94ff_bd07_456688f9ac14
  4c8bb5d7_9845_fe79_ed7d_c561197c3471["dark-mode.ts"]
  4c8bb5d7_9845_fe79_ed7d_c561197c3471 --> 479eaf18_f640_94ff_bd07_456688f9ac14
  style 479eaf18_f640_94ff_bd07_456688f9ac14 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import type { Plugin, PluginWithConfig } from '../plugin-api'
import type { PluginUtils } from './resolve-config'

export type ResolvableTo<T> = T | ((utils: PluginUtils) => T)

export interface UserConfig {
  presets?: UserConfig[]
  theme?: ThemeConfig
  plugins?: Plugin[]
}

export type ThemeValue = ResolvableTo<Record<string, unknown>> | null | undefined
export type ResolvedThemeValue = Record<string, unknown> | null

export type ThemeConfig = Record<string, ThemeValue> & {
  extend?: Record<string, ThemeValue>
}

export interface ResolvedConfig {
  theme: Record<string, Record<string, unknown>>
  plugins: PluginWithConfig[]
}

// Content support
type ContentFile = string | { raw: string; extension?: string }

export interface UserConfig {
  content?: ContentFile[] | { relative?: boolean; files: ContentFile[] }
}

type ResolvedContent = { base: string; pattern: string } | { raw: string; extension?: string }

export interface ResolvedContentConfig {
  files: ResolvedContent[]
}

export interface ResolvedConfig {
  content: ResolvedContentConfig
}

// Dark Mode support
type DarkModeStrategy =
  // No dark mode support
  | false

  // Use the `media` query strategy.
  | 'media'

  // Use the `class` strategy, which requires a `.dark` class on the `html`.
  | 'class'

  // Use the `class` strategy with a custom class instead of `.dark`.
  | ['class', string]

  // Use the `selector` strategy — same as `class` but uses `:where()` for more predictable behavior
  | 'selector'

  // Use the `selector` strategy with a custom selector instead of `.dark`.
  | ['selector', string]

  // Use the `variant` strategy, which allows you to completely customize the selector
  // It takes a string or an array of strings, which are passed directly to `addVariant()`
  | ['variant', string | string[]]

export interface UserConfig {
  darkMode?: DarkModeStrategy
}

export interface ResolvedConfig {
  darkMode: DarkModeStrategy | null
}

// `prefix` support
export interface UserConfig {
  prefix?: string
}

export interface ResolvedConfig {
  prefix: string
}

// `blocklist` support
export interface UserConfig {
  blocklist?: string[]
}

export interface ResolvedConfig {
  blocklist: string[]
}

// `important` support
export interface UserConfig {
  important?: boolean | string
}

export interface ResolvedConfig {
  important: boolean | string
}

// `future` key support
export interface UserConfig {
  future?: 'all' | Record<string, boolean>
}

export interface ResolvedConfig {
  future: Record<string, boolean>
}

// `experimental` key support
export interface UserConfig {
  experimental?: 'all' | Record<string, boolean>
}

export interface ResolvedConfig {
  experimental: Record<string, boolean>
}

Domain

Subdomains

Functions

Frequently Asked Questions

What does types.ts do?
types.ts is a source file in the tailwindcss codebase, written in typescript. It belongs to the Oxide domain, Extractor subdomain.
What functions are defined in types.ts?
types.ts defines 1 function(s): T.
What does types.ts depend on?
types.ts imports 5 module(s): Plugin, PluginUtils, PluginWithConfig, plugin-api.ts, resolve-config.ts.
What files import types.ts?
types.ts is imported by 17 file(s): apply-compat-hooks.ts, apply-config-to-theme.ts, apply-keyframes-to-theme.ts, container.ts, create-compat-config.ts, dark-mode.ts, default-theme.ts, index.ts, and 9 more.
Where is types.ts in the architecture?
types.ts is located at packages/tailwindcss/src/compat/config/types.ts (domain: Oxide, subdomain: Extractor, directory: packages/tailwindcss/src/compat/config).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free