Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 9, 2025

Enhance LogoLoop component for better flexibility and performance

Summary

This PR enhances the LogoLoop component with new props for better flexibility and control:

  1. hoverSpeed prop - Replaces pauseOnHover with a more flexible speed control

    • Set to 0 for pause (equivalent to old pauseOnHover={true})
    • Set to any value for deceleration effect on hover
    • Maintains backward compatibility with pauseOnHover
  2. renderItem prop - Custom rendering function for logo items

    • Allows users to render custom components for each item
    • Enables custom animations, tooltips, borders, etc.
    • Receives (item, key) as parameters
  3. Extended direction prop - Now supports vertical scrolling

    • Original: 'left' | 'right'
    • New: 'left' | 'right' | 'up' | 'down'
    • Fully supports vertical logo loops

Changes Made

  • Updated all 4 component variants
  • Updated CSS files for vertical direction support
  • Updated demo with new controls (PreviewSelect for direction)
  • Updated props documentation
  • Removed deprecated props from documentation

Example Usage

// Basic horizontal loop with pause on hover
<LogoLoop
  logos={techLogos}
  speed={120}
  direction="left"
  hoverSpeed={0}
/>

// Vertical loop with deceleration on hover
<LogoLoop
  logos={techLogos}
  speed={80}
  direction="up"
  hoverSpeed={20}
/>
Original prompt

This section details on the original issue you should resolve

<issue_title>[FEAT]: Enhance LogoLoop for �better flexibility and performance</issue_title>
<issue_description>### Share your suggestion

I'd like to propose a few enhancements. I'd love to hear your thoughts on this.


  1. Introduce a hoverSpeed prop to replace pauseOnHover. This will allow for new effects like deceleration, while still supporting the current pause functionality (by setting the speed to 0).

  2. Add a renderItem prop to let users render their own components for each item (for custom animations, tooltips, etc.).

  3. Improve performance if needed.

  4. (Optional) Extend the direction prop to support 'up' and 'down'.

Validations

  • I have checked other issues to see if my issue was already discussed or addressed</issue_description>

<agent_instructions>Implement the suggested changes. Make sure they are added under all 4 variants of the LogoLoop component (/content, /ts-default, /tailwind, /ts-tailwind), and any required demo showcase is updated in LogoLoopDemo.jsx and logoLoopCode.js. Ignore #3, there is nothing to improve in terms of performance.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Enhance LogoLoop for better flexibility and performance Add hoverSpeed, renderItem props and vertical direction support to LogoLoop Nov 9, 2025
Copilot AI requested a review from DavidHDev November 9, 2025 18:35
Copilot finished work on behalf of DavidHDev November 9, 2025 18:35
@DavidHDev DavidHDev marked this pull request as ready for review November 9, 2025 18:45
fadeOut
/>
{/* Custom rendering with renderItem */}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot remove this example from the usage code, it's not needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the renderItem example from the usage code as requested. (ec44449)

type: 'boolean',
default: 'true',
description: 'Whether to pause the animation when hovering over the component.'
description: 'DEPRECATED: Use hoverSpeed instead. When true, pauses animation on hover (equivalent to hoverSpeed={0}).'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot if it's deprecated, completely remove the prop from the propTable

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the deprecated pauseOnHover prop from the props table. (9e8db59)

Updated props table

}}
/>

<PreviewSlider
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot replace the current PreviewSwitch which changes the direction with a that will allow users to pick between all 4 options. You'll find it under /components/common

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment appears to be cut off. What should I replace the direction PreviewSwitch with?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot my bad, replace it with a <PreviewSelect /> component, with the 4 direction options.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced the direction PreviewSwitch with a PreviewSelect dropdown that supports all 4 direction options (Left, Right, Up, Down). (095f68c)

Direction select control

Copilot AI requested a review from DavidHDev November 9, 2025 18:49
Copilot finished work on behalf of DavidHDev November 9, 2025 18:49
Copilot finished work on behalf of DavidHDev November 9, 2025 18:55
Copilot finished work on behalf of DavidHDev November 9, 2025 19:03
@DavidHDev DavidHDev merged commit 2c8b86e into main Nov 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT]: Enhance LogoLoop for better flexibility and performance

2 participants