Each web site sooner or later wishes UI that lives outdoor the web page’s commonplace content material glide: a pop-up, a sticky reminder, a slide-in panel, or a affirmation instructed. In Divi 5, you’ll construct those with Canvases.
A Canvas is a indifferent design workspace that exists along the principle web page canvas. It isn’t a module dropped into the web page structure. As an alternative, it will provide you with a separate workspace for off-canvas UI, pop-ups, menus, staging layouts, and different designs that are meant to keep cut loose the principle web page whilst you construct.
This a part of the Mastery Direction covers two Canvas builds for the coworking homepage. The primary is a small Match Reminder realize anchored to the bottom-left of the viewport and dismissible with an in depth icon. The second one is a focused electronic mail opt-in pop-up this is hidden by way of default, gated by way of a cookie situation, and brought about when the customer scrolls to a particular phase.
In combination, those two examples display the total Canvas, Interactions, and Show Prerequisites workflow.
What Canvases Are
A Canvas is a indifferent workspace in Divi 5. The principle Canvas holds the visual web page content material. Further Canvases provide you with separate puts to construct exchange layouts, hidden UI, off-canvas components, pop-ups, menus, and design experiments.
When wanted, Canvas content material will also be appended to the front-end web page or injected with a Canvas Portal. You’ll be able to nonetheless design inside of a Canvas the use of acquainted Divi components, together with Sections, Rows, Columns, Teams, Modules, Presets, and Design Variables.
There are two major Canvas varieties:
- World Canvas: To be had around the web site and helpful for reusable UI, similar to pop-ups, menus, notification bars, and habitual site-wide components.
- Native Canvas: Tied to a particular web page or template and helpful for one-off UI that best belongs in a particular context.
We’ll construct each varieties on this educational. The Match Realize might be an area Canvas for the homepage. The e-mail opt-in pop-up might be a World Canvas, however we’ll cause it from the homepage. If you wish to have the similar pop-up to seem in other places, you’ll upload identical cause interactions on different pages or templates.
How Canvas Visibility Works
3 options paintings in combination to make a Canvas behave like a pop-up, realize, or slide-in panel.
- Visibility settings: Cover a component by way of default so it does now not seem till an interplay finds it.
- Interactions: Create event-based conduct. A cause, similar to Click on, Load, or Viewport Input, runs an impact, similar to Display Part, Cover Part, Toggle Visibility, Upload Cookie, or Take away Cookie, on a goal part.
- Show Prerequisites: Make a decision whether or not a component will have to render according to prerequisites similar to person position, tool, date, or cookie values.
This mix permits you to design the part visually, disguise it by way of default, disclose it on the proper second, and optionally save you it from showing once more after a customer closes it.

Match Reminder Realize
The Match Reminder is the easier of the 2 builds. This is a small card pinned to the bottom-left of the viewport. It features a mild background, a gloomy border, a heading, a brief description, and an in depth icon.
This realize seems when the web page rather a lot and will also be brushed aside for the present web page view. Since we can now not set a cookie for this one, it may possibly seem once more on a long run web page load.
Create The Native Canvas
Within the Visible Builder, open the left sidebar and make a choice Upload Canvas. Don’t make this one a World Canvas. Identify it Match Realize.
Set the Canvas to append beneath the principle web page content material. Then, give it a z-index of 999 so it stacks above common web page components however beneath the higher-priority pop-up we can construct subsequent.

