{"id":13400983,"url":"https://github.com/eiriklv/react-masonry-mixin","last_synced_at":"2025-04-09T18:16:53.298Z","repository":{"id":22573395,"uuid":"25914871","full_name":"eiriklv/react-masonry-mixin","owner":"eiriklv","description":"A React.js mixin for using @desandro's Masonry","archived":false,"fork":false,"pushed_at":"2016-10-03T09:47:05.000Z","size":34,"stargazers_count":175,"open_issues_count":4,"forks_count":37,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-09T18:16:48.138Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/eiriklv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-29T10:06:36.000Z","updated_at":"2024-04-02T20:25:03.000Z","dependencies_parsed_at":"2022-08-21T08:00:39.227Z","dependency_job_id":null,"html_url":"https://github.com/eiriklv/react-masonry-mixin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eiriklv%2Freact-masonry-mixin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eiriklv%2Freact-masonry-mixin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eiriklv%2Freact-masonry-mixin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eiriklv%2Freact-masonry-mixin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eiriklv","download_url":"https://codeload.github.com/eiriklv/react-masonry-mixin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248085323,"owners_count":21045139,"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":[],"created_at":"2024-07-30T19:00:57.618Z","updated_at":"2025-04-09T18:16:53.271Z","avatar_url":"https://github.com/eiriklv.png","language":"JavaScript","funding_links":[],"categories":["Uncategorized","React [🔝](#readme)","Awesome React","UI Layout","Soluções"],"sub_categories":["Uncategorized","Tools","Form Components"],"readme":"React Masonry Mixin\n===================\n\n[![npm version](https://badge.fury.io/js/react-masonry-mixin.svg)](http://badge.fury.io/js/react-masonry-mixin)\n\n#### Introduction:\nA React.js Masonry mixin. (Also available as a [component](https://github.com/eiriklv/react-masonry-component) - you should use that instead!)\n\n#### Live demo:\n[hearsay.me (web)](http://www.hearsay.me)\n[hearsay.me (github)](https://github.com/eiriklv/hearsay-frontend)\n\n#### Usage:\n\n* The mixin is now bundled with Masonry, so no additional dependencies needed!\n* ~~You will have to use Masonry as a script dependency, as there is no complete npm module available at the moment.~~\n* You can optionally include Masonry as a script tag\n`\u003cscript src='//cdnjs.cloudflare.com/ajax/libs/masonry/3.1.5/masonry.pkgd.min.js' /\u003e`\n\n* To use the mixin\n * require the mixin and inject `React`\n * pass a reference and a masonry options object\n * make sure you use the same reference as `ref` in your component\n * if you need to - access the masonry object through `this.masonry` in your component\n\n* example code\n\n```js \nvar React = require('react');\nvar MasonryMixin = require('react-masonry-mixin')(React);\n \nvar masonryOptions = {\n    transitionDuration: 0\n};\n \nvar SomeComponent = React.createClass({\n\n    mixins: [MasonryMixin(React)('masonryContainer', masonryOptions)],\n \n    render: function () {\n        var childElements = this.props.elements.map(function(element){\n           return (\n                \u003cdiv className=\"someclass\"\u003e\n                    {element.name}\n                \u003c/div\u003e\n            );\n        });\n        \n        return (\n            \u003cdiv ref=\"masonryContainer\"\u003e\n                {childElements}\n            \u003c/div\u003e\n        );\n    }\n});\n\nmodule.exports = SomeComponent;\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feiriklv%2Freact-masonry-mixin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feiriklv%2Freact-masonry-mixin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feiriklv%2Freact-masonry-mixin/lists"}