{"id":13671044,"url":"https://github.com/sonybinhle/react-expand-animated","last_synced_at":"2025-04-27T14:33:03.069Z","repository":{"id":30176570,"uuid":"123445717","full_name":"sonybinhle/react-expand-animated","owner":"sonybinhle","description":"🌛Simple animated react expand component","archived":false,"fork":false,"pushed_at":"2022-12-10T20:33:13.000Z","size":1346,"stargazers_count":7,"open_issues_count":9,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-11T08:43:47.769Z","etag":null,"topics":["animation","collapse","expand","expandable","fade","height","react"],"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/sonybinhle.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":"2018-03-01T14:28:33.000Z","updated_at":"2024-02-19T05:38:43.000Z","dependencies_parsed_at":"2023-01-14T16:30:16.756Z","dependency_job_id":null,"html_url":"https://github.com/sonybinhle/react-expand-animated","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/sonybinhle%2Freact-expand-animated","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonybinhle%2Freact-expand-animated/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonybinhle%2Freact-expand-animated/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonybinhle%2Freact-expand-animated/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sonybinhle","download_url":"https://codeload.github.com/sonybinhle/react-expand-animated/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251154276,"owners_count":21544471,"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":["animation","collapse","expand","expandable","fade","height","react"],"created_at":"2024-08-02T09:00:56.792Z","updated_at":"2025-04-27T14:33:02.646Z","avatar_url":"https://github.com/sonybinhle.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\u003cstrong\u003eReact Expand\u003c/strong\u003e\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://david-dm.org/sonybinhle/react-expand-animated\"\u003e\n    \u003cimg src=\"https://david-dm.org/sonybinhle/react-expand-animated.svg\" alt=\"Dependency Status\" /\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://david-dm.org/sonybinhle/react-expand-animated#info=devDependencies\"\u003e\n    \u003cimg src=\"https://david-dm.org/sonybinhle/react-expand-animated/dev-status.svg\" alt=\"devDependency Status\" /\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://travis-ci.org/sonybinhle/react-expand-animated\"\u003e\n    \u003cimg src=\"https://travis-ci.org/sonybinhle/react-expand-animated.svg\" alt=\"Build Status\" /\u003e\n  \u003c/a\u003e\n  \n  \u003ca href='https://coveralls.io/github/sonybinhle/react-expand-animated?branch=master'\u003e\n    \u003cimg src='https://coveralls.io/repos/github/sonybinhle/react-expand-animated/badge.svg?branch=master' alt='Coverage Status' /\u003e\n   \u003c/a\u003e\n\n\u003c/div\u003e\n\n## react-expand-animated 1.0.2\n\nSimple expandable wrapper component with height, opacity animation. \n\n## Demo\n\n\u003ca href=\"https://codesandbox.io/s/107wq1klr4\"\u003e\n  \u003cimg alt=\"Edit 107wq1klr4\" src=\"https://codesandbox.io/static/img/play-codesandbox.svg\"\u003e\n\u003c/a\u003e\n\n## Install\n\n`npm i react-expand-animated`\n\n## Usage\n\n```jsx harmony\nimport React, { Component } from 'react';\nimport Expand from 'react-expand-animated';\n\nclass App extends Component {\n  state = { open: false };\n\n  toggle = () =\u003e {\n    this.setState(prevState =\u003e ({ open: !prevState.open }));\n  };\n\n  render() {\n    return (\n      \u003cFragment\u003e\n        \u003cbutton onClick={this.toggle}\u003eOpen\u003c/button\u003e\n        \u003cExpand open={this.state.open}\u003e\n          \u003cdiv style={{ width: '300px', height: '400px', color: 'red' }}\u003eHello\u003c/div\u003e\n        \u003c/Expand\u003e\n      \u003c/Fragment\u003e\n    );\n  }\n}\n\nexport default App;\n```\n## Props\n| Props  | Type | Required | Default | Description |\n| ------------- | ------------- |  ------------- |  ------------- |  ------------- |\n| **children**  | node  | true | undefined | The expanded or collapsed content |\n| **open**  | bool | false | false | When set to true expand the children component otherwise collapse it |\n| **duration**  | number | false | 400 | Animation duration in ms |\n| **easing**  | string | false | 'ease-in-out' | Css3 Animation's type |\n| **className**  | string | false | '' | Wrapper's className |\n| **tag**  | string | false | 'div' | Wrapper's tag |\n| **transitions**  | arrayOf(string) | false | ['height', 'opacity'] | Transition attributes |\n| **styles**  | shape({ open: object, close: object }) | false | {} | Additional inline-styles on open or close phase. For example: ``` styles={open: { marginTop: 100 }, close: { marginTop: 0 }} ``` |\n## Development\n\nDev: ```  npm run dev  ```\n\nBuild: ```  npm run build  ```\n\nTest: ```  npm test  ```\n\nTest Coverage: ```  npm run test:cov  ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonybinhle%2Freact-expand-animated","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsonybinhle%2Freact-expand-animated","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonybinhle%2Freact-expand-animated/lists"}