Git Product home page Git Product logo

flix-carousel's Introduction

Flix Carousel

Flix Carousel is a pure-CSS animated carousel modeled after Netflix's browse screen! It's less than 100 lines of source code and can be imported by CDN or by downloading this repository.

See Flix Carousel in action.

Flix Carousel Example

<div class="carousel">
    <div class="carousel-row">
          <div class="carousel-tile" style="background: #46B1C9;"></div>
          <div class="carousel-tile" style="background: #84C0C6;"></div>
          <div class="carousel-tile" style="background: #9FB7B9;"></div>
          <div class="carousel-tile" style="background: #BCC1BA;"></div>
          <div class="carousel-tile" style="background: #F2E2D2;"></div>
    </div>
</div>

Getting Started

Installing

To install via CDN, add this to the bottom of your <head> tag. Hosted by RawGit.

<link href="https://cdn.rawgit.com/anthonykrivonos/flix-carousel/65556d56/src/carousel.css" rel="stylesheet">

To install manually, download this repository, add the contents to the root of your project, and link the source CSS at the bottom of your <head> tag.

<link href="src/carousel.css" rel="stylesheet">

End with an example of getting some data out of the system or using it for a little demo

Overwriting Default Styling

Add the following to another CSS file linked to your project, or in a <style> tag within your HTML file.

Changing Tile Spacing/Height/Width

:root {
    --carousel-tile-spacing: ---px !important;
    --carousel-tile-height:  ---px !important;
    --carousel-tile-width:   ---px !important;
}

Changing Growth Factor

The growth factor is the rate at which a tile grows when hovered over.

<1: Shrink

1 : Normal

>1: Grow

:root {
    --carousel-growth-factor: --- !important;
}

Changing Fade Opacity

The fade opacity is the opacity of tiles that are not currently hovered, while another tile is currently hovered (value out of 1).

:root {
    --carousel-fade-opacity: --- !important;
}

Changing Transition Speed

X: 1 for 1s transition

2 for 0.5s transition

3 for 0.3s transition

.carousel-tile {
      transition: var(--carousel-transition-X) !important;
}
.carousel-row {
      transition: var(--carousel-transition-X) !important;
}

Inspired By

Authors

  • Anthony Krivonos - Initial work - Portfolio

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

  • Josh Hunt
  • Vicki Shao for all the support and flames! ๐Ÿ”ฅ

flix-carousel's People

Contributors

anthonykrivonos avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.