Home / Function/ group() — tailwindcss Function Reference

group() — tailwindcss Function Reference

Architecture documentation for the group() function in variants.ts from the tailwindcss codebase.

Function typescript Oxide Extractor calls 2 called by 2

Entity Profile

Dependency Diagram

graph TD
  15fe2878_a9ae_f5b5_2f4c_e3238b9272fe["group()"]
  67c140cd_3928_7c30_7f6d_c67052da2a02["Variants"]
  15fe2878_a9ae_f5b5_2f4c_e3238b9272fe -->|defined in| 67c140cd_3928_7c30_7f6d_c67052da2a02
  31653e23_464a_3652_4a48_0c82332a92c4["buildPluginApi()"]
  31653e23_464a_3652_4a48_0c82332a92c4 -->|calls| 15fe2878_a9ae_f5b5_2f4c_e3238b9272fe
  876035d0_94a8_cf2f_314a_d520aaae6e4b["createVariants()"]
  876035d0_94a8_cf2f_314a_d520aaae6e4b -->|calls| 15fe2878_a9ae_f5b5_2f4c_e3238b9272fe
  893d14c3_e93d_d4ba_2fdd_de2331f8f26d["nextOrder()"]
  15fe2878_a9ae_f5b5_2f4c_e3238b9272fe -->|calls| 893d14c3_e93d_d4ba_2fdd_de2331f8f26d
  ab94dcde_768f_3d99_6111_8043865014ab["set()"]
  15fe2878_a9ae_f5b5_2f4c_e3238b9272fe -->|calls| ab94dcde_768f_3d99_6111_8043865014ab
  style 15fe2878_a9ae_f5b5_2f4c_e3238b9272fe fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/tailwindcss/src/variants.ts lines 141–146

  group(fn: () => void, compareFn?: CompareFn) {
    this.groupOrder = this.nextOrder()
    if (compareFn) this.compareFns.set(this.groupOrder, compareFn)
    fn()
    this.groupOrder = null
  }

Domain

Subdomains

Frequently Asked Questions

What does group() do?
group() is a function in the tailwindcss codebase, defined in packages/tailwindcss/src/variants.ts.
Where is group() defined?
group() is defined in packages/tailwindcss/src/variants.ts at line 141.
What does group() call?
group() calls 2 function(s): nextOrder, set.
What calls group()?
group() is called by 2 function(s): buildPluginApi, createVariants.

Analyze Your Own Codebase

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

Try Supermodel Free