Construct The Segment, Row, And Column
Open the brand new Canvas and upload a Segment. In the precise sidebar, set the Segment’s Admin Label to Match Realize. This label makes the phase more straightforward to seek out when developing interactions that concentrate on it.
Within the Segment’s Design tab, open Sizing. Set Max Width to min(250px, 40%). This CSS serve as caps the cardboard at 250px on better displays whilst permitting it to shrink on smaller displays.
Subsequent, move to Complicated > Place. Set Place to Mounted and Offset Foundation to backside left.
Below Spacing, set Margin Backside and the left/proper margin values to 1rem. This assists in keeping the attention clear of the viewport edges. Then, set Padding Best and Padding Backside to 0px since the internal Column will maintain the cardboard padding.
Set the Segment Row’s Width to 100%. Then, observe the Defined – Darkish Part Preset to the Column.
Within the Column’s Border possibility workforce, upload the Define Possibility Workforce Preset in case your setup makes use of that preset for the 1px darkish border. Then, set the Row’s Background Colour to the Background – Mild Grey variable.
After all, at the Column, set Vertical Hole to 1rem so the modules inside of stack with constant spacing.
Upload The Realize Content material
Within the Column, upload 3 modules on this order:
- Icon module
- Heading module
- Textual content module
Use an in depth icon, similar to an X, within the Icon module. Set its Place to Absolute, Offset Foundation to most sensible proper, and the highest/backside and left/proper margin values to -0.5rem. Set Icon Width to 26px.
Absolute positioning assists in keeping the shut icon anchored to the cardboard’s nook as an alternative of the viewport.
Subsequent, upload a Heading module and observe the Subheading Part Preset. Set the heading textual content to Reminder!.
Then, upload a Textual content module and observe the Small Textual content Part Preset. Set the frame textual content to: Networking occasion on Wednesday, August sixteenth, from 4 pm till 6 pm.
Twine The Shut Interplay
Make a choice the Icon module. Open the Complicated tab and make bigger the Interactions possibility workforce. Click on Upload Interplay and configure it like this:
- Cause: Click on
- Impact: Cover Part
- Goal: Canvas, Segment — Match Realize
After all, go back to the Segment and set a background colour with 0% opacity. This assists in keeping the Segment background clear so it does now not create visual sharp corners at the back of the rounded Row or Column styling whilst scrolling.
Save the Canvas and reload the entrance finish. The attention will have to seem within the bottom-left nook and disappear when the shut icon is clicked. As a result of no cookie is ready, the attention can reappear on a long run web page load.
Electronic mail Decide-In Pop-Up
The e-mail opt-in pop-up is extra concerned. This is a focused modal with a headline, reassurance textual content, an in depth icon, and an electronic mail signup shape. It’s hidden by way of default, proven when a customer reaches a delegated homepage phase, and blocked from long run perspectives after the customer closes it.
Create The World Canvas
From the left sidebar, upload every other Canvas and make it a World Canvas. Identify it Signal Up Pop-up Shape.
Append it beneath the principle web page content material. Set its z-index to 1000 so apparently above the Match Realize if each are visual on the similar time.

Construct The Pop-Up Segment
Upload a Segment and set its Admin Label to Subscribe. That is the title the homepage interplay will goal.
Within the Segment’s Design tab, observe the Defined – Darkish Possibility Workforce Preset to the Border possibility workforce. This assists in keeping the pop-up shell aligned with the remainder of the design device. Then, set Background Colour to Background – Mild Grey.
Below Design > Sizing, set Width to 980px and Max Width to 80%. This provides the pop-up a beneficiant desktop width whilst fighting it from exceeding the viewport on smaller displays.
Below Complicated > Place, set Place to Mounted and Offset Foundation to heart heart.
Construct The Row And Columns
Upload a Row the use of a Flex container with Two Offset Columns, with 3/5 and 2/5 Column widths. Set the Row’s Format Wrapping to Wrap. Then, reproduction the second one Column to create a 3rd Column.
Configure the 3 Columns with those desktop and pill Column Categories:
- Column 1: 3/5 on Desktop and Fullwidth on Pill and smaller.
- Column 2: 2/5 on Desktop and Fullwidth on Pill and smaller.
- Column 3: Fullwidth on Desktop and smaller.
Set each Horizontal Hole and Vertical Hole to the Spacing – Medium Design Variable.

Cap the Row’s Max Width with the Max Width – 900 Design Variable to stay the internal content material readable within the wider pop-up shell.

