Docs › Astro

Add a testimonial wall to Astro

Add a Vouchjar testimonial wall to an Astro site with two lines in any .astro file.

You’ll need a Vouchjar wall. It’s free for up to 5 testimonials: create one, then copy the embed code from step 3 of your dashboard. It already has your wall’s ID in place of your-wall.

In your page or component
<div data-vouchjar="your-wall"></div>
<script is:inline src="https://vouchjar.com/embed.js" async></script>
Only with View Transitions (in your layout)
<script is:inline>
  document.addEventListener('astro:page-load', () => window.Vouchjar?.scan());
</script>

Steps

  1. Open the .astro page or component where the wall belongs.
  2. Paste the code below. is:inline tells Astro to leave the external script alone.
  3. Using View Transitions? Add the second snippet once, in your layout, so walls mount after each navigation.

What you’ll get

This is the real widget running the demo wall. Yours shows the testimonials you approve.

Other platforms