Modal width
For those who don't know how to use modal attributes. You can add option opts.attributes to modal's open method as below. Because I didn't find how to use it in the documentation here.
Read full answer below ↓Question
Hello, is there a way to set a modal's width, its currently set to 850px by CSS, but I would like to create a dialog with a small amount of text and its too big for this: But it would be great to get this: Without overriding the CSS, because I would still like to use large modals. I checked the source code and the docs, it seems the only properties you can set are title and content.
Answers (3)
For those who don't know how to use modal attributes. You can add option opts.attributes to modal's open method as below. Because I didn't find how to use it in the documentation here.
OK, what I'm thinking is to create a function to be able to set the width like: setWidth('400px'), and also a method to set custom attributes: setAttributes({'data-custom-attribute': 123}). I think 2 functions are needed because the width is controlled by CSS, and so is the modal's design, so just...
Hello, sorry I'm piled with work now, if @sunnykgupta can give this a shot it would be great.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #2364
[Question] How to add toolbar functionality to the layers panel.
I am trying to add the toolbar to the layers panel and I am not sure how to go about this. Is there any way to accomplish this? toolbar Whe...
Issue #2002
Images won't resize to full width
When an image is resized with the mouse, it won't stretch all the way to the edge of the canvas, leaving a white space on the right side. I...
Issue #1368
Resize canvas
Is there a way to have a dynamic resizing of the canvas? i.e not using the Device Manager, but having a drag and drop of the width, similar...
Issue #1791
Name of the destination
@artf, Is there any way to show the name of the destination element ?
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins →Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.
Browse premium plugins →Related tutorials
In-depth guides on the same topic.
Tutorial
Super Tooltip for GrapesJS — Version 0.1.5 Released 🎉
We’re excited to announce the v 0.1.5 update of Super Tooltip, our floating‑menu and tooltip plugin for GrapesJS
Tutorial
GrapesJS in 2026: The Complete Guide to the Open-Source Web Builder Framework
Master GrapesJS in 2026. Architecture, code examples, React integration, plugin development, Studio SDK, and how it compares to other projects
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.