npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

sticky-shadcn-tabs

v0.1.0

Published

Sticky animated tabs with shadcn style, fully customizable for React + Radix UI + Tailwind CSS

Readme

Sticky Shadcn Tabs

Sticky Shadcn Tabs is a modern, fully customizable sticky tabs component for React, built on top of Radix UI Tabs and Framer Motion. Designed for seamless integration with Tailwind CSS, it allows smooth sticky behavior with blur, shadow, gradient fade, and full motion customization.

@sorrybodikmain

CodeTime Badge


Features

  • Sticky TabsList that sticks to the top of the viewport when scrolling.
  • Optional backdrop blur with customizable intensity.
  • Shadow and gradient fade effects for polished UI.
  • Fully customizable animations via motionVariants and motionConfig.
  • Supports offsets for fixed headers.
  • Works with nested tabs.
  • Tailwind-friendly, fully controllable via className props.

Installation

npm install sticky-shadcn-tabs
# or
yarn add sticky-shadcn-tabs
# or
bun add sticky-shadcn-tabs

Peer Dependencies:

  • react >= 18
  • react-dom >= 18
  • @radix-ui/react-tabs >= 1.0.0
  • framer-motion >= 10.0.0
  • tailwindcss (optional, recommended for styling)

Usage

'use client'

import { StickyShadcnTabs } from 'sticky-shadcn-tabs'
import { TabsTrigger, TabsContent } from './BaseTabs'

export default function Example() {
  return (
    <StickyShadcnTabs
      defaultValue="overview"
      offset={64}
      enableBlur
      enableShadow
      enableFade
      blurAmount={16}
      gradientHeight={12}
      gradientColors="from-background/90 to-transparent"
      triggers={[
        <TabsTrigger key="overview" value="overview">Overview</TabsTrigger>,
        <TabsTrigger key="details" value="details">Details</TabsTrigger>,
        <TabsTrigger key="settings" value="settings">Settings</TabsTrigger>
      ]}
    >
      <TabsContent value="overview">
        <div className="h-[2000px] p-4">Overview content here...</div>
      </TabsContent>
      <TabsContent value="details">
        <div className="h-[2000px] p-4">Details content here...</div>
      </TabsContent>
      <TabsContent value="settings">
        <div className="h-[2000px] p-4">Settings content here...</div>
      </TabsContent>
    </StickyShadcnTabs>
  )
}

Props

| Prop | Type | Default | Description | | -------------------- | --------------------------------- | ------------------------------------- | ---------------------------------------------------------------------- | | triggers | ReactNode[] | required | Array of TabsTrigger elements to render inside the sticky tab list. | | children | ReactNode | required | TabsContent components. | | offset | number | 0 | Vertical offset in pixels for sticky tabs (useful with fixed headers). | | enableBlur | boolean | true | Enable backdrop blur for sticky tabs. | | blurAmount | number | 12 | Amount of blur in pixels. | | enableShadow | boolean | true | Add shadow to sticky tabs. | | enableFade | boolean | true | Enable gradient fade below the sticky tabs. | | gradientHeight | number | 8 | Height of the gradient fade in pixels. | | gradientColors | string | 'from-background/80 to-transparent' | Tailwind gradient classes for fade. | | motionConfig | MotionProps['transition'] | { duration: 0.3, ease: 'easeOut' } | Default Framer Motion transition configuration. | | motionVariants | { container?, overlay?, fade? } | undefined | Custom Framer Motion variants for container, overlay, or fade. | | listClassName | string | '' | Additional Tailwind classes for TabsList. | | containerClassName | string | '' | Tailwind classes for the sticky container. | | overlayClassName | string | '' | Tailwind classes for the offset overlay (top space). | | fadeClassName | string | '' | Tailwind classes for gradient fade. | | style | CSSProperties | undefined | Inline styles for the sticky container. |


Motion Customization

You can fully override the animations using motionVariants:

motionVariants={{
  container: {
    initial: { opacity: 0, y: -20 },
    animate: { opacity: 1, y: 0, transition: { duration: 0.5 } },
    exit: { opacity: 0, y: -20 }
  },
  overlay: { initial: { opacity: 0 }, animate: { opacity: 1 } },
  fade: { initial: { opacity: 0 }, animate: { opacity: 0.8 } }
}}

Or adjust global timing via motionConfig:

motionConfig={{ duration: 0.4, ease: 'easeInOut' }}

Styling

The component is fully compatible with Tailwind CSS. You can style all elements via:

  • listClassNameTabsList
  • containerClassName → sticky container
  • overlayClassName → top offset overlay
  • fadeClassName → gradient fade

Example:

<StickyShadcnTabs
  listClassName="bg-muted text-muted-foreground rounded-lg p-1"
  containerClassName="border border-gray-200 shadow-lg"
  overlayClassName="bg-gray-50"
  fadeClassName="bg-gradient-to-b from-gray-100 to-transparent"
/>

Advanced Usage

Nested tabs work seamlessly. Sticky behavior is automatically scoped to each StickyShadcnTabs instance:

<StickyShadcnTabs triggers={[...]} offset={64}>
  <TabsContent value="main">
    <StickyShadcnTabs triggers={[...]} offset={0}>
      <TabsContent value="nested">Nested content</TabsContent>
    </StickyShadcnTabs>
  </TabsContent>
</StickyShadcnTabs>