Home Work
SaaS developmentAI developmentAPI developmentMobile app developmentGoogle Ads managementHeadless ShopifyLaravel developmentNext.js developmentReact developmentTypeScript engineeringUI/UX designSEO & AEOEcommerce development
AI solutionsB2B platformsE-commerceHospitalityLead generationLogisticsEducationProcess automationSaaS platformsStartup MVPReal estateHealthcare
LegalHealthcareReal estateFinanceHospitality
The HagueRotterdamAmsterdamUtrechtEindhovenAlmereBredaArnhemNijmegenTilburgEnschedeGroningenLeidenDelftZoetermeerDen Bosch
Studio
AboutProcessLabBlogContact

Inline meldingen (info, succes, let op, fout) New

Four inline alerts with icon, word label and text, so meaning never relies on colour alone. Each is dismissible (smooth collapse via grid rows, focus moves on sensibly) and has an action button with loading and end state; the error turns into a success after "Try again". role="alert" for errors, role="status" for the rest, plus an empty state. A container query moves the action below the text in narrow columns.

Info: van do 24 dec t/m vr 1 jan is de praktijk gesloten.

Openingstijden

Gelukt: je afspraak staat op wo 14 okt om 09:30.

Let op: je iDEAL-betaling van € 64,95 staat nog open.

Geen meldingen meer.

How to use it

  1. Paste the HTML where the components should appear.
  2. Add the CSS to your stylesheet. All classes are prefixed, so nothing clashes with your own styles.
  3. Add the JavaScript and call init() with the element that contains the HTML.
<!-- Inline meldingen (info, succes, let op, fout) · NedDev · eigen werk. -->
<div class="jouw-container">
<div class="als" role="region" aria-label="Meldingen">
  <div class="als__a als__a--info" role="status"><div class="als__in">
    <svg class="als__i" viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="9"/><path d="M12 11v5M12 8h.01"/></svg>
    <p class="als__p"><strong>Info:</strong> van do 24 dec t/m vr 1 jan is de praktijk gesloten.</p>
    <a class="als__act" href="#openingstijden">Openingstijden</a>
    <button class="als__x" type="button" aria-label="Sluit melding: praktijk gesloten"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M6 6l12 12M18 6 6 18"/></svg></button></div></div>
  <div class="als__a als__a--ok" role="status"><div class="als__in">
    <svg class="als__i" viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="9"/><path d="m8 12 3 3 5-6"/></svg>
    <p class="als__p"><strong>Gelukt:</strong> je afspraak staat op wo 14 okt om 09:30.</p>
    <button class="als__act" type="button" data-busy="Toevoegen" data-done="In agenda gezet">Zet in agenda</button>
    <button class="als__x" type="button" aria-label="Sluit melding: afspraak bevestigd"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M6 6l12 12M18 6 6 18"/></svg></button></div></div>
  <div class="als__a als__a--warn" role="status"><div class="als__in">
    <svg class="als__i" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 3.5 2.5 20h19z"/><path d="M12 10v4M12 17h.01"/></svg>
    <p class="als__p"><strong>Let op:</strong> je iDEAL-betaling van € 64,95 staat nog open.</p>
    <button class="als__act" type="button" data-busy="Openen" data-done="Naar je bank">Nu betalen</button>
    <button class="als__x" type="button" aria-label="Sluit melding: betaling open"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M6 6l12 12M18 6 6 18"/></svg></button></div></div>
  <div class="als__a als__a--err" role="alert"><div class="als__in">
    <svg class="als__i" viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="9"/><path d="M9 9l6 6M15 9l-6 6"/></svg>
    <p class="als__p"><strong>Fout:</strong> we konden postcode 3481 AB niet controleren.</p>
    <button class="als__act als__retry" type="button">Opnieuw proberen</button>
    <button class="als__x" type="button" aria-label="Sluit melding: adrescontrole mislukt"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M6 6l12 12M18 6 6 18"/></svg></button></div></div>
  <div class="als__empty"><p>Geen meldingen meer.</p><button class="als__reset" type="button">Toon de voorbeelden opnieuw</button></div>
</div>
</div>

More components

Seen something you like?

Add it to your selection and send it over. We build your site around it, in your brand.

Get in touch →