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