react-sticky-sidebar
A React implementation of sticky-sidebar
Made with create-react-library
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