Socket
Socket
Sign inDemoInstall

@material/react-fab

Package Overview
Dependencies
17
Maintainers
13
Versions
22
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @material/react-fab

Material Components React Floating Action Button (FAB)


Version published
Maintainers
13
Created

Changelog

Source

0.7.1 (2018-11-30)

Bug Fixes

  • added missing comma from golden.json (#426) (dfe44dc)
  • chips: update to v0.41.0 (#424) (e40fec6)
  • drawer: initialize foundation if props.open updates (#427) (36e6316)
  • drawer: replace focus trap with vanilla version (#437) (bd7433b)
  • drawer: update modal screenshot golden (#482) (ce0c314)
  • linear-progress: Add linear progress (#450) (f38d575)
  • select: added check for nativeControl element before calling props.setRippleCenter in NativeControl (#478) (5baad76)
  • tab-bar: set previousActiveIndex to props.activeIndex initially to avoid tab of undefined error (#428) (8e28944)
  • text-field: custom validation (#430) (f5c9c35)
  • text-field: uncomment test fixed from 0.35.0 (#404) (3a908ff)

Features

<a name="0.6.2"></a>

Readme

Source

React Floating Action Button

A React version of an MDC Floating Action Button.

Installation

npm install @material/react-fab

Usage

Styles

with Sass:

import '@material/react-fab/index.scss';

with CSS:

import '@material/react-fab/dist/fab.css';

JSX Structure

The Fab can be used with the span, i, img or svg elements. It can also be used with the Material Icon react component.

<Fab icon={<span className="material-icons">favorite</span>}/>

<Fab icon={<i className="material-icons">favorite</i>}/>

<Fab icon={
  <svg xmlns="http://www.w3.org/2000/svg" className="material-icons" viewBox="0 0 24 24">
  ...
  </svg>
  }/>

<Fab icon={<img className="material-icons" src="/images/ic_button_24px.svg"/>}/>

<Fab icon={<MaterialIcon icon="favorite"/>}/>

Props

Prop NameTypeDescription
classNameStringClasses to be applied to the root element.
minin/aEnables the mini variant.
iconElementThe icon.
textLabelStringThe label, which makes the FAB extended.

Sass Mixins

Sass mixins may be available to customize various aspects of the components. Please refer to the MDC Web repository for more information on what mixins are available, and how to use them.

Advanced Sass Mixins

Usage with Icons

Please see our Best Practices doc when importing or using icon fonts.

Keywords

FAQs

Last updated on 30 Nov 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc