0.1.92 • Published 2 years ago
react-framer-bottom-sheet v0.1.92
react-framer-bottom-sheet
Installation
npm install react-framer-bottom-sheetor
yarn add react-framer-bottom-sheetUsage
import FramerBottomSheet from 'react-framer-bottom-sheet';
import { FramerBottomSheetRef } from 'react-framer-bottom-sheet/dist/sheetType';
function App() {
const sheetRef = useRef < FramerBottomSheetRef > null;
const buttonHandler = () => {
sheetRef.current?.snapTo('bottom');
};
return (
<div className="App">
<button onClick={buttonHandler}>to bottom</button>
<FramerBottomSheet
initialPosition="top"
ref={sheetRef}
style={{ backgroundColor: '#FAFAFA' }}
snapPoint={{ top: { height: 400 }, bottom: { height: 100 } }}
bottomScrollLock
headerElement={
<div style={{ height: 50, backgroundColor: 'red' }}>header</div>
}
footerElement={
<div style={{ height: 50, backgroundColor: 'green' }}>footer</div>
}
>
<div style={{ height: 500, backgroundColor: 'blue' }}>Content</div>
</FramerBottomSheet>
</div>
);
}
export default App;0.1.92
2 years ago
0.1.91
2 years ago
0.1.9
2 years ago
0.1.81
3 years ago
0.1.8
3 years ago
0.1.72
3 years ago
0.1.71
3 years ago
0.1.7
3 years ago
0.1.62
3 years ago
0.1.61
3 years ago
0.1.6
3 years ago
0.1.53
3 years ago
0.1.52
3 years ago
0.1.51
3 years ago
0.1.5
3 years ago
0.1.4
3 years ago
0.1.3
3 years ago
0.1.2
3 years ago
0.1.1
3 years ago
0.1.0
3 years ago