Sai Sarath Madugula

Learning Elements

Most learning platforms let you paste HTML. These three tags turn that box into a flip card, a quiz with feedback on every option, or a reveal, with keyboard support and no build step. Add one script, then write HTML.

Proves: reusable interaction patterns, accessibility by default, a plugin that fits any LMS.

Install

Put this line once on the page. Then use the tags anywhere below it.

<script src="https://www.saisarathmadugula.com/lab/lx-elements.js" defer></script>
Download the file

Flip card

<lx-flip front="Character" back="Someone the learner can care about."></lx-flip>

Quiz with teaching feedback

“Today we will learn about evaporation.” “Why did Amma’s puddle disappear by noon?” “Open your books to page 42.”
<lx-quiz question="Which opening is a hook?">
  <lx-option feedback="That is the objective.">“Today we will learn about evaporation.”</lx-option>
  <lx-option correct feedback="Yes. A question with a person in it.">“Why did Amma’s puddle disappear by noon?”</lx-option>
  <lx-option feedback="That is an instruction.">“Open your books to page 42.”</lx-option>
</lx-quiz>

Reveal

Because a definition answers a question nobody has asked yet. Ask first, define second. Under a minute. If it needs more, it is a lesson, not a hook.
<lx-reveal label="Why not start with the definition?">
  Because a definition answers a question nobody has asked yet.
</lx-reveal>

Match your colours

Set four custom properties on the page and every element follows.

lx-flip, lx-quiz, lx-reveal {
  --lx-bg: #ffffff; --lx-ink: #1a1a1a;
  --lx-accent: #0a7a4a; --lx-accent-ink: #ffffff;
}

Each element also fires an event (lx-flip, lx-answer) so an LMS can record what the learner did.