Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-simple-offcanvas

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-simple-offcanvas

A stand-alone react component for adding accessible easy-to-use bootstrap Tabs to your project.

  • 1.0.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
333
increased by18.93%
Maintainers
1
Weekly downloads
 
Created
Source

React Simple Offcanvas

React component for adding a hidden sidebars to your project. Simply this is a Bootstrap 5 Offcanvas component but without installing any dependencies.


NPM npm bundle size GitHub

screenshot

Install

npm
npm i react-simple-offcanvas
Yarn
yarn add react-simple-offcanvas

Usage

import React from 'react'
import { OffcanvasProvider, Trigger, Offcanvas } from 'react-simple-offcanvas'

export default function App() {
  return (
    <OffcanvasProvider { /* Provider props */ }>
      <Trigger { /* Trigger props */ } />
      <Offcanvas { /* Offcanvas props */ } />
    </OffcanvasProvider>
  )
}

1. Provider Props

PropTypeOptionsDescriptionDefault
onOpenFunctionOptionalCallback function that is triggered when the Offcanvas is opened-
onCloseFunctionOptionalCallback function that is triggered when the Offcanvas is closed-

2. Trigger Props

PropTypeOptionsDescriptionDefault
componentStringOptionalRender Component button | divbutton
classNameStringOptionalCSS className applied to the Trigger Blockoffcanvas-trigger
stylesCSSPropertiesOptionalInline style{}
childrenReactNodeOptionalComponent children-

3. Offcanvas Props

PropTypeOptionsDescriptionDefault
titleStringOptionalOffcanvas Title (h5 Tag)Offcanvas Title
positionStringOptionalleft | right | top | bottomright
backdropbooleanOptionalApply a backdrop on body while offcanvas is opentrue
allowClickAwaybooleanOptionalCloses the offcanvas when user click outsidetrue
allowEscbooleanOptionalCloses the offcanvas when escape key is pressedtrue
allowScrollbooleanOptionalAllow body scrolling while offcanvas is opentrue
classNameStringOptionalCSS className applied to the Offcanvas Blocksimple-offcanvas
stylesCSSPropertiesOptionalInline style{}
childrenReactNodeOptionalComponent ChildrenSome text as placeholder


Edit react-simple-offcanvas

License

MIT © awran5

Keywords

FAQs

Package last updated on 31 Jul 2021

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc