Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.





                $movieContentBg: #ddd

  opacity: 1
  transform: scale(1)
=scaleDown($delay: 0)
  transform: scale(0)
  opacity: 0
  transition: transform .24s ease-in $delay, opacity .3s linear
  margin: 0
  padding: 0
  box-sizing: border-box

  text-decoration: none

  display: flex
  flex-wrap: wrap
  margin: 0 auto
  width: 95%
  padding-top: 30px
  justify-content: space-around
  color: #ddd
  margin: 5px
  padding: 20px 5px 10px
  display: flex
  flex-direction: column
  justify-content: space-between
  background-blend-mode: color
  max-width: 270px
  height: 400.1px
  box-shadow: 10px 10px 10px #111
  transition: background-color .25s linear
  text-align: center
  font-family: 'Roboto', sans-serif
  background-size: cover
    background-color: rgba(0,0,0,.8)
    .movie__infos div,
  text-transform: uppercase
  max-height: 200px
  display: grid
  grid-gap: 10px 0
  grid-template-columns: repeat(2,1fr)
  align-items: center  
  display: block
  margin-bottom: 4px
  font-weight: bold
  font-size: 1.1em

  font-size: .9em
  display: flex
  justify-content: space-between
  align-items: center
  justify-self: flex-end
  padding: 0 10px
  width: 9px
  font-size: 1.2em
  display: inline-block
  overflow: hidden
    color: yellow 
  width: 60px
  height: 30px
  border-radius: 5px
  background-color: #EBBA33
  display: flex
  justify-content: center
  align-items: center
  color: #000
  font-family: 'Oswald', sans-serif
  font-size: 1.1em
  font-weight: bold
  cursor: pointer


                const Rating = ({rating}) => {
  let stars = [];
  for (let i = 1; i < 11; i++) {
    let klass = "fa fa-star";
    if (rating >= i && rating !== null) {
      klass = "fa fa-star checked";
        style={{ direction: (i%2===0) ? "rtl" : "ltr"}}
  return (
    <div className="movie__rating">

const MovieInfo = ({name,value}) => (
  <div className={`movie__${name}`}>
    <span className='info__head'>
      {name.replace(/\b\w/g, l => l.toUpperCase())}

const Movie = ({infos}) => {
  const cast = => (
    <p key={actor}>{actor}</p>
    <div className='movie' style={{backgroundImage: `url(${infos.poster})`}}>
      <h2 className='movie__title'>{infos.title}</h2>
      <span className='movie__description'>{infos.description}</span>
      <div className='movie__infos'>
        <MovieInfo name='duration' value={infos.duration} />
        <MovieInfo name='director' value={infos.director} />
        <MovieInfo name='year' value={infos.year} />
        <MovieInfo name='cast' value={cast} />
      <div className='movie__imdb'>
        <Rating rating={Math.round(infos.rating)}/>
        <a href={infos.imdbLink} className='movie__imdb-button' target='blank'> IMDb </a>

class App extends React.Component {
  render() {
    const moviesList =,i)=> (
      <Movie key={i} infos={movie}/>
    return (
      <div className='movies__container'>

const infos = [
    title: 'Thor',
    description: 'The powerful, but arrogant god Thor, is cast out of Asgard to live amongst humans in Midgard (Earth), where he soon becomes one of their finest defenders.',
    duration: '124',
    year: '2011',
    director: 'Kenneth Branagh',
    cast: ['Chris Hemsworth','Anthony Hopkins','Natalie Portman'],
    rating: 8.7,
    imdbLink: '',
    poster:  ''
    title: 'The Shawshank Redemption',
    description: 'Two imprisoned men bond over a number of years, finding solace and eventual redemption through acts of common decency.',
    duration: '142',
    year: '1994',
    director: 'Frank Darabont',
    cast: ['Tim Robbins', 'Morgan Freeman', 'Bob Gunton'],
    rating: 9.3,
    imdbLink: '',
    poster: ""
    title: 'The Silence of the Lambs',
    description: 'A young F.B.I. cadet must receive the help of an incarcerated and manipulative cannibal killer to help catch another serial killer, a madman who skins his victims.',
    duration: '118',
    year: '1991',
    director: 'Jonathan Demme',
    cast: ['Jodie Foster', 'Anthony Hopkins', 'Lawrence A. Bonney'],
    rating: 8.6,
    imdbLink: '',
    poster: ",0,677,1000_AL_.jpg"
    title: 'Spirited Away',
    description: "During her family's move to the suburbs, a sullen 10-year-old girl wanders into a world ruled by gods, witches, and spirits, and where humans are changed into beasts.",
    duration: '125',
    year: '2001',
    director: 'Hayao Miyazaki',
    cast: ['Daveigh Chase', 'Suzanne Pleshette', 'Miyu Irino'],
    rating: 8.6,
    imdbLink: '',
    poster: ",0,675,1000_AL_.jpg"
    title: 'Starship Troopers',
    description: "Humans in a fascistic, militaristic future do battle with giant alien bugs in a fight for survival.",
    duration: '129',
    year: '1997',
    director: 'Paul Verhoeven',
    cast: ['Casper Van Dien', 'Denise Richards', 'Dina Meyer'],
    rating: 7.2,
    imdbLink: '',
    poster: ",0,732,1000_AL_.jpg"
ReactDOM.render(<App infos={infos}/>, document.getElementById('app'));