React Collapse Component
npm install @idui/react-collapse




- Docs
- Playground
``bash`
npm install --save @idui/react-collapse
`bash`
yarn add @idui/react-collapse
`jsx
import React from 'react'
import Collapse from '@idui/react-collapse'
function Example() {
return
}
`
`jsx
import React, { Fragment } from 'react'
import Collapse from '@idui/react-collapse'
function Example() {
return
{({ open, close, toggle }) => (
)}
}
`
`jsx
import React from 'react'
import Collapse from '@idui/react-collapse'
function Example() {
return
{({ close }) => (
)}
}
`
`jsx
import React from 'react'
import styled from 'styled-components';
import Collapse from '@idui/react-collapse'
const Header = styled(Collapse.Header)
padding: 10px;
line-height: 20px;
cursor: pointer;
box-shadow: rgba(0, 0, 0, 0.35) 0 5px 15px;
width: 100%;;
const Body = styled(Collapse.Body)
box-shadow: rgba(0, 0, 0, 0.35) 0 5px 15px;
padding: 20px;
border-bottom-right-radius: 10px;
border-bottom-left-radius: 10px;
width: 100%;;
const Content = styled.div
height: 200px;
display: flex;
align-items: center;
justify-content: center;;
function Example() {
return
}
`
`jsx
import React from 'react'
import Collapse from '@idui/react-collapse'
function Example() {
return
opacity: 0,
},
open: {
opacity: 1
},
transition: {
open: {duration: 0.2, ease: [0.3, 0.6, 0.3, 0.2]},
close: {duration: 0.1, ease: [0.3, 0.6, 0.3, 0.2]},
},
}}>
:)
}
``
MIT © kaprisa57@gmail.com