Logo von Menu Transitions Rtl

Menu Transitions Rtl

Community
asmyshlyaev177
menu-transitions-rtl

Scrollen in react-horizontal-scrolling-menu animieren und Menüs mit Schreibrichtung von rechts nach links erstellen: Seit v8 ist noPolyfill standardmäßig true. Daher werden transitionDuration (Standardwert 500), ein benutzerdefiniertes transitionBehavior mit Easing-Funktion und die ScrollOptions { duration, boundary } pro Aufruf von scrollToItem/scrollNext/scrollPrev stillschweigend ignoriert, sofern Sie noPolyfill={false} nicht setzen. Die Zeichenfolgen 'smooth' | 'auto' für das Verhalten werden weiterhin an das native scrollIntoView übergeben. Die RTL-Prop (nur eine direction: rtl-CSS-Klasse) und ihre Einschränkungen: RTL niemals mit Übergangs-Props kombinieren. Laden Sie diesen Skill, wenn die Scrollgeschwindigkeit oder das Easing keine Wirkung zeigt, Sie Übergänge anpassen oder RTL-Menüs erstellen möchten.

Add to TypingMind

Übersicht

Herausgeberasmyshlyaev177
Repositoryreact-horizontal-scrolling-menu
Skill-Namemenu-transitions-rtl
Sterne
790
Forks
101
Mitgelieferte Dateien
Nur Anweisungen
LizenzMIT
Links
  • Anweisungen in Markdown

    Eine SKILL.md-Datei, die das Modell bei Bedarf lädt. So werden nur dann Token verbraucht, wenn eine Anfrage tatsächlich dazu passt.

  • Funktioniert mit jedem LLM

    KI-Skills bestehen aus reinem Markdown, nicht aus anbieterspezifischem Code. Daher funktionieren sie mit GPT, Claude, Gemini, Grok oder einem lokalen Modell.

  • In sich abgeschlossen

    Alles, was das Modell braucht, steht in den Anweisungen — keine zusätzlichen Dateien zum Synchronisieren.

  • Open Source

    Von asmyshlyaev177 auf GitHub veröffentlicht. Prüfen Sie vor der Installation die Quelldateien.

Installation

Installieren Sie den KI-Skill Menu Transitions Rtl in TypingMind, um ihn mit jedem LLM zu nutzen, oder fügen Sie ihn einem anderen Agenten hinzu, der SKILL.md lesen kann.

1

In TypingMind installieren

TypingMind installiert einen Skill direkt aus seinem GitHub-Ordner. Dabei liest die App SKILL.md, bündelt die Ressourcendateien und speichert das Ergebnis lokal.

  1. Öffnen Sie die App und gehen Sie zu Plugins → Skills.
  2. Wählen Sie „Von GitHub installieren“.
  3. Fügen Sie die unten angegebene URL des Skill-Ordners ein und bestätigen Sie.
    https://github.com/asmyshlyaev177/react-horizontal-scrolling-menu/tree/master/skills/menu-transitions-rtl
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill hinzufügen → Über GitHub-URL. Fügen Sie dann die Ordner-URL ein und klicken Sie auf „Weiter“.
2

In einem anderen Agenten installieren

Jeder Agent, der das Agent-Skills-Format unterstützt, kann diesen Skill nutzen. Kopieren Sie den Ordner in das Skill-Verzeichnis des jeweiligen Agenten.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/asmyshlyaev177/react-horizontal-scrolling-menu.git /tmp/react-horizontal-scrolling-menu
mkdir -p .claude/skills
cp -r /tmp/react-horizontal-scrolling-menu/skills/menu-transitions-rtl .claude/skills/menu-transitions-rtl
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie Menu Transitions Rtl in einem beliebigen Chat in TypingMind. Den Rest übernimmt das Modell. Name und Beschreibung des Skills stehen im System-Prompt. Sobald eine Anfrage passt, lädt das Modell selbstständig die vollständigen Anweisungen — Sie müssen den Skill nie manuell aufrufen, und er verbraucht erst Token, wenn er tatsächlich genutzt wird.

