0.15.0 • Published 5 years ago

@material/react-fab v0.15.0

Weekly downloads
859
License
MIT
Repository
github
Last release
5 years ago

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.
exitedBooleanWhen true animates the FAB out of view. When this false, the FAB will return to view.
miniBooleanEnables 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.

0.15.0

5 years ago

0.14.1

5 years ago

0.14.0

5 years ago

0.13.0

5 years ago

0.12.1

5 years ago

0.12.0

5 years ago

0.11.0

5 years ago

0.10.0

5 years ago

0.9.0

5 years ago

0.8.0

5 years ago

0.7.1

5 years ago

0.7.0

5 years ago

0.6.2

5 years ago

0.6.1

6 years ago

0.6.0

6 years ago

0.5.0

6 years ago

0.4.2

6 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago