Boolean
$button-disable-everything: false !default;
Boolean
$button-disable-text: false !default;
Boolean
$button-disable-icon: false !default;
Boolean
$button-disable-icon-square: false !default;
Boolean
$button-disable-contained: false !default;
Boolean
$button-disable-contained-pressed-elevation: false !default;
Boolean
$button-disable-contained-interaction-colors: interaction.$light-surface-base-background-color
== interaction.$dark-surface-base-background-color !default;
Boolean
$button-disable-floating: false !default;
Boolean
$button-disable-floating-absolute-position: false !default;
Boolean
$button-disable-circular-progress: progress.$disable-circular !default;
Boolean
$button-disable-async: $disable-circular-progress !default;
Boolean
$button-disable-unstyled-utility-class: false !default;
Number
$button-text-border-radius: border-radius.get-var(sm) !default;
Number
$button-text-horizontal-padding: spacing.get-var(md) !default;
Number
$button-text-vertical-padding: spacing.get-var(none) !default;
Number
$button-text-min-height: 2.25rem !default;
Number
$button-text-min-width: 4rem !default;
Number
$button-text-icon-size: 1.125rem !default;
Number
$button-icon-border-radius: border-radius.get-var(full) !default;
Number
$button-icon-square-border-radius: $text-border-radius !default;
Number
$button-icon-size: auto !default;
Number
$button-icon-small-size: icon.$size - 0.25rem !default;
Number
$button-icon-large-size: icon.$size + 0.25rem !default;
Number
$button-icon-font-size: icon.$size !default;
Number
$button-icon-padding: 0.5em !default;
Number
$button-contained-elevation: 2 !default;
Number
$button-contained-pressed-elevation: 4 !default;
Color
$button-clear-contained-background-color: theme.$light-theme-surface-color !default;
Color
$button-clear-contained-color: a11y.contrast-color(
$clear-contained-background-color
) !default;
Number
$button-circular-progress-size: icon.get-var(size) !default;
Number
$button-floating-margin: spacing.get-var(lg) !default;
Number
$button-floating-z-index: utils.$temporary-element-z-index !default;
Number
$button-floating-absolute-z-index: 5 !default;
Number
$button-floating-positions: (
tl: (
left: $floating-margin,
top: $floating-margin,
),
tr: (
right: $floating-margin,
top: $floating-margin,
),
bl: (
bottom: $floating-margin,
left: $floating-margin,
),
br: (
bottom: $floating-margin,
right: $floating-margin,
),
) !default;
List
$button-variables: (
background-color,
color,
border-radius,
contained-background-color,
contained-color,
text-horizontal-padding,
text-vertical-padding,
text-min-height,
text-min-width,
text-border-radius,
icon-size,
icon-padding,
icon-font-size,
icon-border-radius,
icon-square-border-radius,
fab-offset
);
mixin
@mixin set-var($name, $value) { … }
mixin
@mixin use-var($property, $name: $property, $fallback: null) { … }
mixin
@mixin unstyled($hoverable: false, $css-modules: false, $box-shadow: interaction.$focus-box-shadow) { … }
Name | Description | Type | Default Value |
---|---|---|---|
$hoverable | Boolean | false | |
$css-modules | Boolean | false | |
$box-shadow | Boolean | interaction.$focus-box-shadow |
@use "@react-md/core";
.button {
@include core.button-unstyled($hoverable: true, $css-modules: false);
}
mixin
@mixin text-styles { … }
@use "@react-md/core";
.button {
@include core.button-text-styles;
align-items: center;
border-width: 0;
display: inline-flex;
flex-shrink: 0;
justify-content: center;
}
mixin
@mixin variables { … }
mixin
@mixin styles($disable-layer: false) { … }
function
@function get-var($name, $fallback: null) { … }
String
Set to true
to disable all the styles
Set to true
to disable the text button styles
Set to true
to disable the icon button styles
Set to true
to disable the icon-square button styles
Set to true
to disable the contained button styles
Set to true
to disable the contained with pressed elevation button styles
Contained buttons should normally always force dark background colors for the interaction states This means use the default light theme since it is based off of the root background color.
Set to true
to disable the floating button styles
Set to true
to disable the floating button position: absolute
styles
Set to true
to disable updating the circular progress size within buttons
Set to true
to disable the async button styles
Set to true
to disable .rmd-button-unstyled
utility class
The default border radius to apply to text buttons
The default horizontal padding to apply to text buttons
The default vertical padding to apply to text buttons
The default min-height to apply to text buttons
The default min-width to apply to text buttons
The default size to set icons that appear as children of text buttons
The default border radius to apply to icon buttons
The default border radius to apply to square icon buttons
The default height and width of icon buttons. This default value makes them responsive based on the current font size.
The default icon button small size
The default icon button large size
The default icon button font size which is used to update the total size of the button as well.
The default padding for icon buttons. The icon button size is determined by adding the padding to the icon size.
The default material design elevation for the contained button theme. This should be a number from 0 - 24.
The default material design elevation for the contained button theme while pressed. This should be a number from 0 - 24.
The default background color to apply to contained buttons while the theme is set to clear
The default text color to apply to contained buttons while the theme is set to clear
The default size for circular progress components that appear as a child of a text button
The default viewport margin for a floating action button
The default z-index for a floating action button
The default z-index for an absolute positioned floating action button. This should be a number lower than the $app-bar-fixed-z-index
.
The default floating action button positions and their margin styles.
The available configurable css variables and mostly used internally for the
get-var
, set-var
, and use-var
utils.
The supported variable name
The value to set the variable to. Supports null
which will just be a no-op.
The css property to apply the variable to
The supported variable name
An optional fallback value if the variable has not been set
Used to create button that does not have the default browser button styles
Pass-through to
interaction.surface($hoverable)
Pass-through to
interaction.surface($css-modules)
Pass-through to interaction.surface($box-shadow)
Used to apply the text button styles to an element and most likely an internal only mixin.
Conditionally applies the css variables based on feature flags
Generates all the styles based on feature flags.
Set this to true
to disable the layer behavior
a var()
statement
The supported variable name
An optional fallback value