Skip to content

Using block manager how to have a slider panel with two tabs - each tab having its own blocks ? #6338

Answered by mosh-tudor
chetan-bbc asked this question in Q&A
Discussion options

You must be logged in to vote

@chetan-bbc

Can we build the control panel having two tabs using different features of grapesjs?

You can do it using https://grapesjs.com/docs/modules/Blocks.html#customization

Something like this

const editor = grapesjs.init({
  // ...
  blockManager: {
    // ...
    custom: true,
  },
});


editor.on('block:custom', (props: TCustomBlocksProps) => {
  <Tabs className={styles.tabs}>
    <Tabs.Pane tab={'Elements'} key={'elements'} active={true}>
      <CustomBlocksElements bm={props.bm} dragStart={props.dragStart} dragStop={props.dragStop} />
    </Tabs.Pane>
    <Tabs.Pane tab={'Sections'} key={'sections'}>
      <CustomBlocksSections bm={props.bm} dragStart={props.dragStart} dragStop={

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by chetan-bbc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants