[RFC] Consolidate orientation
, row
and direction
props
#33770
siriwatknp
announced in
Early feedback
Replies: 3 comments 17 replies
-
Regarding the cons of the proposal, I can think of these we could weight in the decision:
What would be the output of |
Beta Was this translation helpful? Give feedback.
9 replies
-
@danilo-leal would love to have your opinion about this so that we can make it consistent for Joy UI. |
Beta Was this translation helpful? Give feedback.
3 replies
-
Personally, I would vote for:
|
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Motivation
orientation: 'horizontal' | 'vertical'
orientation: 'horizontal' | 'vertical'
orientation: 'horizontal' | 'vertical'
orientation: 'horizontal' | 'vertical'
orientation: 'horizontal' | 'vertical'
direction: 'row' | 'row-reverse' | ... | 'column-reverse'
direction: 'ltr' | 'rtl'
direction: 'left' | ... | 'down'
direction: 'left' | ... | 'down'
row: boolean
row: boolean
I have a hard time deciding which prop I should follow when developing new components for Joy UI.
orientation
prop is not intuitive for me, here is my experience of using it inSlider
component:column
orvertical
prop.orientation
It is not intuitive because what I want (the
vertical
value) should be the thing that I type first, but now I need to know what prop that makes the slider vertical 🤔.Proposal
It would be easier if I could just use
vertical: boolean
on the component:Another reason is there are only 2 values for the orientation (which is the same as
true | false
), so why don't we use boolean?Note that some component is worth using
horizontal: boolean
instead based on their default behavior, for example, the List component:Beta Was this translation helpful? Give feedback.
All reactions