bricks_import_design

UtilityAdvancedComplexity: 8/10
Import a page design from a reference URL

Overview

Imports design tokens from an external URL and applies them to the Bricks design system. This is the action companion to bricks_analyze_url — while analyze_url extracts and reports design tokens, import_design extracts and automatically creates the corresponding colors, variables, classes, and theme style settings.

Combines the extraction capability of bricks_analyze_url with automated creation of design system elements. It can create a full color palette from the extracted colors, set up typography based on detected fonts, and configure spacing based on the source site patterns.

Best used as the first step in a « clone design » workflow, followed by manual refinement of the imported design system tokens.

Key Features

Automated Color Palette Creation
Extracts colors from the source URL and creates a curated Bricks color palette. Groups colors into primary, secondary, neutrals, and accents based on frequency and context analysis.
Typography Import
Detects font families and weights from the source site, configures theme styles with the detected typography scale, and optionally loads Google Fonts if detected.
Layout Pattern Mapping
Maps detected grid and flexbox patterns to Bricks global classes and spacing variables, creating a foundation for consistent layouts matching the source design.
Safe Merge
Does not overwrite existing design system elements. Imported colors, classes, and variables are added alongside existing ones, preserving your current design system.

When to Use

You want to quickly replicate an existing website design in Bricks
You need a starting point for the design system based on a reference site
You want to import a color palette and typography from another website
You are migrating a site from another platform to Bricks and want to preserve the design
Prerequisites
The target URL must be publicly accessible
A child theme should be active for font uploads (use bricks_ensure_child_theme)
Bricks Builder version 1.9 or higher
Existing design system elements will not be overwritten (safe merge)

When NOT to Use

You only want to inspect design tokens without creating anything — use bricks_analyze_url instead
You already have a design system and want to add to it manually
The reference site requires authentication to access
You want to import actual content or page structure — this only imports design tokens

Parameters

2 Total Parameters1 Required1 Optional

Warning: Undefined array key "param_enum_values" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 28
urlstring (URL)REQUIRED
The URL to extract design tokens from and import into the Bricks design system.

Warning: Undefined array key "param_enum_values" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 28
importarray of stringsoptional
What to import: colors, fonts, spacing, layout. Omit to import everything detected.
Default: all

Code Examples


Warning: Undefined array key "example_output" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 12

Import full design from a reference site

Extracts and imports all design tokens from a reference website.

JSON
bricks_import_design({
  url: "https://reference-site.com"
})
// Returns:
// {
//   imported: {
//     colors_created: 8,
//     fonts_configured: 2,
//     variables_created: 5,
//     classes_created: 3
//   },
//   source: { colors: [...], fonts: [...], layout_patterns: [...] },
//   skipped: ["Color #ffffff already exists"]
// }

Warning: Undefined array key "example_output" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 12

Import only colors

Imports just the color palette from a reference site.

JSON
bricks_import_design({
  url: "https://reference-site.com",
  import: ["colors"]
})

Common Mistakes


Warning: Undefined array key "fix_description" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 47

Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-includes/kses.php on line 1935

Warning: Undefined array key "wrong_code" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 48

Warning: Undefined array key "right_code" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 49
Always run bricks_analyze_url first to review what will be imported. The automatic import may create unwanted colors or classes from utility frameworks (Tailwind, Bootstrap) that pollute your design system.

Warning: Undefined array key "fix_description" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 47

Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-includes/kses.php on line 1935

Warning: Undefined array key "wrong_code" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 48

Warning: Undefined array key "right_code" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 49
Design import captures tokens (colors, fonts, patterns) but not the exact layout, spacing, or component structure. After importing, you still need to build sections and configure elements manually.

Warning: Undefined array key "fix_description" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 47

Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-includes/kses.php on line 1935

Warning: Undefined array key "wrong_code" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 48

Warning: Undefined array key "right_code" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 49
The tool imports colors based on frequency analysis, but may include irrelevant colors. After import, review and delete unnecessary colors using bricks_delete_color.

Tips & Warnings

Tips & Warnings

Tip: The recommended workflow is: (1) bricks_analyze_url to preview tokens, (2) curate the list of desired imports, (3) bricks_import_design to create design system elements, (4) refine the imported tokens using bricks_update_color, bricks_update_theme_styles, etc.

Tip: For best results, analyze the homepage or a representative page with the most diverse design elements (hero, features, cards, footer).

Warning: This tool creates design system elements that are difficult to undo in bulk. If you import 20 colors and realize they are wrong, you will need to delete them one by one. Preview with bricks_analyze_url first.

Warning: Single-page applications (React, Vue, Angular) render content via JavaScript, so the fetched HTML may contain minimal design data. Static or server-rendered sites yield the best results.

Return Values

FieldTypeDescription
importedobjectSummary of what was imported: colors_created (count), fonts_configured (count), variables_created (count), classes_created (count).
sourceobjectThe extracted design tokens from the source URL (same format as bricks_analyze_url).
skippedarrayItems that were skipped because they already existed in the design system.

Related Tools

Technical Details

Tool ID
bricks_import_design
API Endpoint
/analysis/import
HTTP Method
POST
Namespace
analysis
Source File
analysis/design-import.ts
Version
1.0
Min Bricks Version
1.9
Requires Auth
Yes

Changelog

v1.0
Initial release with automated color palette creation, typography import, layout pattern mapping, and safe merge with existing design system.
20250101