Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
react-swipeable-bottom-sheet
Advanced tools
A swipeable material's bottom sheet implementation, that uses react-swipeable-views. This can be used to reproduce Material Design's Bottom Sheet guidelines
npm i -S react-swipeable-bottom-sheet
import SwipeableBottomSheet from 'react-swipeable-bottom-sheet';
<SwipeableBottomSheet overflowHeight={64}>
<div style={{ height: '240px' }}>
Here goes the content of your bottom sheet
</div>
</SwipeableBottomSheet>
The bottom sheet's height (when open) scales automatically with its content. If it exceeds the window height, content become scrollable.
Name | Type | Default | Description |
---|---|---|---|
overflowHeight | number | 0 | The height (in px) of the sheet when closed. |
open | bool | Use this property to enable controlled mode. If true , it will open the sheet. | |
defaultOpen | bool | false | If true , the sheet is open at component mount. |
onChange | function(isOpen) | The callback that fires after sheet opens or closes. | |
onTransitionEnd | function() | The callback that fires after opening or closing animation. | |
fullScreen | bool | false | If true , the sheet takes the full height of the window when open. |
marginTop | number | 0 | The top margin applied to the top of the sheet when open. Use this prop to prevent navbar overflow. |
shadowTip | bool | true | If true , a box shadow is displayed at sheet bottom when closed. This is used to show that content is hidden below. |
topShadow | bool | true | If true , a box shadow is displayed at sheet top border. |
overlay | bool | true | If true , an overlay is displayed behind sheet when open. A click on the overlay closes the sheet. |
scrollTopAtClose | bool | true | If true , the content is scrolled to the top when sheet closes. |
swipeableViewsProps | object | {} | Props passed to SwipeableViews component (see documentation). |
style | object | {} | Style applied on the root (non-swiped) component. |
bodyStyle | object | {} | Style applied on the body of the bottom sheet. |
overlayStyle | object | {} | Style applied on the overlay. |
src
, lib
and the build process)NOTE: The source code for the component is in src
. A transpiled CommonJS version (generated with Babel) is available in lib
for use with node.js, browserify and webpack. A UMD bundle is also built to dist
, which can be included without the need for any build system.
To build the examples locally, run:
npm install
npm start
Then open localhost:8000
in a browser.
To build, watch and serve the examples (which will also watch the component source), run npm start
. If you just want to watch changes to src
and rebuild lib
, run npm run watch
(this is useful if you are working with npm link
).
MIT
FAQs
Swipeable Bottom Sheet
The npm package react-swipeable-bottom-sheet receives a total of 1,853 weekly downloads. As such, react-swipeable-bottom-sheet popularity was classified as popular.
We found that react-swipeable-bottom-sheet demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.