For the complete documentation index, see llms.txt. Markdown variants are available by appending .md to any URL or sending an Accept: text/markdown header. An agent skill is available at /.well-known/agent-skills/site-skill.md.
FrakmentFrakment

Scroll Fade

Utilities for adding a fade effect to the edges of a scroll container.

Item 1
Item 2
Item 3
scroll-fade-overflow.tsx
export function ScrollFadeOverflow() {
  return (
    <div className="mx-auto w-full max-w-xs overflow-hidden rounded-2xl border">
      <div className="scroll-fade no-scrollbar overflow-y-auto">
        <div className="flex flex-col gap-1.5 p-1.5">
          {Array.from({ length: 3 }, (_, index) => (
            <div
              className="bg-muted rounded-lg px-3 py-2.5 text-sm"
              key={index}
            >
              Item {index + 1}
            </div>
          ))}
        </div>
      </div>
    </div>
  );
}

Scroll fade adds a mask-image gradient to the edges of a scroll container so content dissolves into the background when there is more content beyond the visible area.

Usage

ClassStyles
scroll-fadeFade on both vertical edges, scroll-aware.
scroll-fade-xFade on both horizontal edges, scroll-aware.
scroll-fade-tFade on the top edge only.
scroll-fade-bFade on the bottom edge only.
scroll-fade-lFade on the left edge only.
scroll-fade-rFade on the right edge only.
scroll-fade-sFade on the logical start edge.
scroll-fade-eFade on the logical end edge.
scroll-fade-noneRemove the fade.

No Overflow, No Fade

Item 1
Item 2
Item 3
scroll-fade-overflow.tsx
export function ScrollFadeOverflow() {
  return (
    <div className="mx-auto w-full max-w-xs overflow-hidden rounded-2xl border">
      <div className="scroll-fade no-scrollbar overflow-y-auto">
        <div className="flex flex-col gap-1.5 p-1.5">
          {Array.from({ length: 3 }, (_, index) => (
            <div
              className="bg-muted rounded-lg px-3 py-2.5 text-sm"
              key={index}
            >
              Item {index + 1}
            </div>
          ))}
        </div>
      </div>
    </div>
  );
}

Horizontal

Design
Engineering
Marketing
Product
Research
Sales
Support
Operations
Finance
Legal
People
Security
scroll-fade-horizontal.tsx
const tags = [
  "Design",
  "Engineering",
  "Marketing",
  "Product",
  "Research",
  "Sales",
  "Support",
  "Operations",
  "Finance",
  "Legal",
  "People",
  "Security",
];

export function ScrollFadeHorizontal() {
  return (
    <div className="mx-auto w-full max-w-xs overflow-hidden rounded-2xl border">
      <div className="scroll-fade-x no-scrollbar overflow-x-auto">
        <div className="flex w-max gap-1.5 p-1.5">
          {tags.map((tag) => (
            <div
              className="bg-muted shrink-0 rounded-lg px-3 py-2.5 text-sm"
              key={tag}
            >
              {tag}
            </div>
          ))}
        </div>
      </div>
    </div>
  );
}

Edges

Inbox triage
Design review
API contract
QA pass
Launch notes
Metrics follow-up
Inbox triage
Design review
API contract
QA pass
Launch notes
Metrics follow-up
Design
Engineering
Marketing
Product
Research
Sales
Support
Operations
Design
Engineering
Marketing
Product
Research
Sales
Support
Operations
scroll-fade-edge.tsx
const items = [
  "Inbox triage",
  "Design review",
  "API contract",
  "QA pass",
  "Launch notes",
  "Metrics follow-up",
];
const tags = [
  "Design",
  "Engineering",
  "Marketing",
  "Product",
  "Research",
  "Sales",
  "Support",
  "Operations",
];
function Items() {
  return (
    <div className="flex flex-col gap-1.5 p-1.5">
      {items.map((item) => (
        <div className="bg-muted rounded-lg px-3 py-2.5 text-sm" key={item}>
          {item}
        </div>
      ))}
    </div>
  );
}
function Tags() {
  return (
    <div className="flex w-max gap-1.5 p-1.5">
      {tags.map((tag) => (
        <div
          className="bg-muted shrink-0 rounded-lg px-3 py-2.5 text-sm"
          key={tag}
        >
          {tag}
        </div>
      ))}
    </div>
  );
}
export function ScrollFadeEdge() {
  return (
    <div className="mx-auto flex max-w-xs min-w-0 flex-col gap-6">
      <div className="overflow-hidden rounded-2xl border">
        <div className="scroll-fade-t no-scrollbar h-36 overflow-y-auto">
          <Items />
        </div>
      </div>
      <div className="overflow-hidden rounded-2xl border">
        <div className="scroll-fade-b no-scrollbar h-36 overflow-y-auto">
          <Items />
        </div>
      </div>
      <div className="overflow-hidden rounded-2xl border">
        <div className="scroll-fade-s no-scrollbar overflow-x-auto">
          <Tags />
        </div>
      </div>
      <div className="overflow-hidden rounded-2xl border">
        <div className="scroll-fade-e no-scrollbar overflow-x-auto">
          <Tags />
        </div>
      </div>
    </div>
  );
}

Fade Size

Use arbitrary value syntax [--scroll-fade-size:1rem] to change the fade depth.

Item 1
Item 2
Item 3
Item 4
Item 5
Item 6
Item 7
Item 8
Item 1
Item 2
Item 3
Item 4
Item 5
Item 6
Item 7
Item 8
scroll-fade-size.tsx
function Items() {
  return (
    <div className="flex flex-col gap-1.5 p-1.5">
      {Array.from({ length: 8 }, (_, i) => (
        <div className="bg-muted rounded-lg px-3 py-2.5 text-sm" key={i}>
          Item {i + 1}
        </div>
      ))}
    </div>
  );
}
export function ScrollFadeSize() {
  return (
    <div className="mx-auto flex w-full max-w-xs flex-col gap-6">
      <div className="overflow-hidden rounded-2xl border">
        <div className="scroll-fade no-scrollbar h-48 overflow-y-auto [--scroll-fade-size:1rem]">
          <Items />
        </div>
      </div>
      <div className="overflow-hidden rounded-2xl border">
        <div className="scroll-fade no-scrollbar h-48 overflow-y-auto [--scroll-fade-size:6rem]">
          <Items />
        </div>
      </div>
    </div>
  );
}

Disable

Item 1
Item 2
Item 3
Item 4
Item 5
Item 6
Item 7
Item 8
Item 1
Item 2
Item 3
Item 4
Item 5
Item 6
Item 7
Item 8
scroll-fade-none.tsx
function Items() {
  return (
    <div className="flex flex-col gap-1.5 p-1.5">
      {Array.from({ length: 8 }, (_, i) => (
        <div className="bg-muted rounded-lg px-3 py-2.5 text-sm" key={i}>
          Item {i + 1}
        </div>
      ))}
    </div>
  );
}
export function ScrollFadeNone() {
  return (
    <div className="mx-auto flex max-w-xs min-w-0 flex-col gap-6">
      <div className="overflow-hidden rounded-2xl border">
        <div className="scroll-fade no-scrollbar h-48 overflow-y-auto">
          <Items />
        </div>
      </div>
      <div className="overflow-hidden rounded-2xl border">
        <div className="scroll-fade no-scrollbar scroll-fade-none h-48 overflow-y-auto">
          <Items />
        </div>
      </div>
    </div>
  );
}

Fallback

Scroll-driven animations with static fallback for unsupported browsers.