bricks_get_class_categories
Overview
Lists all global class categories defined in the Bricks design system. Categories organize classes in the Bricks builder UI sidebar, making it easier for designers and developers to find and apply the right class.
This is a read-only tool with no parameters. Use it to discover the organizational structure of the class library before creating new classes or categories.
Key Features
When to Use
When organizing classes during Phase 2 design system setup
To verify category names before assigning classes to them
When auditing the design system structure
When NOT to Use
When you want to create a category — use bricks_create_class_category
Parameters
(none)noneoptionalCode Examples
List all class categories
Returns the complete list of categories used to organize global classes in the Bricks builder sidebar.
// List all class categories
bricks_get_class_categories(){
"categories": [
{ "id": "cat01", "name": "Layout" },
{ "id": "cat02", "name": "Typography" },
{ "id": "cat03", "name": "Buttons" },
{ "id": "cat04", "name": "Cards" },
{ "id": "cat05", "name": "Utilities" }
]
}Common Mistakes
// Creating "Buttons" category without checking
bricks_create_class_category({ name: "Buttons" })
// Error: category "Buttons" already exists// Check first
bricks_get_class_categories()
// See "Buttons" already exists — no need to createTips & Warnings
Recommended categories: A well-organized design system typically uses these categories: Layout, Typography, Buttons, Cards, Utilities, and optionally Spacing, Forms, and Components.
Note: Classes can also be created with a category name that does not exist yet — the category will be created automatically by bricks_create_global_class.