<div id="app"></div>
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  width: 100vw;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(#28a9dd, #0d4e77);
  font-family: "Share Tech Mono", monospace;
  font-size: 2rem;
}


ul {
  counter-reset: li;
  list-style: none outside none;
  
  li {
    margin: .5em;
    text-shadow: .02em .02em .005em rgba(255, 255, 255, .45);
    
    &::before {
      counter-increment: li;
      content: counter(li);
      padding: .5em;
      background: #000;
      border-radius: 50%;
      display: inline-flex;
      justify-content: center;
      align-items: center;
      line-height: 1;
      width: 32px;
      height: 32px;
      margin-right: 10px;
      color: #fff;
    }
  }
  
  a {
    text-decoration: none;
    color: #fff;
    
    &:hover {
      background: linear-gradient(to right, #f36, #90f);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;  
      transition: all .28s ease;
    }
  }
}
View Compiled
const data = [
  { id: 1, name: 'Dog', legCount: 4, isFriendly: true },
  { id: 2, name: 'Bird', legCount: 2 },
  { id: 3, name: 'Snake', legCount: 0, isFriendly: false },
  { id: 4, name: 'Centipede' }
]

const AnimalCmp = ({ name, url, legCount, friendliness, hasNotEnoughData }) => {
  return (
    <li>
      <a href={url}>{name}</a>:{legCount} legs
      {friendliness && `(${friendliness})`}
      {hasNotEnoughData && '(Not enough data!)'}
    </li>
  )
}

const Animals = ({items}) => {
  return (
    <ul>
      {
        items.map(item => <AnimalCmp
          name={item.name}
          url={`url/animal/${item.id}`}
          legCount={_.toString(item.legCount) || '?'}
          friendliness={{ true: 'Friendly', false: 'Unfriendly' }[item.isFriendly]}
          hasNotEnoughData={item.legCount === undefined && item.isFriendly === undefined}
        />)
      }
    </ul>
  )
}

ReactDOM.render(<Animals items={data} />, document.getElementById('app'))
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.15/lodash.min.js
  2. https://cdnjs.cloudflare.com/ajax/libs/react/16.9.0/umd/react.production.min.js
  3. https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.8.6/umd/react-dom.production.min.js