npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-mui-speeddial-raphael-fork

v0.0.10

Published

a speed dial component for Material UI

Downloads

11

Readme

Speeddial (enhanced Floating Action button) for Material-UI

NPM

A Speed dial according to the Material Design guide. Scroll down to "Speed dial" for an introduction.

Additionally to the Google referencem this component adds optional labels beneath the action buttons.

Installation

npm i --save react-mui-speeddial-raphael-fork

Demo

Screenshot

Usage

import { SpeedDial, SpeedDialItem } from 'react-mui-speeddial';

// just some icons for illustration (example only):
import ContentAdd from 'material-ui/svg-icons/content/add';
import NavigationClose from 'material-ui/svg-icons/navigation/close';
import NewGameIcon from 'material-ui/svg-icons/av/playlist-add';
import NewPageIcon from 'material-ui/svg-icons/action/note-add';


render() {
  return (
    <SpeedDial
      fabContentOpen={
        <ContentAdd />
      }
      fabContentClose={
        <NavigationClose />
      }
    >
    
      <SpeedDialItem
        label="new game"
        fabContent={<NewGameIcon/>}
        onTouchTap={this.startNewGame}
      />
      
      <SpeedDialItem
        label="new page"
        fabContent={<NewPageIcon/>}
        onTouchTap={this.startNewPage}
      />

    </SpeedDial>
  );
 }

This shows a standard Floating Action Button (FAB) with a + icon. Once clicked, two mini FABs appear above and the main FAB transforms into a "close" icon.

<SpeedDial> props

  • open = You can use this property to manually open/close the speed dials. If not specified, then the component will control itself automatically.
  • effect = The appear/disappear effect to use during open/close. Available options are:
    • none
    • fade-staggered (default)
    • fade
    • slide
  • fabProps = props to pass to the internal <FloatingActionButton> component. Use this to style the FAB, for example.
  • fabContentOpen = children for the FAB in the closed state. This is usually an <SvgIcon> or <FontIcon> telling the user that clicking the FAB will open additional choices.
  • fabContentClose = children for the FAB in the opened state. If not specified, the value of fabContentOpen will be used instead.
  • onOpenCloseRequest = optional callback; called when the user clicks the main FAB
  • children = the children of the <SpeedDial> component should be <SpeedDialItem> instances (see below).
  • style = CSS style of the root container. Use this to position the FAB. Note that position must remain relative or absolute. You might also want to encapsulate the <SpeedDial> in a positioned parent container to avoid problems.
  • itemsPosition = show buttons above or below the main button

<SpeedDialItem> props

  • fabContent = usually a <SvgIcon> or <FontIcon> to specify the icon to display in the mini-FAB.
  • label = an optional label to display on the left of the mini-FAB. This can be a simple text or even other React components. The content is vertically aligned to the FAB.
  • onTouchTap = called when the user clicks the mini-FAB (not called when the label is clicked)
  • secondary, backgroundColor, style, iconStyle = material-ui FloatingActionButton exposed props

License

This project is licensed under the terms of the MIT license