Issue #3294💬 AnsweredOpened February 27, 2021by server1020 reactions

Adding options to properties list array in style manager

快速解答by Ju99ernaut

I believe you can move the build props out of the properties list and still achieve what you're trying, the built in flex box related properties only show when a component has display: flex. It's also important to note that buildProps are just built in presets of inputs so they cannot be embedded into other inputs i.e...

Read full answer below ↓

Question

Hi,

How can I add buildProps to properties list such that when an option is selected, the properties of that option will be displayed

An example of what I am trying to achieve on the flex property.

{
      name: 'Layout',
      open: true,
      buildProps: ['display'],
      properties: [
        {
          type: 'radio',
          property: 'display',
          list: [
            {
              title: 'Block',
              name: '<span class="material-icons">calendar_view_day</span>',
              value: 'block',
            },
            {
              title: 'Flex',
              name: '<span class="material-icons">calendar_view_week</span>',
              value: 'flex',
              buildProps: ['direction', 'align-content', 'align-items', 'align-self', 'justify-content', 'justify-items', 'justify-self'],
            },
            {
              title: 'Grid',
              name: '<span class="material-icons">grid_on</span>',
              value: 'grid',
            },
            {
              title: 'Inline-block',
              name: '<span class="material-icons">padding</span>',
              value: 'inline-block',
            },
            {
              title: 'Inline',
              name: '<span class="material-icons">horizontal_distribute</span>',
              value: 'inline',
            },
            {
              title: 'None',
              name: '<span class="material-icons">visibility_off</span>',
              value: 'none',
            },
          ]
        }
      ]
    }

style-manager

Answers (4)

Ju99ernautMarch 3, 2021

I believe you can move the build props out of the properties list and still achieve what you're trying, the built in flex box related properties only show when a component has display: flex. It's also important to note that buildProps are just built in presets of inputs so they cannot be embedded into other inputs i.e the properties list

{
      name: 'Layout',
      open: true,
      buildProps: ['display', 'direction', 'align-content', 'align-items', 'align-self', 'justify-content', 'justify-items', 'justify-self'],
      properties: [
        {
          type: 'radio',
          property: 'display',
          list: [
            {
              title: 'Block',
              name: '<span class="material-icons">calendar_view_day</span>',
              value: 'block',
            },
            {
              title: 'Flex',
              name: '<span class="material-icons">calendar_view_week</span>',
              value: 'flex',
            },
            {
              title: 'Grid',
              name: '<span class="material-icons">grid_on</span>',
              value: 'grid',
            },
            {
              title: 'Inline-block',
              name: '<span class="material-icons">padding</span>',
              value: 'inline-block',
            },
            {
              title: 'Inline',
              name: '<span class="material-icons">horizontal_distribute</span>',
              value: 'inline',
            },
            {
              title: 'None',
              name: '<span class="material-icons">visibility_off</span>',
              value: 'none',
            },
          ]
        }
      ]
    }
server102March 14, 2021

Thank you. I tried it but the grid properties are not working. Might have to implement it manually but am not sure on how best to approach the problem.

Ju99ernautMarch 15, 2021

There's no buildProps for grid properties so you'll have to build those from scratch, unfortunately docs don't have much info on custom properties probably you'll have to piece things together from the API reference https://grapesjs.com/docs/api/style_manager.html#stylemanager

ClaudeCodeMay 17, 2026

Thanks for reporting this, @server102.

Thanks for sharing your report about FEAT: Adding options to properties list array in style manager. To help the team investigate and prioritize this:

Please provide:

  1. A minimal reproducible example (CodeSandbox/JSFiddle)
  2. Your GrapesJS version number
  3. Browser and OS information
  4. Any error messages from the browser console
  5. Steps to reproduce the issue

What helps most:

  • Minimal code example (not your full project)
  • Screen recording or screenshot showing the issue
  • Expected vs actual behavior clearly stated
  • GrapesJS configuration you're using

With these details, the maintainers can identify and prioritize a fix much faster. The GrapesJS team is very responsive to well-documented issues.

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.