Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT] New Lens component #508

Merged
merged 6 commits into from
Feb 10, 2025

Conversation

h3rmel
Copy link
Contributor

@h3rmel h3rmel commented Jan 13, 2025

This PR adds a new Special Effects component, the Lens component.

Basically, is works as a magnifying glass on the web.

lens-component-video.mov

Copy link

vercel bot commented Jan 13, 2025

@h3rmel is attempting to deploy a commit to the product-studio Team on Vercel.

A member of the Team first needs to authorize it.

@itsarghyadas
Copy link
Collaborator

isFocusing?: () => void;
hovering?: boolean;
setHovering?: (hovering: boolean) => void;

@h3rmel Can you please describe the use case of these three props? How can they be used within the component?

@h3rmel
Copy link
Contributor Author

h3rmel commented Feb 5, 2025

Hi @itsarghyadas, sure

The isFocusing I can think of only one case:

  • Trigger an animation or effect when the user focus on the component

The hovering e setHovering can be used to:

  • Sync multiple lens
  • Can control the lens to work without the user's interaction (with an animation or transition)
  • Keyboard shortcuts control the lens

@dillionverma dillionverma merged commit f775706 into magicuidesign:main Feb 10, 2025
3 of 4 checks passed
dancrump1 pushed a commit to dancrump1/magicui that referenced this pull request Feb 11, 2025
* feat: new lens component

* style: fix code style with prettier

* fix: removed not required props and added a defaultPosition props

* fix: rebased

* fix: refactor and update interface

* fix: update description

---------

Co-authored-by: Arghya Das <[email protected]>
Co-authored-by: Dillion Verma <[email protected]>
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.

3 participants