Phox Elements
NOTICES Dismissible notice bars for Breakdance

Notice bars visitors can close and forget

Dismissible Div is a container with a close button. Put any elements inside, place it in the page, stuck to the top or bottom, or fixed over the page, and choose whether a closed notice stays closed for the session, a number of days or for good.

Normal, sticky or fixed Remembers dismissals Any content inside
Live demos

Four notices, each with its own settings

The promo bar just below sticks to the top of the screen as you scroll through this section. The notices below sit in the page. Click a close button to dismiss a notice, then reload the page to see which ones remember it.

New customersCrumb & Co. Bakery: 10% off your first order with code BREAD10. Ends Sunday.
Sticky top

The promo bar at the top of this section

Placement Sticky Top with z-index 50, dark background, a 12px radius and a white close icon. It stays at the top of the screen while you scroll through these demos. Remember Dismissal is off, so it comes back when you reload.

Cookie notice

A small notice card

Placement Normal, 360px wide, white with a border and a round grey close button. Remember Dismissal: For this browser session, with its own Notification ID.

Inline alert

A delivery update inside the page

Placement Normal, amber background and border, and a small brown close icon. Close it and reload: it stays hidden until you close the browser.

!
Delivery update

Orders placed after 2pm on Friday will be sent on Monday. Fresh bread orders are not affected.

Account message

A welcome note with a custom close icon

Placement Normal, teal background, and a circled close icon on a white 30px button. Remember Dismissal is off, so it shows on every visit.

Welcome back, your class is on Saturday

Wheel throwing for beginners, 10am at Kiln Street. Bring clothes you do not mind getting muddy.

How it works

Three steps to a notice bar

Build it like any other container.

1

Add the element

Drop Dismissible Div onto your page. It is listed as Dismissable Div in the Breakdance element panel.

2

Add your content

Put headings, text, buttons or any other elements inside, and lay them out with the layout controls.

3

Set placement and memory

Choose where it sits, then choose whether a closed notice stays closed for the session, a number of days or forever.

Features

What it can do

The layout of a div, with the behaviour of a notice.

Five placements

Normal in the page, sticky top, sticky bottom, fixed top or fixed bottom, with an offset from the edge.

Any content inside

It is a container, so any element can go inside and you arrange it with the layout controls.

Remember dismissal

Keep a closed notice hidden for the browser session, a set number of days or forever.

Notification ID

Give each notice its own ID so closing one never hides another.

Close button styling

Pick the icon, then set its size, colour, background, borders and position.

Safe in the builder

The notice stays visible while you edit, even if you dismissed it on the front end.

Keyboard friendly

The close button can be reached with the Tab key and closed with Enter or Space.

Z-index control

Set the stacking order for sticky and fixed notices so they sit above or below other parts of the page.

Background and borders

Set the background colour, padding, width, corner radius and borders.

Use cases

Where it works best

Any message a visitor should be able to close.

01

Promo bars

Show a discount code across the top of the page.

02

Cookie and privacy notices

Explain what the site stores, and remember when a visitor has read it.

03

Delivery updates

Warn shoppers about holiday cut-off dates.

04

Service alerts

Tell users about planned maintenance or a known issue.

05

Event reminders

Remind members about an upcoming class or webinar.

06

New feature news

Point returning visitors to something new, once.

Settings reference

Every control, explained

This is the full list of settings in the Breakdance editor, with their default values.

ControlWhat it doesDefault
Notification
PlacementNormal (in flow), Sticky Top, Sticky Bottom, Fixed Top or Fixed Bottom.Sticky Top
Offset From EdgeDistance from the top or bottom edge for sticky and fixed placements.0px
Z-IndexStacking order for sticky and fixed placements.100
Show Close ButtonShow the close button.On
Close IconThe icon used for the close button.X
Remember DismissalNo, For this browser session, For a number of days, or Forever.No
Number of DaysHow long to remember a dismissal when set to a number of days.30
Notification IDOptional unique ID so each notice is remembered on its own.—
Layout
LayoutDirection, alignment and gap for the content inside.—
Background
BackgroundBackground of the notice.#310467
Container
Width / Min HeightSize of the notice, per breakpoint.—
PaddingSpace inside the notice.16px 20px
BordersBorder, radius and shadow.—
Close Button
SizeWidth and height of the close button, 12 to 64.28
Icon Color / Background ColorColours of the close button.#FFFFFF
Offset From Right / Offset From TopPosition of the close button inside the notice.10px
BordersBorder and radius of the close button.—
Tips & FAQ

Good to know

Where is a dismissal stored?

In the visitor's browser. Session dismissals use session storage and end when the browser closes. Days and Forever use local storage. Nothing is sent to your server.

What is the Notification ID for?

Each notice is remembered by its ID. Give every notice a different ID so closing one does not hide another. If you change the ID, visitors who closed the old notice will see it again.

Why can I still see the notice in the builder?

Dismissals are ignored in the builder so you can always edit the notice.

What is the difference between sticky and fixed?

Sticky stays in the page flow and sticks to the edge of the screen while its parent is in view. Fixed sits over the page and is always on screen until it is closed.

Can I put a button or a form inside?

Yes. It is a container, so any Breakdance element can go inside.

Why is it called Dismissable Div in the editor?

That is the element's name in the Breakdance element panel. It is the same element.

Add Dismissible Div to your next page

Dismissible Div is included with Phox Elements, along with 140+ other premium elements for Breakdance.