Home / Function/ key() — tailwindcss Function Reference

key() — tailwindcss Function Reference

Architecture documentation for the key() function in theme.ts from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  26c86285_bab3_70fd_575a_6af471f7c77a["key()"]
  734cf7ec_fb2a_2532_7b20_b3a815c7e3e6["Theme"]
  26c86285_bab3_70fd_575a_6af471f7c77a -->|defined in| 734cf7ec_fb2a_2532_7b20_b3a815c7e3e6
  style 26c86285_bab3_70fd_575a_6af471f7c77a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/tailwindcss/src/theme.ts lines 144–147

  #unprefixKey(key: string) {
    if (!this.prefix) return key
    return `--${key.slice(3 + this.prefix.length)}`
  }

Domain

Subdomains

Frequently Asked Questions

What does key() do?
key() is a function in the tailwindcss codebase, defined in packages/tailwindcss/src/theme.ts.
Where is key() defined?
key() is defined in packages/tailwindcss/src/theme.ts at line 144.

Analyze Your Own Codebase

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

Try Supermodel Free