Materialish

Button

A button represents that an action will occur when the user clicks or touches it.

🙌 Heads up! This code is editable. The preview above will update to reflect your changes.

Usage

import { Button } from 'materialish';
import 'materialish/materialish.css';

Props

Prop NameDefault ValueDescription
childrenThe contents that are rendered
classNameAdditional class name(s) to add to the Button
rippletrueWhether or not to display the "ripple" effect
flatfalsePass true to remove the button's background color
raisedfalseWhether or not to display a drop shadow
strokedfalsePass true to render as an outline button
nodeRefPass a ref to get access to the button element
...restOther props are placed on the underlying button element

CSS Variables

VariableDefault ValueDescription
--mt-baseFontSize1remThe text size and dimensions of the button are based off of this value
--mt-fontFamily'Roboto'The font family to use for the button text
--mt-button-backgroundColor--mt-mainColor, #2196f3The background color of primary buttons
--mt-button-textColor#fffThe foreground color of primary buttons
--mt-button-disabledTextColorrgba(0, 0, 0, 0.38)The color of disabled buttons

Useful Links