Natural Sticky

developer tools

Natural Sticky has an llms.txt. Do you?

Natural Sticky offers a sleek solution for developers seeking a lightweight NPM package that delivers natural hide-on-scroll effects without the bloat. With its smart position switching and no dependencies, it’s perfect for creating dynamic interfaces that respond intuitively to user interactions.

Not sure yours is this good? Check it →

61 lines -94%
3 sections -82%
1 file

Natural Sticky's llms.txt Insights

Short and sweet

3 sections. Minimalist, but hey — at least they showed up.

Goldilocks zone

61 lines — not too long, not too short. AI loves this.

What's inside Natural Sticky's llms.txt

Natural Sticky's llms.txt contains 4 sections:

  • Natural Sticky
  • Basic Usage
  • Documentation
  • Minimal Demos

How does Natural Sticky's llms.txt compare?

Natural StickyDirectory AvgTop Performer
Lines611029163,447
Sections3173207

Cool table. Now the real question — where do you land? Find out →

Natural Sticky's llms.txt preview

First 61 of 61 lines

# Natural Sticky

> A lightweight, framework-agnostic NPM package for natural hide-on-scroll effects for headers, footers, or floating elements. It uses smart position switching instead of animations, so elements move naturally with the user's scroll speed.

The package is ultra-lightweight (1.2-1.3KB), has no dependencies, and is event-driven for creating dynamic interfaces. It supports multiple elements on the same page without conflicts. Behavior can be fine-tuned with three parameters: `reserveSpace` (positioning mode), `snapEagerness` (gap prevention), and `scrollThreshold` (activation speed).

## Basic Usage

**1. Installation**

```bash
npm install natural-sticky
```

**2. Quick Start**

You can either import it as a module or use the CDN.

*NPM Module:*
```javascript
import { naturalStickyTop, naturalStickyBottom } from 'natural-sticky';

const headerInstance = naturalStickyTop(document.querySelector('.header'));
const footerInstance = naturalStickyBottom(document.querySelector('.footer'));

// Clean up when the component unmounts
// headerInstance.destroy();
// footerInstance.destroy();
```

*CDN:*
```html
<!-- For headers -->
<script src="https://cdn.jsdelivr.net/npm/natural-sticky/dist/natural-sticky.top.min.js"></script>
<script>
  window.naturalStickyTop(document.querySelector('.header'));
</script>

<!-- For footers -->
<script src="https://cdn.jsdelivr.net/npm/natural-sticky/dist/natural-sticky.bottom.min.js"></script>
<script>
  window.naturalStickyBottom(document.querySelector('.footer'));
</script>
```

## Documentation

- [README](https://github.com/kadykov/natural-sticky/blob/main/README.md): The main project documentation with detailed explanations of configuration, events, and CSS requirements.

## Minimal Demos

These demos showcase core features with minimal styling, intended for developer reference.

- [Basic Header](https://github.kadykov.com/natural-sticky/demo/minimal-header.html): A simple sticky header.
- [Header with Events](https://github.kadykov.com/natural-sticky/demo/minimal-header-events.html): A header that changes style based on scroll events.
- [Floating Header](https://github.kadykov.com/natural-sticky/demo/minimal-header-floating.html): A header that does not affect the document flow.
- [Basic Footer](https://github.kadykov.com/natural-sticky/demo/minimal-footer.html): A simple sticky footer.
- [Footer with Events](https://github.kadykov.com/natural-sticky/demo/minimal-footer-events.html): A footer that responds to scroll events.
- [Floating Footer](https://github.kadykov.com/natural-sticky/demo/minimal-footer-floating.html): A footer that floats over the content.
- [Header Style on Scroll](https://github.kadykov.com/natural-sticky/demo/minimal-header-style-on-scroll.html): A header that changes style when scrolling down.

What is llms.txt?

llms.txt is an open standard that helps AI language models understand your website. By placing a structured markdown file at /llms.txt, websites provide AI search engines like ChatGPT, Claude, and Perplexity with a clear map of their content, services, and documentation. Companies like Natural Sticky use it to ensure AI accurately represents their brand when answering user queries. Read the spec.

See who else in developer tools got the memo →

Natural Sticky showed up. Where's yours?

1000+ companies didn't overthink it. 60 seconds. Go.

Check your site →

More llms.txt examples

View all →