Das Modell lädt Menu Transitions Rtl automatisch, sobald eine passende Anfrage gestellt wird.

Funktioniert mit jedem KI-Modell

KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher ist Menu Transitions Rtl nicht an das Modell gebunden, für das der Skill geschrieben wurde. Installieren Sie ihn einmal in TypingMind und nutzen Sie ihn mit GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder einem selbst betriebenen lokalen Modell — alles mit Ihren eigenen API-Schlüsseln.

  • Wird nur bei Bedarf geladen

    Der System-Prompt enthält nur den Namen und die Beschreibung. Die Anweisungen werden bei der ersten passenden Anfrage geladen. Ein ungenutzter Skill verursacht daher keine Kosten.

  • Modell im laufenden Chat wechseln

    Da der Skill aus Anweisungen statt aus Code besteht, funktioniert er auch nach einem Modellwechsel — das nächste Modell liest dieselbe SKILL.md-Datei.

Skill-Anweisungen

Dies ist der Inhalt von SKILL.md, den das Modell lädt. Lesen Sie ihn vor der Installation — ein Skill besteht aus Anweisungen, denen Ihr Modell folgt.

react-horizontal-scrolling-menu — Transitions and RTL

The single most important fact: noPolyfill defaults to true since v8.0.0 (src/index.tsx:183). With the default, every scroll uses native Element.scrollIntoView: transitionDuration, a function-valued transitionBehavior, and ScrollOptions duration/boundary are silently discarded (src/helpers.tsx:72-77). Only the string behaviors 'smooth'/'auto' survive — they are forwarded to the native call, with 'smooth' as the fallback (src/helpers.tsx:60-73). Any duration/easing work starts by setting noPolyfill={false}, which routes scrolling through the smooth-scroll-into-view-if-needed polyfill. The one exception: RTL menus must keep the default (see Tensions).

Setup

Animated transitions, minimum viable:

tsx
import React from 'react';
import {
  ScrollMenu,
  VisibilityContext,
  type publicApiType,
} from 'react-horizontal-scrolling-menu';
import 'react-horizontal-scrolling-menu/dist/styles.css';

function LeftArrow() {
  const api = React.useContext<publicApiType>(VisibilityContext);
  const disabled = api.useLeftArrowVisible();
  return (
    <button disabled={disabled} onClick={() => api.scrollPrev()}>
      Left
    </button>
  );
}

function RightArrow() {
  const api = React.useContext<publicApiType>(VisibilityContext);
  const disabled = api.useRightArrowVisible();
  return (
    <button disabled={disabled} onClick={() => api.scrollNext()}>
      Right
    </button>
  );
}

// itemId must stay on the component's props (ScrollMenu reads it);
// do not spread it onto the DOM node.
function Card({ title }: { itemId: string; title: string }) {
  return <div style={{ width: '160px', margin: '0 10px' }}>{title}</div>;
}

const items = Array.from({ length: 10 }, (_, i) => ({ id: `item-${i}` }));

export function AnimatedMenu() {
  return (
    <ScrollMenu
      LeftArrow={LeftArrow}
      RightArrow={RightArrow}
      noPolyfill={false} // REQUIRED — transition props are no-ops without it
      transitionDuration={1200} // ms, default 500
      transitionBehavior="smooth"
    >
      {items.map(({ id }) => (
        <Card itemId={id} key={id} title={id} />
      ))}
    </ScrollMenu>
  );
}

Patterns below reuse LeftArrow, RightArrow, Card, items, and the import block from this Setup.

Core Patterns

The noPolyfill gate — which engine scrolls

noPolyfillEngineTransition controlsRTL
true (default)native Element.scrollIntoViewduration/boundary/function behavior ignored; string behavior still appliescorrect
falsesmooth-scroll-into-view-if-needed polyfillall honoredbuggy — never combine

Resolution chains in polyfill mode (src/createApi.ts:120-160,316-336, src/helpers.tsx:60):

  • behavior: positional argument → transitionBehavior prop → 'smooth'
  • duration: ScrollOptions.duration → transitionDuration prop → 500
  • boundary: ScrollOptions.boundary → the menu's own scroll container (src/index.tsx:250)

Custom easing function via transitionBehavior

A function transitionBehavior receives the computed scroll targets and drives scrollLeft itself — any curve or animation library works from there. Polyfill mode only.

tsx
// What scroll-into-view-if-needed hands to a custom behavior: one action per
// scrollable ancestor that must move — here always just the scroll container,
// because the menu passes it as `boundary`.
type ScrollAction = { el: Element; top: number; left: number };

const easeInOutCubic = (t: number) =>
  t < 0.5 ? 4 * t * t * t : 1 - Math.pow(-2 * t + 2, 3) / 2;

// A second arrow click can land mid-animation; remembering the pending frame
// per element lets the new animation cancel the old one instead of both
// fighting over scrollLeft.
const pendingFrames = new WeakMap<Element, number>();

function animateScroll(el: Element, target: number, duration: number) {
  const prevFrame = pendingFrames.get(el);
  if (prevFrame !== undefined) cancelAnimationFrame(prevFrame);

  const from = el.scrollLeft;
  const startTime = performance.now();

  const step = (now: number) => {
    const progress = Math.min((now - startTime) / duration, 1);
    el.scrollLeft = from + (target - from) * easeInOutCubic(progress);
    if (progress < 1) {
      pendingFrames.set(el, requestAnimationFrame(step));
    } else {
      pendingFrames.delete(el);
    }
  };

  pendingFrames.set(el, requestAnimationFrame(step));
}

const transition = (instructions: ScrollAction[]) =>
  instructions.forEach(({ el, left }) => animateScroll(el, left, 1200));

export function CustomEasingMenu() {
  return (
    <ScrollMenu
      LeftArrow={LeftArrow}
      RightArrow={RightArrow}
      noPolyfill={false} // custom easing only runs through the polyfill
      // The typings describe the options-object form, but the menu passes this
      // value straight to scroll-into-view-if-needed as its behavior callback.
      transitionBehavior={transition as unknown as ScrollBehavior}
    >
      {items.map(({ id }) => (
        <Card itemId={id} key={id} title={id} />
      ))}
    </ScrollMenu>
  );
}

Live-editable version: the CustomTransition Storybook story.

Per-call override with ScrollOptions

ScrollOptions is the last argument of scrollToItem, scrollNext, and scrollPrev; its duration/boundary override the menu-level transition props for that one call (polyfill mode only):

tsx
function CenteringCard({ title, itemId }: { itemId: string; title: string }) {
  const api = React.useContext<publicApiType>(VisibilityContext);

  const center = () =>
    // behavior inside the options object is required by the type but the
    // positional 'smooth' always wins — only duration/boundary take effect.
    api.scrollToItem(api.getItemById(itemId), 'smooth', 'center', 'nearest', {
      behavior: 'smooth',
      duration: 800, // overrides transitionDuration for this call only
    });

  return (
    <div onClick={center} style={{ width: '160px', margin: '0 10px' }}>
      {title}
    </div>
  );
}

scrollNext/scrollPrev type their options as Omit<scrollToItemOptions, 'behavior'> (src/createApi.ts:18), so there { duration: 800 } alone compiles:

tsx
function SlowNextArrow() {
  const api = React.useContext<publicApiType>(VisibilityContext);
  const disabled = api.useRightArrowVisible();
  return (
    <button
      disabled={disabled}
      onClick={() =>
        api.scrollNext('smooth', 'start', 'nearest', { duration: 800 })
      }
    >
      Right
    </button>
  );
}

RTL menu

The RTL prop does exactly one thing: it appends the rtl class to the scroll container (src/index.tsx:306-307), which styles.css maps to direction: rtl (src/styles.css:9-11). Item order and scrolling are native browser RTL behavior. Keep the noPolyfill default and pass no transition props. Swap the arrow slots so the advancing arrow sits visually left (in RTL the row starts at the right edge and later items extend leftwards):

tsx
export function RTLMenu() {
  return (
    // Visual left = logical end in RTL, so the slots swap components.
    // Each arrow keeps its own hook/handler pair, so disabling stays correct.
    <ScrollMenu RTL LeftArrow={RightArrow} RightArrow={LeftArrow}>
      {items.map(({ id }) => (
        <Card itemId={id} key={id} title={id} />
      ))}
    </ScrollMenu>
  );
}

Common Mistakes

CRITICAL Transition props ignored under default noPolyfill

Wrong:

tsx
<ScrollMenu transitionDuration={1200}>
  {items.map(({ id }) => (
    <Card itemId={id} key={id} title={id} />
  ))}
</ScrollMenu>

Correct:

tsx
<ScrollMenu noPolyfill={false} transitionDuration={1200}>
  {items.map(({ id }) => (
    <Card itemId={id} key={id} title={id} />
  ))}
</ScrollMenu>

noPolyfill defaults to true (native scrollIntoView) since v8.0.0, so duration, boundary and custom-function behavior are silently discarded unless noPolyfill={false} pulls in the smooth-scroll polyfill. (Shared with menu-migration: code written for v5–v7 relied on the polyfill being the default.)

Source: src/helpers.tsx:72-77; src/index.tsx:183; CHANGELOG v8.0.0

HIGH Custom transitionBehavior function without noPolyfill={false}

Wrong:

tsx
<ScrollMenu transitionBehavior={transition as unknown as ScrollBehavior}>
  {items.map(({ id }) => (
    <Card itemId={id} key={id} title={id} />
  ))}
</ScrollMenu>

Correct:

tsx
<ScrollMenu
  noPolyfill={false}
  transitionBehavior={transition as unknown as ScrollBehavior}
>
  {items.map(({ id }) => (
    <Card itemId={id} key={id} title={id} />
  ))}
</ScrollMenu>

With noPolyfill true the function is cast to a native ScrollBehavior string and handed to scrollIntoView, which ignores or rejects it — custom easing only works through the polyfill.

Source: src/helpers.tsx:67; stories/CustomTransition/CustomTransition.source.tsx

HIGH Combining transition props with RTL

Wrong:

tsx
<ScrollMenu RTL noPolyfill={false} transitionDuration={800}>
  {items.map(({ id }) => (
    <Card itemId={id} key={id} title={id} />
  ))}
</ScrollMenu>

Correct:

tsx
<ScrollMenu RTL LeftArrow={RightArrow} RightArrow={LeftArrow}>
  {items.map(({ id }) => (
    <Card itemId={id} key={id} title={id} />
  ))}
</ScrollMenu>

The polyfill has RTL bugs (page-level horizontal scrolling); transitions and the RTL prop are documented as not combining — RTL menus keep the noPolyfill default and native scrolling.

Source: README.md "Transitions and animation"; https://github.com/asmyshlyaev177/react-horizontal-scrolling-menu/issues/230 (#241, #216)

MEDIUM behavior field in ScrollOptions treated as effective

Wrong:

tsx
api.scrollToItem(api.getItemById('item-3'), undefined, 'center', 'nearest', {
  behavior: 'smooth', // never reaches the scroll call
});

Correct:

tsx
api.scrollToItem(api.getItemById('item-3'), 'smooth', 'center', 'nearest', {
  behavior: 'smooth', // required by the type, but only satisfies TS
  duration: 800, // duration/boundary are the fields that take effect
});

scrollToItemOptions types behavior as required, but the implementation spreads the positional behavior after the options object, so options.behavior is always overridden (falling back through transitionBehavior to 'smooth') — only duration and boundary in the options object matter, and only in polyfill mode.

Source: src/types.ts:55-59 vs src/helpers.tsx:66-77; src/createApi.ts:316-336

Tensions

HIGH Tension: native scroll correctness vs animation control

noPolyfill={true} (the default) avoids the polyfill's elusive edge bugs but makes every transition prop a no-op; noPolyfill={false} restores animation control (duration, easing, per-call ScrollOptions) and re-imports those bugs — RTL breakage and page-level scrolling. Agents adding transitionDuration for polish silently get nothing; agents flipping noPolyfill for animation break RTL menus. Pick one side per menu: animated LTR with noPolyfill={false}, or RTL/maximum-correctness with the default. The scroll methods these props modify are covered in menu-scrolling.

