This web component sample, src/components/filmCard
, displays Star Wars opening crawls (those letters present on every movie of the franchise) everytime the user clicks on a specific button. The element keeps the state of the component, knowing if the display is opened or closed applying the matching CSS for each situation.
The Star Wars data is collected from the SWAPI (Star Wars API).
Firstable, install the dependencies running:
$ npm install
To run locally, type:
$ npm run start:dev
To generate build files:
$ npm run build