-
-
Notifications
You must be signed in to change notification settings - Fork 109
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
Allow using a custom Input component (like asChild in Radix UI) #166
Comments
@amotarao Do I need to add a export interface EditableInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange'> {
//.....
renderInput?: (props: React.InputHTMLAttributes<HTMLInputElement>) => React.ReactNode;
} <EditableInput
label="Hex"
value={hsvaToHex(hsva)}
style={{ width: 68, alignItems: 'flex-start' }}
renderInput={(props) => {
return <input {...props} />
}}
/> |
@jaywcjlove I think that’s also a good approach! Once renderProps is added, this issue will likely be resolved. |
jaywcjlove
added a commit
that referenced
this issue
Feb 13, 2025
@amotarao Upgrade v2.4.0 |
@jaywcjlove It worked perfectly. Thank you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, and thank you for maintaining this fantastic library! I’m currently using @uiw/react-color-editable-input and would love to use my own custom Input component while retaining the existing color input functionality.
Why this would be helpful:
Maintains consistent styling and behavior across my application
Prevents the need to reinvent color input logic
Aligns with patterns like Radix UI’s asChild, offering flexibility in component composition
Would you consider adding a prop or similar mechanism to allow replacing the default Input component with a custom one?
The text was updated successfully, but these errors were encountered: