Skip to content

Items counter position and scrollbar for thumbnails #283

Closed Locked Answered by igordanchenko
iGer98 asked this question in Q&A
Discussion options

You must be logged in to vote

Is it possible to move items counter right side over a thumbnail block? I did not found an answer for it and it looks there is no a good solution for it.

I'm afraid there is no such option in the Counter plugin, but you can easily implement your own plugin for this use case.

// Counter.tsx

import {
  PluginProps,
  PLUGIN_THUMBNAILS,
  createModule,
  ComponentProps,
  useLightboxState,
} from "yet-another-react-lightbox";

function CounterComponent({ children }: ComponentProps) {
  const { slides, currentIndex } = useLightboxState();

  return (
    <>
      {children}

      <div
        style={{
          color: "white",
          position: "absolute",
          right: 16,
          t…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@iGer98
Comment options

Answer selected by igordanchenko
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants