Socket
Socket
Sign inDemoInstall

react-bottom-sheet

Package Overview
Dependencies
53
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-bottom-sheet

React Bottom Sheet


Version published
Maintainers
1
Created

Readme

Source

react-bottom-sheet

Installation

$ npm install react-bottom-sheet --save

Demos

Example

import React from 'react';
import BottomSheet from 'react-bottom-sheet';

export default class Test extends React.Component {

  componentWillMount() {
    this.setState({
      showSheet: false,
    });
  }

  render() {
    return (
      <BottomSheet open={this.state.showSheet} onRequestClose={() => this.setState({ showSheet: false })}>
        <div>
          <h1>Bottom sheet modal content</h1>
          <ul>
            <li>Animates from bottom to top</li>
            <li>If the content height is more than the height of the device it will be scrollable.</li>
            <li>Clicking on the grey area will close the modal</li>
          </ul>
        </div>
      </BottomSheet>
    );  
  }
} 
PropertyTypeDefaultDescription
classNamestringBottom sheet content className.
openboolfalseIf set to true the bottom sheet will open.
onRequestClose*funcThis method will be called when an action is made to close this bottom sheet.

For example clicking on the overlay.
zIndexnumbercss z-index value for the bottom sheet
maxHeightstring'100vh'css max-height value for the bottom sheet.

Numbers are not allowed, you have to pass 10px as a string instead
minHeightstringcss min-height value for the bottom sheet.

Numbers are not allowed, you have to pass 10px as a string instead
bottomSheetHeaderelementIf passed this element will render above the content.
bottomSheetFooterelementIf passed this element will render under the content.

Contributing

To contribute, follow these steps:

  • Fork this repo.
  • Clone your fork.
  • Run npm install
  • Run npm start
  • Goto localhost:3000
  • Add your patch then push to your fork and submit a pull request

License

MIT

Keywords

FAQs

Last updated on 03 Aug 2017

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc