Shape

How to use the shape system.

Usage

Styles

sass
@use "~@iraiser/biscuit-design-components/components/shape/styles";

Main styles

NameDefault
filled25px
shaped15px
small5px
sharped0

Theming

See the "Theming" section on theme documentation for more customization options.

Theming with CSS custom properties

Set custom styles on global...

sass
:root {
    --bdc-shape-radius: 20px;
}

...or on a specific element:

sass
.foo-button {
    --bdc-shape-radius: 20px;
}

Theming with Sass variables

Set global theme shape in your Sass file:

sass
@use "~@iraiser/biscuit-design-components/components/shape" with (
    $filled: 20px   
);

Style customization

The variable {style} in the documentation correspond with the list of styles, do not hesitate to check it for more examples!

CSS custom properties

CSS Custom propertyDescription
--bdc-shape-radiusSet the selected style.

Sass variables

VariableDescription
${style}Set the selected style value.

Sass mixins

MixinDescription
radius($radius)Set CSS border-radius property with native custom property.
"filled", "shaped", "small" (default), "sharped" or custom radius.

Usage

sass
@use "~@iraiser/biscuit-design-components/components/shape";

.foo-button {
    @include shape.radius(shaped);
}