Custom block category group
You can register a custom block category grouping using the code below in: app > block.json
add_filter('block_categories_all', function ($categories) {
return array_merge([
[
'slug' => 'custom',
'title' => 'Custom',
'icon' => null,
],
], $categories);
});
Then on your actual block.json (within the individual block folder), regiser to it using "category": "custom",
The custom category will appear as its own group at the top of the block inserter. All your blocks using that slug will be grouped under it.
If you need multiple custom categories, use:
add_filter('block_categories_all', function ($categories) {
return array_merge([
[
'slug' => 'group-1',
'title' => 'Group 1',
'icon' => null,
],
[
'slug' => 'group-2',
'title' => 'Group 2',
'icon' => null,
],
], $categories);
});