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

[Feature Request] Custom button #73

Open
mlenser opened this issue Jan 15, 2025 · 1 comment
Open

[Feature Request] Custom button #73

mlenser opened this issue Jan 15, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@mlenser
Copy link

mlenser commented Jan 15, 2025

Is your feature request related to a problem? Please describe.

We're currently lazy loading the OramaSearchButton because it (or @orama/react-components) is very heavy on the bundle. The button has a bunch of JS code related to theme which isn't so great from our perspective - we manage it all via the CSS variables. It is also quite difficult to style like our normal buttons

Describe the solution you'd like

I would like to use my own Button component which triggers the OramaSearchBox when it is clicked.

This could be done with a hook that accesses the globalContext or some other method to open the OramaSearchBox.

Describe alternatives you've considered

Styling the button like our normal buttons via the css variables. The sizes you provide do not align with our sizes. The focus state does not match, etc. We were able to mostly force it, but the height is slightly off and we can't get the focus state to match as there are no CSS variables for it. The biggest issue is the lazy loading due to the bundle size.


Thanks for building Orama and for considering this request.

@mlenser mlenser added the enhancement New feature or request label Jan 15, 2025
@rjborba
Copy link
Collaborator

rjborba commented Jan 16, 2025

@mlenser this is a good one. We do have that on our radar. I'll get back to you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants