extractCnClasses() — ui Function Reference
Architecture documentation for the extractCnClasses() function in transform-style-map.ts from the ui codebase.
Entity Profile
Dependency Diagram
graph TD 36418f07_a757_bf99_cc48_08363c18880c["extractCnClasses()"] cef4e429_7112_fef5_ae0b_a838a57ccf71["transform-style-map.ts"] 36418f07_a757_bf99_cc48_08363c18880c -->|defined in| cef4e429_7112_fef5_ae0b_a838a57ccf71 e405253b_cc7a_b5b7_8daf_ff3eda64d06b["applyStyleToCvaString()"] e405253b_cc7a_b5b7_8daf_ff3eda64d06b -->|calls| 36418f07_a757_bf99_cc48_08363c18880c 7ae791a4_b3a5_57c7_68a9_d4375998b5e7["extractCnClassesFromAttribute()"] 7ae791a4_b3a5_57c7_68a9_d4375998b5e7 -->|calls| 36418f07_a757_bf99_cc48_08363c18880c df889faf_8354_bd93_aed3_b6b169a2608d["extractCnClass()"] df889faf_8354_bd93_aed3_b6b169a2608d -->|calls| 36418f07_a757_bf99_cc48_08363c18880c 059373ea_201b_782a_4e11_f0a44a18c122["extractCnClassesFromCnCall()"] 059373ea_201b_782a_4e11_f0a44a18c122 -->|calls| 36418f07_a757_bf99_cc48_08363c18880c style 36418f07_a757_bf99_cc48_08363c18880c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/shadcn/src/styles/transform-style-map.ts lines 270–273
function extractCnClasses(str: string) {
const matches = str.matchAll(/\bcn-[\w-]+\b/g)
return Array.from(matches, (match) => match[0])
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does extractCnClasses() do?
extractCnClasses() is a function in the ui codebase, defined in packages/shadcn/src/styles/transform-style-map.ts.
Where is extractCnClasses() defined?
extractCnClasses() is defined in packages/shadcn/src/styles/transform-style-map.ts at line 270.
What calls extractCnClasses()?
extractCnClasses() is called by 4 function(s): applyStyleToCvaString, extractCnClass, extractCnClassesFromAttribute, extractCnClassesFromCnCall.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free