See also

  • menu-scrolling — scrollToItem, scrollNext/scrollPrev, apiRef, and paging: transition props and ScrollOptions modify how those scroll methods animate.

Häufig gestellte Fragen

Was macht der KI-Skill Menu Transitions Rtl?

Scrollen in react-horizontal-scrolling-menu animieren und Menüs mit Schreibrichtung von rechts nach links erstellen: Seit v8 ist noPolyfill standardmäßig true. Daher werden transitionDuration (Standardwert 500), ein benutzerdefiniertes transitionBehavior mit Easing-Funktion und die ScrollOptions { duration, boundary } pro Aufruf von scrollToItem/scrollNext/scrollPrev stillschweigend ignoriert, sofern Sie noPolyfill={false} nicht setzen. Die Zeichenfolgen 'smooth' | 'auto' für das Verhalten werden weiterhin an das native scrollIntoView übergeben. Die RTL-Prop (nur eine direction: rtl-CSS-Kla...

Warum Menu Transitions Rtl in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Menu Transitions Rtl besteht aus reinem Markdown statt aus anbieterspezifischem Code. So funktioniert derselbe Skill mit GPT-5, Claude, Gemini, Grok oder einem lokalen Modell – und Sie können das Modell mitten im Chat wechseln, ohne dass der Skill seine Funktion verliert. TypingMind verwendet Ihre eigenen API-Schlüssel. Sie bezahlen die Anbieter daher direkt statt über ein Abonnement pro Nutzerplatz, und Ihre Skills und Chats bleiben in Ihrem eigenen Speicher.

Wie installiere ich Menu Transitions Rtl in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/asmyshlyaev177/react-horizontal-scrolling-menu/tree/master/skills/menu-transitions-rtl ein. TypingMind liest die Datei SKILL.md und installiert den Skill, den Sie für jeden Chat einzeln aktivieren können.

Welche KI-Modelle können Menu Transitions Rtl nutzen?

Jedes Modell, das Sie mit TypingMind verbinden. KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher können GPT, Claude, Gemini, Grok und lokale Modelle diesen Skill laden, wenn eine Anfrage dazu passt.

Wie viele KI-Modelle kann ich mit Menu Transitions Rtl verwenden?

So viele Sie möchten. In TypingMind können Sie Menu Transitions Rtl mit jedem Modell verwenden, das Skills unterstützt, etwa mit GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama. Dabei nutzen Sie Ihre eigenen API-Schlüssel.

Ist der KI-Skill Menu Transitions Rtl kostenlos?

Ja. Der Skill wird von asmyshlyaev177 auf GitHub unter der Lizenz MIT veröffentlicht. Sie bezahlen nur Ihren eigenen KI-Anbieter für die verwendeten Token.

Was sind KI-Skills?

Ein KI-Skill ist ein wiederverwendbares Anweisungspaket, das einem KI-Modell vermittelt, wie es eine bestimmte Aufgabe erledigt. Es folgt dem offenen Format Agent Skills: Die Datei SKILL.md enthält den Namen und die Beschreibung des Skills. Hinzu kommen bei Bedarf Skripte, Vorlagen oder Referenzdateien für das Modell. Das Modell liest die Anweisungen nur, wenn Ihre Anfrage zum Skill passt. Ein installierter Skill verursacht daher erst Kosten, wenn er verwendet wird.

Wie unterscheiden sich KI-Skills von Plugins oder MCP-Servern?

Ein Plugin oder MCP-Server stellt einem Modell neue aufrufbare Tools bereit – Code, der auf einem System ausgeführt wird und ein Ergebnis zurückgibt. Ein KI-Skill vermittelt dem Modell stattdessen Wissen und Vorgehensweisen: wie es eine Aufgabe angeht, welche Schritte es befolgt und wie eine gute Ausgabe aussieht. Skills bestehen aus reinem Markdown und kommen daher ohne Server, API-Schlüssel und Laufzeitumgebung aus. Sie funktionieren mit jedem Modell.

Alle anzeigen

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