react-sticky-sidebar
TypeScript icon, indicating that this package has built-in type declarations

0.0.8 • Public • Published

react-sticky-sidebar

A React implementation of sticky-sidebar

Made with create-react-library

NPM JavaScript Style Guide

Install

npm install --save react-sticky-sidebar

Usage

import React, { Component } from 'react'

import StickySidebar from 'react-sticky-sidebar'
import 'react-sticky-sidebar/dist/index.css'

const Example = () => {
  const renderSidebarContent = () => (<>{/* aside container content */}</>)

  const renderContent = () => (<>{/* main container content */}</>)
  
  return (
    <div className="my-page">
      <StickySidebar
        topSpacing={96}
        sidebarContent={renderSidebarContent}
        content={renderContent}
      />
    </>
  )
}

License

MIT © tchesa

Readme

Keywords

none

Package Sidebar

Install

npm i react-sticky-sidebar

Weekly Downloads

5

Version

0.0.8

License

MIT

Unpacked Size

135 kB

Total Files

9

Last publish

Collaborators

  • tchesa