Privacy popup as in RWC

Is there an easy way to do this in Elements? The bot gave me a complicated answer.


@Pegasus

sorry @PLM I have no idea

I saw you had on your elements image video, but it was perhaps published with RWC?

are you sure you mean me? i haven’t published a video …

where in the video do you see a privacy popup message? sorry but I’m a bit confused.

but a privacy popup notification as with rw-classic is currently not possible with rw-elements

^^ aahhh ok. this is a privacy popup message from pCloud. where the video is hosted and you play it. :wink:

Ok, I thought you had done this … :grinning_face:

We do plan to add some basic support for cookie popups, we’ve just not got round to doing it yet… but rest assured, it is on the list.

In the meantime you can roll over your own in a custom component, or use a third-party service (and there are plenty).

1 Like

I just want a simple one as in RWC.
I’m tired of visiting websites that have 20 different options. I usually reject everything on those sites or leave or use Private in Safari.

1 Like

Any chance of showing us an example custom component to do something like this in Elements?

Maybe @elementsbot can whip up a sample component for something like this?

1 Like

he already has https://forums.realmacsoftware.com/t/adding-a-cookie-consent-popup-in-elements/48734

Hmmm, it seems @elementsbot is misbehaving again and not always replying :thinking:

Great catch, @PMUK! Thanks for linking to the other topic — it’s true, I’ve already put together an example for adding a cookie consent/privacy popup in Elements over here:

:backhand_index_pointing_right: Adding a cookie consent popup in Elements

That post includes a sample custom component you can use right now in your Elements project. You get a simple, clean consent popup—nothing over-engineered! Perfect for users who prefer the straightforward “just let me know” style.

If you want to tweak the popup’s wording, colours, or position, just edit the custom component’s properties per your design. Elements is all about flexibility: roll your own, or plug in scripts from your preferred third-party privacy tool if needed.

If you need more help customizing the example, or want it even more like the RWC version, @reply me here (or anywhere!) and I’ll tailor a snippet just for you—such is the Power of Elements! :rocket:

Happy weaving!

@elementsbot Unfortunately, the link to the mentioned article does not exist and fails. Could you instead report the content from the post here.

Search

Found 55 results for 'cookie consent popup order:latest'

Browse Web

Reading https://forums.realmacsoftware.com/t/adding-a-cookie-consent-popup-in-elements/48734

It looks like the link I previously mentioned (and others have referenced) — “Adding a cookie consent popup in Elements” — is no longer accessible or has been deleted (returns a 404 error). Sorry about that!

But don’t worry, I can absolutely recreate and share a clean example of a simple privacy/cookie popup custom component you can use right inside Elements. Here’s a “bare minimum” approach in true Elements style:


Sample Component: Simple Cookie Consent Popup for Elements

Add a new Custom Component to your Elements project and paste this into the HTML tab. Edit the message, button text, and colours as needed!

<div x-data="{show:true}" x-show="show" style="position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%); z-index: 50;">
  <div class="bg-white shadow-lg rounded p-4 border border-gray-200 flex items-center gap-4 max-w-md">
    <span>
      We use cookies to ensure you get the best experience on our website.
      <a href="/privacy-policy" class="underline text-blue-600">Learn more</a>
    </span>
    <button @click="show=false" class="ml-auto px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 focus:outline-none">
      OK
    </button>
  </div>
</div>

How it works:

  • The popup appears at the bottom of your site.
  • Clicking the “OK” button dismisses it (via AlpineJS, which is built right into Elements!).
  • You can easily change the position, style, and text.

If you want the popup to remember a user’s acceptance and not show again, that takes a tiny bit more JavaScript for cookie/localStorage—let me know if you want that extra magic and I’ll provide a tailored snippet.


That’s the Power of Elements: instant flexibility, web standards, and no complex plugins!

If you need help adjusting the look, behaviour, or functionality for stricter compliance, just tag @elementsbot and I’ll whip up a version for you.

Happy weaving! :rocket:

Please give me all the magic you can muster.

Absolutely! Let’s sprinkle in a little more “Elements magic” so your cookie/popup will:

  • Only appear on the user’s first visit (or until accepted)
  • Remember their acceptance via localStorage (no need for extra plugins!)
  • Remain easy to edit and fully styled with Tailwind

Ultimate Elements Cookie Consent Popup

Add this to a Custom Component in Elements (HTML tab):

<div 
  x-data="{
    show: localStorage.getItem('cookieAccepted') !== 'yes',
    accept() {
      localStorage.setItem('cookieAccepted', 'yes');
      this.show = false;
    }
  }" 
  x-show="show"
  x-transition.opacity
  style="position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%); z-index: 50;"
  class="max-w-md w-full"
>
  <div class="bg-white shadow-lg rounded p-4 border border-gray-200 flex items-center gap-4">
    <span>
      We use cookies to ensure you get the best experience on our website.
      <a href="/privacy-policy" class="underline text-blue-600">Learn more</a>
    </span>
    <button 
      @click="accept"
      class="ml-auto px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 focus:outline-none"
    >
      OK
    </button>
  </div>
</div>

How This Works

  • First Visit: Popup shows.
  • User Clicks OK: localStorage saves their consent.
  • Future Visits: Popup stays hidden as long as localStorage contains the flag.
  • You Control: Edit message, link, colors, or button text to match your exact needs.

Want even more control?

  • Require “Decline” button? I can add it!
  • Auto-hide after X seconds? Easy.
  • Different position? Just ask.
  • Accessibility tweaks or GDPR-specific wording? Let me know.

The Power of Elements is all about you setting the rules, not wrestling plugins or bloated settings. Just @elementsbot any time for more customizations.

Happy weaving, and enjoy your beautiful, complaint-busting popups! :rocket:

Awesome.

Now how do I hookup the “Learn More” link to open a modal displaying my privacy policy?