{"id":27918796,"url":"https://github.com/addyosmani/react-flow","last_synced_at":"2025-05-06T18:25:40.463Z","repository":{"id":286393652,"uuid":"961275994","full_name":"addyosmani/react-flow","owner":"addyosmani","description":"A React Coverflow component using Scroll-driven Animations","archived":false,"fork":false,"pushed_at":"2025-04-06T22:09:27.000Z","size":61,"stargazers_count":21,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-26T10:12:16.504Z","etag":null,"topics":["coverflow","coverflowview"],"latest_commit_sha":null,"homepage":"https://react-flow.addy.ie","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/addyosmani.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-04-06T06:41:23.000Z","updated_at":"2025-04-22T00:18:08.000Z","dependencies_parsed_at":"2025-04-06T07:31:45.896Z","dependency_job_id":"ebf074d3-d2d3-4d20-9a23-47da5f527c53","html_url":"https://github.com/addyosmani/react-flow","commit_stats":null,"previous_names":["addyosmani/react-flow"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/addyosmani%2Freact-flow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/addyosmani%2Freact-flow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/addyosmani%2Freact-flow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/addyosmani%2Freact-flow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/addyosmani","download_url":"https://codeload.github.com/addyosmani/react-flow/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252742745,"owners_count":21797305,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["coverflow","coverflowview"],"created_at":"2025-05-06T18:25:39.883Z","updated_at":"2025-05-06T18:25:40.456Z","avatar_url":"https://github.com/addyosmani.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Flow\n\nThis project is a React application built with Vite, demonstrating a Coverflow component. It uses the CSS scroll-driven animation effect to create a visually appealing coverflow effect for displaying album covers. It supports prefetching images using Fetch Priority.\n\n![](https://res.cloudinary.com/ddxwdqwkr/image/upload/v1743977334/addy/Screenshot_2025-04-06_at_3.07.07_PM.webp)\n\n\n## Setup\n\n1.  Clone the repository:\n    ```bash\n    git clone https://github.com/addyosmani/react-flow.git\n    cd react-flow\n    ```\n2.  Install dependencies:\n    ```bash\n    npm install\n    ```\n\n## Available Scripts\n\nIn the project directory, you can run:\n\n### `npm run dev`\n\nRuns the app in development mode using Vite.\nOpen [http://localhost:5173](http://localhost:5173) (or the port shown in the terminal) to view it in the browser.\n\nThe page will reload if you make edits.\nYou will also see any lint errors in the console.\n\n### `npm run build`\n\nBuilds the app for production to the `dist` folder.\nIt correctly bundles React in production mode and optimizes the build for the best performance.\n\n### `npm run lint`\n\nRuns the ESLint linter to check for code style issues.\n\n### `npm run preview`\n\nServes the production build locally to preview it.\n\n## Using the Coverflow Component\n\nThe core of this project is the `Coverflow` component located in `src/Coverflow.jsx`.\n\n### Basic Usage\n\nImport the component and render it in your application:\n\n```jsx\nimport React from 'react';\nimport Coverflow from './Coverflow'; // Adjust the import path as needed\nimport './App.css'; // Or your main CSS file\n\nfunction App() {\n  return (\n    \u003cdiv className=\"App\"\u003e\n      \u003ch1\u003eReact Coverflow Demo\u003c/h1\u003e\n      \u003cCoverflow /\u003e\n    \u003c/div\u003e\n  );\n}\n\nexport default App;\n```\n\n### Configuration\n\nThe `Coverflow` component accepts the following props:\n\n*   **`dataUrl`** (string, optional): The URL to fetch the album data from.\n    *   Defaults to `/albums.json`.\n    *   The component expects the data to be a JSON array of objects. Each object should have at least an `image_url` property (for the image source) and preferably `title` and `artists` properties (used for the image `alt` text). A unique `key` (like `position` in the default data) is also recommended for React list rendering.\n\n    Example structure:\n    ```json\n    [\n      {\n        \"position\": 1,\n        \"title\": \"Album Title\",\n        \"artists\": \"Artist Name\",\n        \"image_url\": \"https://example.com/image.jpg\"\n      },\n    ]\n    ```\n\n    To use a different data source, provide the URL via the prop:\n\n    ```jsx\n    \u003cCoverflow dataUrl=\"/path/to/your/custom-data.json\" /\u003e\n    ```\n\n    Or fetch from an external API:\n\n    ```jsx\n    \u003cCoverflow dataUrl=\"https://api.example.com/albums\" /\u003e\n    ```\n\n### Styling\n\nThe component relies on CSS for the coverflow effect. Basic styles are included in `src/styles.css`. You may need to adjust or extend these styles depending on your application's layout and design. The scroll-driven animation logic is in `public/scroll-timeline.js`, which is loaded by `index.html`.\n\n## Acknowledgements\n\nThe CSS scroll-driven animation effect is based on the original demo by Bramus Van Damme:\n[https://scroll-driven-animations.style/demos/cover-flow/css/](https://scroll-driven-animations.style/demos/cover-flow/css/)\n\n## License\n\nThis project is licensed under the terms of the [MIT License](LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faddyosmani%2Freact-flow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faddyosmani%2Freact-flow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faddyosmani%2Freact-flow/lists"}