Scrollspy

Auto-highlight navigation links based on scroll position.

This component requires softui.js for interactive behavior.

Default

Add data-sui-scrollspy to a nav element. Links with href="#id" auto-highlight as the matching section scrolls into view.

Introduction

SoftUI is a neumorphic CSS component library with soft shadows, muted palettes, and tactile depth. It includes 75+ components, dark mode support, and a small JS module for interactive behaviors. Built for modern web apps that want a distinctive, polished look without sacrificing usability.

Features

Zero dependencies. Pure CSS with optional vanilla JS. Dark mode built in with CSS custom properties. Responsive grid system with 12 columns and breakpoints. Full accessibility support with ARIA attributes, focus-visible states, and prefers-reduced-motion. RTL support with CSS logical properties.

Installation

Install via npm with npm install softui-css or use the CDN. No build tools required — just link the CSS and optionally the JS file. Works with React, Vue, Svelte, Astro, Next.js, and any HTML page. Import in your framework or add a link tag in your HTML head.

Usage

Add SoftUI classes to your HTML elements. Every component follows the sui- prefix convention. Customize with CSS custom properties — override colors, shadows, radius, fonts, and transitions on :root to theme everything at once. Use the Playground to experiment live.

API Reference

Interactive components expose a JavaScript API via the global SoftUI object. Open modals with SoftUI.modal('#id').open(), show toasts with SoftUI.toast(), and control sheets, tabs, accordions, and more programmatically. All methods return the component instance for chaining.

<div style="display:flex;gap:24px;">
  <nav class="sui-scrollspy" data-sui-scrollspy>
    <a href="#intro" class="active">Introduction</a>
    <a href="#features">Features</a>
    <a href="#install">Installation</a>
    <a href="#usage">Usage</a>
    <a href="#api">API Reference</a>
  </nav>
  <div style="flex:1;">
    <div id="intro">
      <h4>Introduction</h4>
      <p>Content here...</p>
    </div>
    <div id="features">
      <h4>Features</h4>
      <p>Content here...</p>
    </div>
    <div id="install">
      <h4>Installation</h4>
      <p>Content here...</p>
    </div>
    <div id="usage">
      <h4>Usage</h4>
      <p>Content here...</p>
    </div>
    <div id="api">
      <h4>API Reference</h4>
      <p>Content here...</p>
    </div>
  </div>
</div>

<!-- Optional: set offset (default 100px) -->
<nav class="sui-scrollspy" data-sui-scrollspy data-sui-scrollspy-offset="80">
  ...
</nav>

Horizontal

Overview

A comprehensive overview of the product. This section covers the main features, use cases, and benefits. Designed for teams of all sizes who need a reliable and scalable solution.

Specs

Technical specifications including supported browsers, file sizes, performance benchmarks, and compatibility with major frameworks. Minified CSS is under 50KB gzipped.

Reviews

What developers are saying about the product. Highly rated for ease of use, visual quality, and comprehensive documentation. Used by thousands of developers worldwide.

FAQ

Frequently asked questions about licensing, support, updates, and customization. The library is MIT licensed and free forever. Community support is available on GitHub.

<nav class="sui-scrollspy sui-scrollspy-horizontal" data-sui-scrollspy>
  <a href="#overview" class="active">Overview</a>
  <a href="#specs">Specs</a>
  <a href="#reviews">Reviews</a>
  <a href="#faq">FAQ</a>
</nav>

Pill

About

We are a team of designers and developers passionate about creating beautiful, accessible user interfaces. Our mission is to make neumorphic design accessible to everyone through open-source tools and comprehensive documentation.

Team

Our distributed team spans multiple time zones and brings together expertise in CSS architecture, JavaScript frameworks, accessibility, and design systems. We believe in shipping fast and iterating based on community feedback.

Careers

We are always looking for talented individuals who share our passion for great UI. Check our GitHub for open issues labeled "good first issue" if you'd like to contribute to the project.

Contact

Reach out via GitHub issues for bug reports and feature requests. For general questions, join our community discussions. We respond to all inquiries within 48 hours.

<nav class="sui-scrollspy sui-scrollspy-pill" data-sui-scrollspy>
  <a href="#about" class="active">About</a>
  <a href="#team">Team</a>
  <a href="#careers">Careers</a>
  <a href="#contact">Contact</a>
</nav>

Delete this item?

This action cannot be undone. This will permanently delete the item and remove all associated data.