1.0.0 • Published 3 years ago

@xper/react-sticky-headers v1.0.0

Weekly downloads
49
License
MIT
Repository
github
Last release
3 years ago

React Sticky Headers

Pixel-perfect stackable sticky headers for React!

npm.io

Install

# With yarn:
yarn install @xper/react-sticky-headers

# With npm:
npm install @xper/react-sticky-headers

Usage

import Sticky, { StickyHost } from '@xper/react-sticky-headers';
// Import the default styles (optional).
import '@xper/react-sticky-headers/dist/style.css';

export default function MyApp() {
  return (
    // Wrap your scrolling content with <StickyHost>, then add <Sticky> children.
    <StickyHost>
      {/* This sticky will stick to the top of the page. */}
      <Sticky>...</Sticky>
      {/* This non-sticky content will be scrolled past. */}
      <div>...</div>
      {/* This sticky content will stack below the first sticky. */}
      <Sticky>...</Sticky>
    </StickyHost>
  );
}

More documentation

See the docs in src/index.tsx.

1.0.0

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.1

3 years ago