Skip to content

Conversation

@Roene-JustBetter
Copy link
Member

@Roene-JustBetter Roene-JustBetter commented Aug 18, 2025

Remove the disabled colors from the input components when it have a disabled state. This can be manually added when you need to style an disabled input.

@Roene-JustBetter Roene-JustBetter changed the title Improved disabled state for inputs Remove disabled colors for disabled state Aug 28, 2025
@royduin
Copy link
Member

royduin commented Sep 2, 2025

Do we need those disabled examples?

@Roene-JustBetter
Copy link
Member Author

Do we need those disabled examples?

Well it isn't mandatory to show but it can be nice to see how the disabled state looks like. I can remove it more people think that it is not necessary to show the disabled state example. @Jade-GG @jordythevulder

@Jade-GG
Copy link
Contributor

Jade-GG commented Sep 9, 2025

So now we're requiring people to always add these classes when they want a disabled state? How do we make sure they know which classes to add to make sure all the buttons are consistent in their disabled state? This will just require a bunch of repetition.

Should we add a prop that adds these classes instead? something like:

<x-rapidez::input can-be-disabled [...]/>

instead of:

<x-rapidez::input class="disabled:border-neutral-200 disabled:bg-neutral-200 disabled:text-muted" [...]/>

This would be a lot cleaner IMO, it fixes both of the issues I have with this (inconsistency, repetition).

@royduin
Copy link
Member

royduin commented Sep 10, 2025

Maybe a input variant? Something like input.disabled?

@Jade-GG
Copy link
Contributor

Jade-GG commented Sep 10, 2025

Maybe a input variant? Something like input.disabled?

That's also something I was thinking, though maybe more like input.can-disable or something (as it's not disabled, just disable-able)

@Roene-JustBetter
Copy link
Member Author

I have checked this with @jordythevulder. We have decided that the input component won't have a visual disabled state. The input is disabled and will have a cursor-not-allowed but visual nothing will change. If you want to have the input styled like a disabled you have to add the classes on the specific input. An different variant for a disabled input feels overkill and working with props is not the best idea.

@royduin royduin merged commit 03ddaae into master Sep 24, 2025
1 check passed
@royduin royduin deleted the feature/add-disabled-colors branch September 24, 2025 09:26
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.

4 participants