Boolean
$box-disable-everything: false !default;
Boolean
$box-disable-stacked: false !default;
Boolean
$box-disable-reversed: false !default;
Boolean
$box-disable-grid: false !default;
Boolean
$box-disable-grid-columns: false !default;
Boolean
$box-disable-grid-auto-rows: false !default;
Boolean
$box-disable-phone-columns: false !default;
Boolean
$box-disable-tablet-columns: false !default;
Boolean
$box-disable-desktop-columns: false !default;
Boolean
$box-disable-large-desktop-columns: false !default;
Boolean
$box-disable-phone-min-item-size: false !default;
Boolean
$box-disable-tablet-min-item-size: false !default;
Boolean
$box-disable-desktop-min-item-size: false !default;
Boolean
$box-disable-large-desktop-min-item-size: false !default;
String
$box-default-align-items: center !default;
List
$box-align-items: (start end stretch) !default;
List
$box-justify-content: (
start center end stretch space-around space-between space-evenly
) !default;
Number
$box-gap: spacing.get-var(md) !default;
Number
$box-padding: $gap !default;
Number
$box-item-min-size: 8rem !default;
Map
$box-grids: () !default;
@use "@react-md/core" with (
$box-grids: (
small: (
min: 5rem,
),
medium: (
min: 7rem,
padding: 2rem,
gap: 0.5rem,
),
)
);
List
$box-variables: (
gap,
column-gap,
row-gap,
padding,
padding-v,
padding-h,
item-min-size,
item-min-height,
columns,
row-max-height,
auto-rows-height,
phone-columns,
tablet-columns,
desktop-columns,
large-desktop-columns,
phone-item-min-height,
tablet-item-min-height,
desktop-item-min-height,
large-desktop-item-min-height,
phone-item-min-size,
tablet-item-min-size,
desktop-item-min-size,
large-desktop-item-min-size
);
mixin
@mixin set-var($name, $value) { … }
mixin
@mixin use-var($property, $name: $property, $fallback: null) { … }
mixin
@mixin custom-grid($min: null, $padding: null, $gap: null) { … }
@use "@react-md/core";
.container {
@include core.box-custom-grid($min: 20rem, $padding: 0.25rem, $gap: 0.725rem);
}
mixin
@mixin custom-grid-class($selector, $min: null, $padding: null, $gap: null) { … }
Name | Description | Type | Default Value |
---|---|---|---|
$selector | String | — | |
$min | Number | null | |
$padding | Number | null | |
$gap | Number | null |
@use "@react-md/core";
.container {
@include core.box-custom-grid-class(
$selector: "&--custom",
$min: 20rem,
$padding: 0.25rem,
$gap: 0.725rem
);
}
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 all the styles for stacking items using
flex-direction: column
and flex-direction: column-reverse
.
Set to true
to disable all the flex-direction: row-reverse
and
flex-direction: column-reverse
styles.
Set to true
to disable the css grid behavior for the box.
Set to true
to disable the styles for the auto grid columns behavior and anything related to the $item-min-size
.
Set to true
to disable the styles for the grid-auto-rows
behavior.
Set to true
to disable the styles for the phone columns variable.
Set to true
to disable the styles for the tablet columns variable.
Set to true
to disable the styles for the desktop columns variable.
Set to true
to disable the styles for the large desktop columns variable.
Set to true
to disable the styles for the phone grid min item variable.
Set to true
to disable the styles for the tablet grid min item variable.
Set to true
to disable the styles for the desktop grid min item size variable.
Set to true
to disable the styles for the large desktop grid min item size variable
This is the default align-items
property value to set if you don't like everything being centered by default. This value is always overridable using the alignItems
prop on the Box
component.
The additional class names to create for the align-items
property. It creates classes like:
.rmd-box--align-start {
align-items: start;
}
The additional class names to create for the justify-content
property. It creates classes like:
.rmd-box--justify-start {
justify-content: start;
}
The default flex and grid gap to apply between each item
The default padding to apply to the container.
The default minimum size for each grid item
This is used to create custom reusable grid configurations throughout the app. The custom grid can be used through the gridName
prop.
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
Generates the styles for a custom grid by updating the css variables.
An optional item min size to override
An optional container padding to override
An optional gap between each item to override
Generates the styles for a custom grid by updating the css variables.
The selector to use to update the grid styles.
An optional item min size to override
An optional container padding to override
An optional gap between each item to override
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