Skip to content

API

Component API

Actions

Button

TypeModifiersDefaultDescription
Sizes.small, default, .large.mediumThe size of the element.
Variantsdefault, .outlined, .tonal, .filled, .elevateddefaultThe variant to use.

Icon Button

TypeModifiersDefaultDescription
Sizes.small-The size of the element.

Toggle button group

TypeModifiersDefaultDescription
Button children& > button > svg/label, & > button.selected > svg + svg/label-Child content the buttons support.
Button size.dynamic-If enabled all button widths are made to fit their respective content.
Sizesdefault, .small, .x-small,defaultThe size to use.

Inputs

Checkbox

TypeModifiersDefaultDescription
Children.label, .supporting-text-Optional children.
Label position.stack, defaultdefaultIf applied, the label is stacked under the element.
Sizes.small, default, .largedefaultThe size of the element.
Validation.error-When applied, error styles are shown.

Field group API

TypeModifiersDefaultDescription
Children<legend>, .fields, .supporting-text, checkbox, radio, switch-Supported child elements.
Directioncolumn, .rowcolumnDecides which direction the inputs will be placed.
Disabled[disabled]-When applied, disabled styles are shown.
Validation.error-When applied, error styles are shown.

Radio

TypeModifiersDefaultDescription
Children.label, .supporting-text-Optional children.
Label position.stack, defaultdefaultIf applied, the label is stacked under the element.
Sizes.small, default, .largedefaultThe size of the element.
Validation.error-When applied, error styles are shown.

Field group API

TypeModifiersDefaultDescription
Children<legend>, .fields, .supporting-text, checkbox, radio, switch-Supported child elements.
Directioncolumn, .rowcolumnDecides which direction the inputs will be placed.
Disabled[disabled]-When applied, disabled styles are shown.
Validation.error-When applied, error styles are shown.

Select

Field API

TypeModifiersDefaultDescription
Auto-fit.auto-fit-When enabled, the element changes size depending on its content.
Children.label, <input>, <select>, <textarea>, <datalist>, .supporting-text-Optional children.
Sizes.small-The size of the element.
Validation.error-When applied, error styles are shown.
Variantsoutlined, .filledoutlinedThe variant to use.

Switch

TypeModifiersDefaultDescription
Children.label, .supporting-text-Optional children.
Sizes.small, defaultdefaultThe size of the element.
Label position.stack, defaultdefaultIf applied, the label is stacked under the Switch.
Validation.error-When applied, error styles are shown.

Textarea

Field API

TypeModifiersDefaultDescription
Auto-fit.auto-fit-When enabled, the element changes size depending on its content.
Children.label, <input>, <select>, <textarea>, <datalist>, .supporting-text-Optional children.
Sizes.small-The size of the element.
Validation.error-When applied, error styles are shown.
Variantsoutlined, .filledoutlinedThe variant to use.

Text field

Field API

TypeModifiersDefaultDescription
Auto-fit.auto-fit-When enabled, the element changes size depending on its content.
Children.label, <input>, <select>, <textarea>, <datalist>, .supporting-text-Optional children.
Sizes.small-The size of the element.
Validation.error-When applied, error styles are shown.
Variantsoutlined, .filledoutlinedThe variant to use.

Data display

Accordion

TypeModifiersDefaultDescription
Anatomy& > summary, & > .content, & > .actions-Optional wrappers for child content.
Variants.text, .elevated, .tonal, .outlined,.textThe variant to use.

Avatar

TypeModifiersDefaultDescription
Anatomy& > summary, & > .content, & > .actions-Optional wrappers for child content.
Variantsdefault, .squared, .roundeddefaultThe variant to use.

Avatar group

TypeModifiersDefaultDescription
ChildrenAvatarAvatarChildren
Spacingdefault, .gap-small, .gap-x-smalldefaultThe size to use.

Badge

TypeModifiersDefaultDescription
Alignment.start-start, .start-end, .end-start, .end-end.start-endWhere the badge should be placed over the child.
Color.error, .ok, .good, .warning-Optional colors.
VariantsDefault, .dotDefaultThe variant to use.
VisibilityDefault, .invisibleDefaultDefines if the badges visibility.

Card

TypeModifiersDefaultDescription
Children& > <hgroup>, & > .content, & > .actions-Optional wrappers for child content.
Variants.text, .outlined, .tonal, .elevated.textThe variant to use.

Chip

TypeModifiersDefaultDescription
Containerdiv.chip, a.chip, button.chip-Container element type.
Children& > .text, & > svg-Optional child content.
Sizes.small, default, .multilinedefaultThe size to use.
Variants.tonal,.outlined.tonalThe variant to use.

Definition list

TypeModifiersDefaultDescription
Bordereddefault, &.dotted-Optional horizontal rule style

List

TypeModifiersDefaultDescription
Denseul.dense-When enabled list appears tighter packed
Gutterlessul.gutterless-When enabled list inline padding is removed
Borderedul.bordered-When enabled a border is rendered on all list items

List item

TypeModifiersDefaultDescription
Main partsli > .start, li > .text, li > .end-Building blocks in List item
Insetli.inset-When enabled a list item without a start icon algins with items that do
Border topli.border-top-When enabled the list item will get a top border

Table

TypeModifiersDefaultDescription
Dense.dense-When applied the table will appear denser.
Sticky header.sticky-header-When applied the table's <thead> will be sticky.

Tooltip

hej

Feedback

Alert

TypeModifiersDefaultDescription
Children& > .content, & > svg-Optional child content.
Severitiesneutral, .error, .ok, .warningneutralThe severity to use.
Variants.tonal, .outlined.tonalThe variant to use.

Dialog

A <dialog> element on its own doesn't do much. It's recommended to use it in combination with the card component.

See Card API

Progress

Snackbar

TypeModifiersDefaultDescription
Absolute.absolute, .visible-Optional classes needed for absolute positioning.
Actions& > .actions > <action button> / <icon button>-Optional action.
Container.snackbar-Container element.
Children& > .content, & > .actions-Optional child content.
Position.top-left, .top-center, .top-right, .bottom-left, .bottom-center, .bottom-right.bottom-leftDetermines where the Snackbar is positioned.

Spinner