Couillard is a small trebuchet, you aim, and launch at your users.

Usage no npm install needed!

<script type="module">
  import couillard from '';



Couillard is a small trebuchet you aim and launch at your users. It's a lean A/B testing tool to validate hypotheses and determine what to build.

More About Lean A/B Testing


yarn add couillard


// Your metrics store, can be Segment, Amplitude, SQL, mongo, or whatever you like.
const saveMetrics = metrics =>
  fetch('...', {
    method: 'POST',
    body: JSON.stringify(metrics)

// Create variation A component.
const WelcomeA = props => (
    Welcome I'm experiment A, {},
    <button onClick={hit('welcome', saveMetrics)}>Click Me</button>

// Create variation B component.
const WelcomeB = props => (
    Welcome I'm experiment B, {},
    <button onClick={hit('welcome', saveMetrics)}>Click Me</button>

// Aim your experiment at your users.
const Welcome = aim('welcome', 50, saveMetrics, {
  A: WelcomeA,
  B: WelcomeB

// Only WelcomeA or WelcomeB will render.
const Home = () => {
  launch('welcome', saveMetrics)

  return (
    <div class={style.home}>
      <Welcome name="Jannette" />

export Home