Typography - Code
Typography component
The ix-typography component provides consistent text formatting without relying on utility classes. Theme changes apply to its text automatically.
API for ix-typography
Properties
Display text bold
boldbooleanfalseText format
format"body" | "body-lg" | "body-lg-sbold" | "body-paragraph" | "body-paragraph-sbold" | "body-sbold" | "body-sm" | "body-sm-sbold" | "code" | "code-lg" | "code-sm" | "display" | "display-lg" | "display-lg-sbold" | "display-sbold" | "display-xl" | "display-xl-sbold" | "display-xxl" | "display-xxl-sbold" | "h1" | "h2" | "h3" | "h4" | "h5" | "h5-bold" | "h6" | undefinedText color based on theme variables
text-color"caution" | "critical" | "danger" | "disabled" | "information" | "inverse" | "on-accent" | "on-caution" | "on-critical" | "on-danger" | "on-information" | "on-neutral" | "on-success" | "on-warning" | "primary" | "secondary" | "success" | "warning" | undefinedText decoration
text-decoration"line-through" | "none" | "underline"'none'Slot
Typography content.
Utility classes
The default stylesheet includes .typography-* classes for native HTML elements. If you load the foundation and a theme separately instead, import the utility stylesheet before using the classes:
@import '@siemens/ix/css/utilities.css';
<span class="typography-h3">Heading text</span>
The Sass entry point generates the same utilities:
@use '@siemens/ix/scss/utilities';
Use a supported font mixin when you need a custom class without generating all utilities:
@use '@siemens/ix/scss/mixins/fonts';
.my-class-name {
@include fonts.typography-h3;
}
See Global styles for the side effects of the complete utility layer.