Upload The Pop-Up Modules
In Column 1, upload a Heading module with the textual content Reductions, Giveaways, & Different Information. Observe the H4 Preset to measurement and magnificence it.
In Column 2, upload an Icon module the use of an in depth icon. Set Place to Mounted, set Offset Foundation to most sensible proper, and set the highest/backside and left/proper margin values to 1rem. Set Icon Width to 26px.
Underneath the icon in Column 2, upload a Textual content module and observe the Small Textual content Part Preset. Set the textual content to Max one electronic mail per thirty days. On desktop, you’ll align this newsletter to the precise. On Pill and smaller breakpoints, transfer it again to the left so it reads naturally.
In Column 3, upload an Electronic mail Optin module and observe the Darkish Part Preset.
Within the Content material tab, set the Electronic mail Supplier dropdown on your carrier of selection. This construct makes use of MailerLite, however setup varies by way of supplier. Attach the account, then take away the default heading textual content and frame replica within the module. For this pop-up, we’ll best come with the e-mail box.
Set The Cookie Show Situation
Make a choice the pop-up Segment and move to Complicated > Show Prerequisites. Upload a Cookie situation and configure it like this:
- Show Rule: Cookie Price Does Now not Equivalent
- Cookie Identify: hide-popup
- Cookie Price: true
This tells Divi to render the pop-up Segment best when the hide-popup cookie does now not equivalent true. After the customer closes the pop-up and the cookie is written, the situation not passes, so the pop-up is not going to render once more till the cookie expires or is cleared.
Twine The Shut And Cookie Interactions
Make a choice the shut Icon module in Column 2. Within the Interactions possibility workforce, upload two interactions to the similar click on cause.
- Click on → Cover Part → Segment Subscribe. This closes the pop-up right away.
- Click on → Upload Cookie. Set Cookie Identify to hide-popup and Cookie Price to true. If the interplay settings come with a length box, set the length to the period of time you wish to have the pop-up to stick hidden.
Each interactions run from the similar click on occasion. The primary provides the customer a right away visible reaction by way of remaining the pop-up. The second one writes the cookie that the Show Situation exams on long run web page rather a lot.
Subsequent, make a choice the entire pop-up Segment. Pass to Complicated > Visibility and conceal the Segment around the breakpoints the place the pop-up will have to get started hidden. The homepage cause will disclose it when the customer reaches the selected phase.
Twine The Homepage Cause
Save the Canvas, then go back to the principle homepage Canvas. We best want one cause.
Open the Layers View from the left sidebar and make a choice the phase that incorporates Thrive in a greater paintings setting. In that phase’s Complicated tab, make bigger Interactions and upload this interplay:
- Cause: Viewport Input
- Impact: Display Part
- Goal: Canvas, Segment — Subscribe
This presentations the pop-up when the customer scrolls that phase into view. It additionally avoids appearing the pop-up right away on web page load, which is normally a much less intrusive revel in.
The Match Realize can seem on web page load as a result of it’s small and situated out of the way in which. The e-mail pop-up waits for a scroll-based cause as it takes over the middle of the display screen. Each components are closable with Icon interactions, and the e-mail pop-up additionally makes use of a cookie situation to forestall repeat perspectives after it’s brushed aside.
Get started Development Canvases In Divi 5 Lately!
With the Match Realize and electronic mail opt-in pop-up stressed out up, the coworking homepage now has interactive UI outdoor the traditional web page glide. The small realize surfaces well timed knowledge with out taking on the display screen, whilst the pop-up seems at a extra planned second and remains hidden after dismissal.
The similar Canvas, Interactions, and Show Prerequisites trend can energy different off-page UI: cookie banners, slide-ins, announcement bars, affirmation activates, onboarding panels, and off-canvas menus.
Phase 12 of the Divi 5 Mastery direction made the web site cling up throughout breakpoints. This section added conduct and interplay. In Phase 14, we’ll transfer into the Loop Builder, the place dynamic posts, merchandise, and customized question information will also be was totally designed Divi layouts. That implies the similar design device you constructed right through the direction can render many pieces with out duplicating the similar modules by way of hand.
The submit Part 13: Creating Interactive Off-Canvas Elements (Popups & More) seemed first on Elegant Themes Blog.



0 Comments