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

[SpeedDial] Add a prop to change orientation of actions #10895

Closed
1 task done
aarontropy opened this issue Apr 3, 2018 · 7 comments
Closed
1 task done

[SpeedDial] Add a prop to change orientation of actions #10895

aarontropy opened this issue Apr 3, 2018 · 7 comments
Labels
component: speed dial This is the name of the generic UI component, not the React module!

Comments

@aarontropy
Copy link

aarontropy commented Apr 3, 2018

So, this has been discussed in
#2851
#10288
#9539
but this specific feature is not present. I'm happy to do a PR, but wanted to gauge interest and get feedback first.

  • I have searched the issues of this repository and believe that this is not a duplicate.

Current/Expected Behavior

Currently, SpeedDial orients actions above the FAB; that is, when you click on or mouseover a FAB, the actions appear above the FAB. That's great for FABs at the bottom of the page, but not so good when they are at the top. It would be nice to be able to specify which direction the actions are oriented.

I would propose adding a prop (orientation or perhaps position) of type enum. The value of the prop would determine which direction the actions appear relative to the FAB.

(sorry for the edit, I hit 'enter' and WHOOSH, the darn thing published :))

@oliviertassinari oliviertassinari added package: lab Specific to @mui/lab component: speed dial This is the name of the generic UI component, not the React module! labels Apr 3, 2018
@mbrookes
Copy link
Member

mbrookes commented Apr 3, 2018

I'm personally not a big fan of the horizontal speed-dial from a design perspective, regardless of screen position. Do you have any examples of it being used in the wild?

@aarontropy
Copy link
Author

Hmm...I don't have any examples of a horizontal speed-dial.

I'm much more interested in a vertical speed-dial, but with the actions below the FAB. I'd be happy to leave the horizontal question for another time.

@mbrookes
Copy link
Member

mbrookes commented Apr 3, 2018

I'm much more interested in a vertical speed-dial, but with the actions below the FAB.

Arguably that's just a drop-down menu, but perhaps a speed-dial is more mobile friendly? Do you want to work on it?

@aarontropy
Copy link
Author

I am happy to work it. Probably a simple first contribution.

I'm getting this from the Material ui specs here (near the bottom)
image

@mbrookes
Copy link
Member

mbrookes commented Apr 3, 2018

That example is with references to a FAB though, rather than SpeedDial.

For horizontal use, the FAB-toolbar seems to be the way to go.

I can't find any examples of a drop-down FAB, either in the spec, or in a Google image search.

@adamscybot
Copy link

The speed dial is a subtype of the FAB, they aren't separate controls. The positioning documentation in the material specs for FAB's applies to "speed dial". Though, granted, theres no specific example of a downwards orientation -- though it's sort of suggested by virtue of the positioning.

@adamscybot
Copy link

To anyone coming across this, you can actually change the orientation really easily just by applying flexDirection: 'column' to the SpeedDial (it defaults to flex-direction: 'column-reverse'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: speed dial This is the name of the generic UI component, not the React module!
Projects
None yet
Development

No branches or pull requests

4 participants