# Siemens Industrial Experience > Siemens Industrial Experience This file contains all documentation content in a single document following the llmstxt.org standard. ## 3D chart import EchartsSpecial3dPlayground from '@site/docs/autogenerated/playground/echarts-special-3d.mdx'; # 3D Chart - Code The `echarts-gl` package extends ECharts to support 3D visualizations. With this package, you can design a variety of 3D charts, including: - 3D scatter plots - 3D bar charts - 3D surface plots ## Basic ## 3D-Charting To use 3D charts, import the `echarts-gl` package into your project: ```typescript import 'echarts-gl'; ``` ## Dos and Don’ts Do use with data that's best seen and interpreted in multiple dimensions Don’t use 3D charts for simple data that can be effectively represented with 2D charts Don’t overuse 3D charts as they can make the data harder to interpret --- ## About and legal - Code import PropsApi from '@site/docs/autogenerated/api/ix-menu-about/api.mdx'; import AboutAndLegalPlayground from '@site/docs/autogenerated/playground/about-and-legal.mdx'; # About and legal - Code ## Basic ## Change language of legal links Supported language codes are `'global/en' | 'global/es' | 'de/de' | 'cn/zh'` --- ## About and legal - Usage The About and legal component appears when users click on the "About and legal" item (1) and overlays the current content. Closing this overlay brings users back to the original content. ![About and legal overlay](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=7072-40744&t=PwyZur5dxqEH6cfd-4) 1. Application menu item - info 2. Content header 3. Close button 4. Tabs 5. Changeable content ## Options - **Tabs:** Use tabs with meaningful labels to separate content into categories. - **Label:** Title that is shown in the content header. We recommend using the default "About & legal information" wording. - **Content:** Add information about the application, e.g. version, author, copyright. It can also include legal information, e.g. terms of service, privacy policy. ## Behavior Overlay opens on top of application content with a semi-transparent background with a background blur effect to emphasize the overlay character. Closing this overlay brings users back to the previous content. The overlay can be closed in three ways: - Select the close button. - Click the info icon again. - Click another navigation item. When the navigation menu is collapsed, the overlay stays open. :::info The About and Legal components require specific content to comply with Siemens AG regulations. The official content and guidelines are exclusively available for Siemens AG employees and can be accessed [here](https://code.siemens.com/siemens-ix/ix-brand-theme/-/blob/main/apps/documentation/src/pages/about-legal-information.md?ref_type=heads). ::: --- ## AI message - Code import ChatAiMessagePlayground from '@site/docs/autogenerated/playground/chat-ai-message.mdx'; import PropsApi from '@site/docs/autogenerated/api/ix-chat-ai-message/api.mdx'; # AI message - Code ## Basic --- ## AI message - Usage AI messages display a single assistant response inside a conversational thread. We recommend using them for answers users need to read, review and act on. ![AI message anatomy](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=7959-520&t=8Rj3ErabF16Vm3lH-4) 1. Content 2. Actions ## Options - **Content:** Keep the response easy to scan by structuring it (see [content guidelines](../../guidelines/conversational-design/overview.md)). - **Actions:** Add only message-level actions that users expect after reading, e.g. copy, rate response quality or regenerate. We recommend using subtle tertiary [icon buttons](../icon-button) so actions stay available without competing with the answer. - **Sources:** If the response is grounded in files, web results or internal data, expose that provenance close to the message content. Only display if there are dedicated sources to show. ## Behavior in context - **Responsiveness:** AI messages use from 45 to 80% of the chat's container width, depending on the viewport width. ## Dos and Don’ts - Do show clear [loading indicators](../spinner/) while the assistant is generating responses (see [wording guidelines](../../guidelines/conversational-design/essentials/wording-terms.mdx#response-progress-indicator)) - Do use the same actions for each AI message for consistency, but not more than 4 to avoid overloading users, e.g. copy, feedback, regenerate - Do add thumbs up or down actions only if you are aligned with data protection guidelines ## Related - [Chat](../chat) - [User message](../user-message) - [Chat input](../chat-input) - [Conversational design guidelines](../../guidelines/conversational-design/overview.md) --- ## Application - Code import PropsApi from '@site/docs/autogenerated/api/ix-application/api.mdx'; import ApplicationPlayground from '@site/docs/autogenerated/playground/application.mdx'; import ApplicationBreakpointsPlayground from '@site/docs/autogenerated/playground/application-breakpoints.mdx'; import ApplicationAppSwitchPlayground from '@site/docs/autogenerated/playground/application-app-switch.mdx'; import ApplicationAdvancedPlayground from '@site/docs/autogenerated/playground/application-advanced.mdx'; # Application - Code ## Basic The code snippet below shows an example of a combination of different components, like `ix-application-header` or `ix-content`. ## Breakpoints ## Application Switch The navigation to another application is implemented via `window.open` (https://developer.mozilla.org/en-US/docs/Web/API/Window/open). Therefore you can control if the navigation should happen inside the current browser context `target: '_self'` or inside a new tab `target: '_blank'` (more information about target can be found [here](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#target)) ```javascript { id: 'demo-app-2', name: 'Calculator App', description: 'Example description for Calculator App', iconSrc: '...url to some icon', url: '...target url', target: '_self', // Define the navigation context (e.g current browser context or new tab) } ``` ## Application Advanced --- ## Application - Usage Application is a technical and infrastructural component without a direct visual appearance. It lays out the top-level app elements like the [header](/docs/components/application-header/guide.md). The application component acts as a centralized hub for configuring aspects of your web application, such as screen breakpoints, theming and app switch configuration. By consolidating these configuration points, it simplifies the management of application-wide settings and ensures a consistent user interface across different scenarios. The component itself is designed with modularity in mind. It can be seamlessly integrated with other components such as [application header](/docs/components/application-header/guide.md), [application menu](/docs/components/application-menu/guide.md), [content](/docs/components/content/guide.md) and more. This modular approach allows you to mix and match components based on your specific application requirements, providing flexibility and customization options. It's important to note that the application component focuses solely on layouting and does not dictate visual design. ## Application example ![Application example](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=6694-51419&t=bGky2tHjBPC9fOGT-4) 1. [Application header](/docs/components/application-header/guide) 2. [Application menu](/docs/components/application-menu/guide) 3. [Content](/docs/components/content/guide) ## Application switch ![Application switch and modal](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=1665-19417&mode=design&t=I0iEEuzKJJPK4Sum-11) 1. Application switch button opens the modal 2. Application switch modal with a list of applications 3. Current application 4. Link to another application with icon, name and optional description 5. Indicator "open in a new browser tab" 6. Close icon With the application switch, users can navigate across applications. The interaction control – the application switch button (1) – is in the [application header](../application-header). Clicking the button opens a modal (2) with a list of available applications your users can switch to. This list is technically defined in the application component and its content depends on your product strategy. Our lists typically contain applications belonging to a software suite, applications with a similar scope or applications a user has purchased. Clicking the current application closes the modal. Clicking another application closes the modal and opens the target application in the same or in a new browser tab, depending on the defined target option. Switching between browser tabs is much faster than loading the applications each time in the same browser tab, however, switching between multiple browser tabs could confuse users. We typically avoid opening the same application in multiple browser tabs. Instead, we recommend switching to the browser tab where the application is already open. Nonetheless, be aware this does not work under all circumstances and some browsers cannot support this feature. ## Options - **forceBreakpoint:** Forces a specific breakpoint "lg", "md" or "sm". This can be used to force a specific application behavior that ignores the current browser viewport width. ## Behavior The application component automatically adapts, by default, to three breakpoints and changes the application layout accordingly: - "lg" for large screens (min-width 62em) - "md" for medium screens (min-width 48em) - "sm" for small screens (min-width 36em) --- ## Application header - Code import PropsApi from '@site/docs/autogenerated/api/ix-application-header/api.mdx'; import ApplicationHeaderPlayground from '@site/docs/autogenerated/playground/application-header.mdx'; # Application header - Code The application-header can host custom content which will be displayed on the far right side of the header. ## Basic ## Avatar Enhance the interactivity of your application-header by placing the avatar component as part of the content. This not only makes the avatar clickable, but also enables the addition of dropdown-item's directly within the avatar component. --- ## Application header - Usage In its simplest version, application headers only show the company logo and the application name. ![Application header simple](https://www.figma.com/file/wEptRgAezDU1z80Cn3eZ0o?type=design&node-id=6427%3A39093&mode=design) 1. Company logo 2. Application name The **company logo** (1) identifies the brand. For Siemens applications, the Siemens logo with the brand theme is the default combination. Contractual agreements may allow partner logos under certain conditions. The logo adapts its width automatically, height remains fixed. It is colored at runtime based on the selected theme if the following prerequisites are met: - Logo is provided as SVG - Color of SVG elements are set to `currentcolor` Without meeting these prerequisites, the logo appears without any color adaption. The **application name** (2) shows the official name of the application. Its width adjusts dynamically but may be truncated if space is limited by other header elements. ## Options The app header component offers great flexibility through optional elements, but each addition should be considered carefully. Adding too many elements can reduce usability and introduce challenges, especially regarding responsiveness and overflow behavior. We recommend keeping the header clean and lean. ### Avatar ![Avatar and avatar dropdown](https://www.figma.com/file/wEptRgAezDU1z80Cn3eZ0o?type=design&node-id=6427%3A39231&mode=design) 1. User avatar 2. Avatar dropdown The avatar indicates the currently logged in user and provides access to user-related actions. Its position in the application header ensures visibility of security-relevant information across all breakpoints. Clicking the avatar opens a dropdown with additional user information and actions such as log out or user profile. If the application does not support multiple users or user profiles, do not use the avatar. For applications that allow usage without login, consider alternative approaches: - Show a login button in the [slot for additional elements](#slot-for-right-aligned-content) and hide the avatar - Display the avatar with a placeholder image and provide login-related information and actions in the dropdown ### Application switch ![Application switch](https://www.figma.com/file/wEptRgAezDU1z80Cn3eZ0o?type=design&node-id=6427%3A39460&mode=design) Use the application switch (see [application](../application)) to launch and navigate between related applications. Clicking the application switch (1) opens a modal (2) with a list of available applications. ### Application icon ![Application icon](https://www.figma.com/file/wEptRgAezDU1z80Cn3eZ0o?type=design&node-id=6427%3A39393&mode=design) The application icon (1) is a non-interactive visual element placed in the header to represent the application. It is displayed within a fixed size and uses a defined border radius. The standard web image formats are supported. The provided image is scaled if necessary while maintaining the aspect ratio. An optional outline (2) can be added to visually separate the icon from the background when needed. It should only be used when contrast or clarity requires it. ### Suffix for application name ![Application name suffix](https://www.figma.com/file/wEptRgAezDU1z80Cn3eZ0o?type=design&node-id=6427%3A39713&mode=design) The application name suffix (1) appears to the right of the application name. It provides additional information or context. For Siemens applications, we use it for contractually regulated additions in partner branding scenarios, e.g. "powered by Siemens". ### Slot for right-aligned content ![Slot](https://www.figma.com/file/wEptRgAezDU1z80Cn3eZ0o?type=design&node-id=6427%3A39744&mode=design) The slot (1) provides space for placing functions and information aligned to the right side of the application header. We use this slot for high-level information or actions impacting the application context, e.g. mode switching. We typically use the slot for: - Log in button, if the application runs without a logged-in user - Changing the top-level data context like environment, workspace, or tenant - Displaying important contextual information, e.g. local times in remote access scenarios - Access to application-wide actions like global search Overflow behavior is not handled automatically. At breakpoint sm, the slot collapses and its content becomes accessible via an overflow icon. See [behavior](#behavior) for details. ### Secondary slot for left-aligned content ![Secondary slot](https://www.figma.com/file/wEptRgAezDU1z80Cn3eZ0o?type=design&node-id=6427%3A39911&mode=design) The secondary slot (1) allows the placement of functions aligned to the left side of the application header. We typically use the secondary slot for: - Lean elements such as toolbars, which offer compact access to key actions and can be easily adapted for overflow behavior. - While primary navigation tabs can also be placed here, they consume more space and are less flexible in responsive layouts. Overflow behavior is not handled automatically. At breakpoint sm, the slot collapses and its content becomes accessible via an overflow icon. See [behavior](#behavior) for details. ### Borderless ![Borderless](https://www.figma.com/file/wEptRgAezDU1z80Cn3eZ0o?type=design&node-id=6427%3A40378&mode=design) The borderless option sets the existing bottom border (1) of the header to a transparent color. Using the same background color, this creates a visual connection between the header and the following element, making them appear as a unified block. ### Window controls ![OS specific window controls](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=6599-45912&t=07oqeGxwT0wAyLin-11) If the applications runs in a desktop framework like Electron, we recommend the following approach to avoid an additional OS-specific window header above the application header: - Place a container (2) beside the actual application header (1), while considering the OS specifics. - Place the window controls inside and consider applying the OS specific style and behavior. - Use same height, background and border properties for this container. ### Framework header If the application is hosted inside a framework that comes with its own header, you can omit the entire application header to avoid having two headers on top of each other. The framework’s header then provides the brand identity, the application name and other information. ## Behavior The header automatically adapts the breakpoints defined in the [application](../application) layout. ![Application header at breakpoints lg/md and sm](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=6427-40565&t=S6lUQ3W9x7i87i8E-4) At breakpoints "lg" and "md" the application header remains unchanged, truncation applies to the application name (1). When its minimum width is, reached truncation is applied to the secondary slot. At breakpoint "sm" the layout changes in the following way: - The application menu is hidden and replaced by a menu icon (2) in the header, clicking it opens the menu. - The company logo and a possibly used application name suffix is not shown. - If the application switch (3) is used, it moves to the application menu. - If slots are used, their elements move into dedicated sections in the overflow dropdown (4), accessible via the overflow icon (5). - If the manual overflow slot is used, its content appears at lowest position within the overflow dropdown (7). ### Manual overflow menu - The overflow slot can be manually filled to trigger the overflow menu at any breakpoint. - When content is placed in the manual overflow slot, the overflow button appears even at medium (md) and large (lg) viewports. - This allows intentional placement of elements into the overflow menu (6), independent of automatic breakpoint behavior. ## Dos and Don’ts Do align other slot usages for Siemens applications with our team to keep a consistent look and feel Do use the avatar dropdown for actions related to the current logged in user Do test layout behavior at all breakpoints to ensure content remains accessible Don’t overload the slots with too many elements to avoid losing clarity and hierarchy Don’t use the avatar if your application does not support user profiles Don’t rely on automatic overflow handling for complex layouts, instead reduce complexity --- ## Application menu - Code import PropsApi from '@site/docs/autogenerated/api/ix-menu-settings/api.mdx'; import MenuPropsApi from '@site/docs/autogenerated/api/ix-menu/api.mdx'; import ItemPropsApi from '@site/docs/autogenerated/api/ix-menu-item/api.mdx'; import CategoryPropsApi from '@site/docs/autogenerated/api/ix-menu-category/api.mdx'; import AvatarPropsApi from '@site/docs/autogenerated/api/ix-menu-avatar/api.mdx'; import AvatarItemPropsApi from '@site/docs/autogenerated/api/ix-menu-avatar-item/api.mdx'; import VerticalTabsPlayground from '@site/docs/autogenerated/playground/vertical-tabs.mdx'; import MenuCategoryPlayground from '@site/docs/autogenerated/playground/menu-category.mdx'; import MenuWithBottomTabsPlayground from '@site/docs/autogenerated/playground/menu-with-bottom-tabs.mdx'; # Application menu - Code ## Basic ## 2nd navigation level ## Bottom tabs Caution: Since the old implementation using the bottom property on menu items had some problems and will not work anymore, please use slot="bottom" instead. --- ## Application menu - Usage The navigation menu is an essential part of your application. It offers a way to directly navigate to the main application parts and it can give your users access to legal and version information, and access to settings. ![Navigation menu collapsed and expanded](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=990-122297&t=ePzRHLjXBksLOgto-4) 1. Expand/collapse icon button 2. Main navigation section 3. Bottom section 4. Selected item 5. Item with notification 6. Second level navigation menu 7. [Settings](../settings) 8. Toggle theme 9. Custom item 10. [About & legal](../about-and-legal) ## Options - **Navigation menu:** - **Enable settings:** Show the settings item in the bottom section which opens the [settings](../settings) overlay. - **Enable toggle theme:** Use the option to offer your users an easy and direct way to toggle between light and dark themes. We typically don’t use it when dedicated theme settings are available elsewhere e.g. in the [settings](../settings) overlay. - **Menu items and menu category:** - **Notifications:** Display a number at the top right corner of the icon. - **Icon:** Define an icon for an item. We recommend to using icons in submenu items rarely since they often don’t add any value. - **Label:** Define the name of the menu item or menu category which is visible when the navigation menu is expanded. - **Selected:** Mark a menu item as selected which highlights it in the navigation menu. - **Tooltip text:** By default, the tooltip will show the label of the menu item or menu category. Override it with custom text to give additional context if the label alone is not sufficient. ## Behavior in context ![Navigation menu overflow behavior](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=1013-68267&mode=design&t=RG8M7S3eIKxiDqv5-11) - Navigation menu expands and collapses with a transition. - The width of the collapse and expand state are fixed and cannot be configured. - The number of menu items can overflow with a vertical scroll, this is recognizable by the shadow at the bottom and/or top. - On hover, a tooltip is shown that displays the label of the menu item or menu category by default. - Items in the bottom section do not navigate away from the current content. They either toggle states, e.g. light and dark mode, or open a layer over the current content. This means users do not lose their current workflow by interacting with these items. ## States The application menu has two states: collapsed and expanded. The appearance of the states varies between screen sizes. ## Dos and Don’ts Do use icons in second-level navigation items when it helps users to better understand and recognize them Do use a custom tooltip text if the label is so long that it gets truncated or needs additional context Don’t mix menu items with and without icons within a second-level navigation category Don’t place non-navigational items in the navigation section Don’t place navigation items in the bottom section as items in the bottom section must not navigate away from the current context --- ## Avatar - Code import PropsApi from '@site/docs/autogenerated/api/ix-avatar/api.mdx'; import AvatarPlayground from '@site/docs/autogenerated/playground/avatar.mdx'; import AvatarInitialsPlayground from '@site/docs/autogenerated/playground/avatar-initials.mdx'; import AvatarImagePlayground from '@site/docs/autogenerated/playground/avatar-image.mdx'; import ApplicationHeaderPlayground from '@site/docs/autogenerated/playground/application-header.mdx'; # Avatar - Code ## Basic ## Initials ## Image ## Header You can also add the avatar to the header, which will turn it into a clickable button. --- ## Avatar - Usage Avatars are visual or textual representations of individual identities, most often used to represent users logged into a system. Identity providers or user management systems usually provide identity information, and the amount of information provided varies from system to system. The avatar component offers different options to handle this. ## Options ![Avatar overview](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=963-565&mode=design&t=M9CowfOcGyqnSycV-4) | Option | Description and usage | | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Default (1) | Without any option set, the visual is just a predefined placeholder graphic. It can be used when identity information is unavailable or cannot be used for other reasons. | | Initials (2) | Shows a string of one or two characters. Can be used when only textual information is available. Examples: A user’s initials (JD for John Doe) or the first character from the username (J for johndoe) | | Image (3) | Shows an image. Can be used when identity information includes an image | ## Behavior The avatar is a display-only component with no further interactions. Images provided are proportionally scaled to fill the content. A circle shape clips the image. All image formats that browser engines support can be used. ## Dos and Don’ts ![Avatar dos and don‘ts](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=975-13&mode=design&t=SxUA6AcHswBAiIzi-4) Don't use more than 2 characters when using the "Initials" option --- ## Badge - Code import PropsApi from '@site/docs/autogenerated/api/ix-badge/api.mdx'; import BadgePlayground from '@site/docs/autogenerated/playground/badge.mdx'; import BadgeCounterPlayground from '@site/docs/autogenerated/playground/badge-counter.mdx'; import BadgeLabelPlayground from '@site/docs/autogenerated/playground/badge-label.mdx'; import BadgeDotPlayground from '@site/docs/autogenerated/playground/badge-dot.mdx'; import BadgeStatusIconPlayground from '@site/docs/autogenerated/playground/badge-status-icon.mdx'; # Badge - Code ## Basic ## Counter ## Label ## Dot ## Status icon --- ## Badge - Usage Badges are non-interactive visual aids for status, counters and notification cues. We recommend badges when users need a compact signal next to another element or a lightweight standalone status cue. ![Badge anatomy](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=8141-4052&t=v625YpvIn3UzoFuJ-4) 1. Badge of type `label` as standalone 2. Badge of type `counter` 3. Badge of type `dot` 4. Badge of type `status icon` 5. Anchor element Badges work **standalone** or **attached** to an anchor that represents the related information. As a general rule, we use badges for dynamic status or notification information and [chips](../chip) when users need to interact with the item. ## Types Badge types define how the indicator appears: - **Counter (default):** Use for notifications that need attention, with integers up to two digits (for larger values). - **Label:** Use for a readable status, e.g. "Online" or "Offline" in a list. - **Dot:** Use when only the presence of new information matters, e.g. for a compact notification that needs attention without a count. - **Status icon:** Use for showing statuses or notifications that are recognizable by icon alone. ## Variants Semantic color variants communicate clear meanings: ![Badge variants](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=8141-4066&t=v625YpvIn3UzoFuJ-4) - **Primary:** Highlight new features or exploratory information. - **Alarm:** Show negative values, removals or high-urgency counts, e.g. critical equipment faults or imminent system failures. - **Critical:** Emphasize severe conditions that require strong attention. - **Warning:** Call attention to information that requires caution, e.g. pending actions. - **Info:** Draw attention to new or updated information or informative numeric data. - **Success:** Show positive values or additions, e.g. growth metrics. - **Neutral:** Use for general-purpose information that doesn’t carry semantic meaning. - **Custom:** Set an explicit background and badge color when you need a product-specific palette. We recommend matching icons on label badges to the meaning of the chosen color. Prefer outlined styles when you need lower visual emphasis on busy surfaces. :::info Use standalone label badges to replace deprecated [pills](../pill) usages, e.g. compact statuses or categories. ::: ## Options ![Badge options](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=8161-118&t=OTo6nDmRwFCU9cVf-4) - **Placement:** Use inline (standalone) to show an entity’s status in a list. With an anchor, we typically use `top after` for notifications that need attention and `bottom after` for status on individual elements, e.g. user presence. - **Label:** We usually show the full status name and use max-width to control lengthy labels. Keep labels short to avoid truncation. - **Outline:** Intended for lower visual emphasis on standalone badges. On status icons, outline selects the outline glyph. - **Border:** Add a high-contrast border on filled badges when the surface behind them is busy. Not applicable to outline badges. - **Offset:** Keep the indicator close to the anchor without covering it fully and without leaving the parent's visual bounding box, e.g. round elements like avatars need larger negative offsets. - **Pulse animation:** Use only for immediate, urgent attention. It loops until explicitly disabled. Note that `prefers-reduced-motion` settings might override this. - **Custom colors:** With the custom variant, set background and badge color together so contrast stays readable. - **Tooltip text**: For standalone badges, provide a specific text to be displayed as the [tooltip](../tooltip) or set the attribute without a specific value to display the badge's text content (see [writing guide](../../guidelines/language/messaging/tooltips)). ## Behavior in context ![Badge behavior](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=8173-214&t=OTo6nDmRwFCU9cVf-4) - **Overflow:** - Label badges: If a max-width is applied, label is truncated. - Counter badges: If more than 2 digits are entered, label shows "99+". - **Container and overlapping:** An attached badge overlaps the anchor at its edge without extending the parent’s bounding box. This placement leaves the anchor recognizable and its critical content visible, e.g. the icon that identifies a notification button. - **Screen readers:** Labels of standalone badges are read by screen readers. Attached badges are read as part of their anchor’s accessible name. ## States Badges are read-only. They don't have hover, active or disabled states, but standalone badges support text selection. ## Dos and Don’ts Do provide an accessible name for dot and status icon badges by using `aria-label` on the anchor when attached, or on the badge when standalone Do prefer dot or status icon badges over long labels in compact layouts Do keep badges synchronized with the underlying notification state, e.g. update or remove them when users read notifications Do include the badge meaning in the accessible name of its anchor Do announce meaningful dynamic updates while considering cognitive load on the user Do keep the badge inside the parent and leave enough of the anchor visible Don’t make badges interactive, use [chips](../chip) when users need to click or dismiss Don’t use color alone to convey meaning without supporting text or ARIA on the host or anchor Don’t rely on pulse animation for long-running or low-priority hints Don’t place essential primary content only in a badge ## Related - [Pill](../pill) - [Chip](../chip) - [Popover](../popover) - [UX writing basics](../../guidelines/language/basics/voice-and-tone) - [Accessibility](../../guidelines/accessibility) --- ## Bar chart import EchartsBarSimplePlayground from '@site/docs/autogenerated/playground/echarts-bar-simple.mdx'; import EchartsBarHorizontalStackedPlayground from '@site/docs/autogenerated/playground/echarts-bar-horizontal-stacked.mdx'; # Bar chart - Code ## Basic Common bar charts normally compare the values of different categories where the length of the bars are proportional to their values. ## Stacked bar chart Stacked bar charts are typically used to visualize the relationship between the parts and the whole. Each bar is divided into segments, with each segment representing a different category. ## Dos and Don’ts Do start the Y-axis at zero and label axes clearly Do use short and clear category names Do include context and additional information when necessary Do arrange categories and bars in a logical order Don’t use too many bars in one chart Don’t overcrowd charts with colors and categories, especially the stacked variant Don’t use stacked bars if the total value is not important --- ## Blind - Code import { SinceTag } from '@site/src/components/UI/Tags'; import PropsApi from '@site/docs/autogenerated/api/ix-blind/api.mdx'; import BlindPlayground from '@site/docs/autogenerated/playground/blind.mdx'; import BlindHeaderActionsPlayground from '@site/docs/autogenerated/playground/blind-header-actions.mdx'; import BlindVariantsPlayground from '@site/docs/autogenerated/playground/blind-variants.mdx'; # Blind - Code ## Basic ## Header actions ## Variants --- ## Blind - Usage Blinds are UI controls that allow the users to hide or reveal content by clicking on a control element. Blinds can display a large amount of content in a compact space or present information in an organized and hierarchical way. Blinds reduce the user's cognitive load by removing clutter and less important information from an interface. We typically don’t use blinds if the content is central to the user's task due to its reduced visibility and accessibility. Blinds consist of a header section on the top and a content section below. The header section contains a chevron on the left followed by the blind's label. Within the content section, content can be placed freely. ![Blind overview](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=2-2&mode=design&t=9faEnH99BaAxqCGM-1) 1. Header section 2. Content section ## Types Multiple blinds can be placed below each other to create an accordion. The recommended distance between the blinds is `0.5rem`. Typically, only one blind can be opened within an accordion but users can be allowed to open multiple blinds at a time. ![Accordion](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=2-655&mode=design&t=9faEnH99BaAxqCGM-1) ## Variants Multiple blind variants are available: - **Filled**: Default variant - **Outline**: Variant for lower visual emphasis - **Primary**: Variant for high visual emphasis - **State-related variants**: Alarm, critical, warning, success, info, neutral ![Blind variants](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=929-47485&mode=design&t=9faEnH99BaAxqCGM-1) ## Options - **Icon**: Blinds can, but don’t have to, include an icon in the header section. The icon is positioned before the blind label. - **Sublabel**: A secondary label can be placed within the header section. The sublabel gives additional information about the blind's content. - **Header action**: The header section can contain an action area. We typically use the action area to include one or two buttons for actions directly related to the blind, e.g. to delete the blind or to navigate to additional content. ## Behavior in context The user expands and collapses the blind by pressing anywhere in the header section. When the blind is expanded, content below the blind is moved downwards. ## States For all blind variants, a default, hover, active and focused state is available. ![Blind states](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=2-352&mode=design&t=9faEnH99BaAxqCGM-1) ## Dos and Don’ts Do stay within the recommended number of blinds - between 3 and 7 Don’t use multi-line text in the header. The header section has a fixed height for single-line text entries Don’t change the position of the chevron icon and the blind's label in the header Don’t use a blind if there is only a single category to be displayed Don’t use blinds to display hierarchically structured files or objects - rather use a tree for such cases ## Related - [Tabs](../tabs) - [Tree](../tree) - [Workflow](../workflow) --- ## Breadcrumb - Code import PropsApi from '@site/docs/autogenerated/api/ix-breadcrumb/api.mdx'; import ItemPropsApi from '@site/docs/autogenerated/api/ix-breadcrumb-item/api.mdx'; import BreadcrumbPlayground from '@site/docs/autogenerated/playground/breadcrumb.mdx'; import BreadcrumbTruncatePlayground from '@site/docs/autogenerated/playground/breadcrumb-truncate.mdx'; import BreadcrumbNextItemsPlayground from '@site/docs/autogenerated/playground/breadcrumb-next-items.mdx'; # Breadcrumb - Code ## Basic ## Truncate ## Lazy loaded next items --- ## Breadcrumb - Usage Breadcrumb navigation is a UI control that allows users to track their location within an application and easily navigate to previous or child pages. Breadcrumbs make the structure of applications transparent to users. We typically use breadcrumbs in applications that have a deep hierarchy of pages or content. This helps users understand where they are within applications, and makes it easier to navigate to pages further along the navigation tree. As a general rule, we use breadcrumbs for information architecture with more than two levels, but not as a replacement for an application's main navigation. If the information structure is extremely complex, we often consider using a tree instead of a breadcrumb. Breadcrumb items are interactive. Users navigate to their respective location by pressing the item. Each item contains a breadcrumb label. All items in the breadcrumb path are always followed by a chevron icon except for the last item. ![Breadcrumb overview](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=20-8463&mode=design&t=JS1Aklcq48swr0Im-1) 1. Breadcrumb item 2. Separator 3. Dropdown ## Options ![Breadcrumb variants](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=20-352&mode=design&t=JS1Aklcq48swr0Im-1) - **Subtle**: By default, breadcrumbs appear in a subtle appearance. Switch to a solid appearance for higher visual emphasis. - **Icon**: Breadcrumb items can, but don’t have to, include an icon. The icon is positioned before the breadcrumb label. Icons can be included for each item or only for specific items (e.g. the root item). - **Show child items on last item**: By default, the last item of the breadcrumb doesn't offer any user interaction. An interactive item variant is available which allows the user to browse to child pages of the current page. Pressing the item triggers a dropdown listing all child elements. - **Visible item count**: By default, breadcrumbs display a limited number of items. This number can be adjusted. ## Behavior in context - **Population**: As a general rule, we populate breadcrumbs location-based to reflect the hierarchy of the application and the location of the user within it. We always include the current location in the breadcrumb. - **Overflow**: If the number of items exceeds the defined limit, items are hidden within a dropdown menu at the beginning of the path. The dropdown menu is triggered by pressing the respective item. The truncation is visualized with an ellipsis. The overflow behavior can also be triggered if the available space does not allow the complete display of the breadcrumb in one line. - **Text truncation**: Truncation is applied to individual breadcrumb items if the maximum width of the breadcrumb item is exceeded. The label name is truncated with an ellipsis. - **Placement**: We typically place breadcrumbs at the top left side of the page/content area, below the header and above the page title. ## States Interactive items can take one of four states: Default, hover, active and focused. Non-interactive items are always in default state. ![States of breadcrumb items](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=120-7463&mode=design&t=JS1Aklcq48swr0Im-1) ## Dos and Don’ts Do label each item, i.e. use more than icons Do use single-line text entries as breadcrumb items have a fixed height Don’t use breadcrumbs to display a multistep process (use the [workflow](../workflow) control instead) Don’t show multiple breadcrumbs on one screen, e.g. in a content area and in a drawer ## Related - [Dropdown](../dropdown) - [Workflow](../workflow) --- ## Button - Code import { SinceTag } from '@site/src/components/UI/Tags'; import PropsApi from '@site/docs/autogenerated/api/ix-button/api.mdx'; import ButtonsPlayground from '@site/docs/autogenerated/playground/buttons.mdx'; import ButtonSecondaryPlayground from '@site/docs/autogenerated/playground/button-secondary.mdx'; import ButtonTertiaryPlayground from '@site/docs/autogenerated/playground/button-tertiary.mdx'; import ButtonSubtlePrimaryPlayground from '@site/docs/autogenerated/playground/button-subtle-primary.mdx'; import ButtonSubtleSecondaryPlayground from '@site/docs/autogenerated/playground/button-subtle-secondary.mdx'; import ButtonSubtleTertiaryPlayground from '@site/docs/autogenerated/playground/button-subtle-tertiary.mdx'; import ButtonDangerPrimaryPlayground from '@site/docs/autogenerated/playground/button-danger-primary.mdx'; import ButtonDangerSecondaryPlayground from '@site/docs/autogenerated/playground/button-danger-secondary.mdx'; import ButtonDangerTertiaryPlayground from '@site/docs/autogenerated/playground/button-danger-tertiary.mdx'; import ButtonGroupPlayground from '@site/docs/autogenerated/playground/button-group.mdx'; import ButtonTextIconPlayground from '@site/docs/autogenerated/playground/button-text-icon.mdx'; import ButtonLoadingPlayground from '@site/docs/autogenerated/playground/button-loading.mdx'; # Button - Code ## Primary ### Secondary ### Tertiary ## Subtle ### Subtle secondary ### Subtle tertiary ## Danger ### Danger secondary ### Danger tertiary ## Button group ## Button with text and icon ## Loading button --- ## Button - Usage Buttons initiate actions, apply actions to selected objects and activate/deactivate functions. We typically use buttons to trigger an immediate action, and you can place them within dialogs, forms, modal windows and other containers. ![Overview](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=5771-4670&t=rJDt18BP7skzAPnM-4) 1. Label 2. Icon 3. Icon right ## Variants ![Button variants](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=5771-6179&t=yk9Vv3HSXaEzBbQk-4) - **Primary:** Use for primary actions, e.g. "Confirm" or "Send". - **Secondary:** Use for secondary actions supporting the primary action, e.g. "Cancel" or "Reset". - **Tertiary:** Use for tertiary actions that serve specialized or conditional purposes, e.g. "Advanced settings", "More options", "Help" or "Customize", "Change preferences" or "View details". - **Subtle variants:** Use as an alternative when a softer visual preference is required. When using the **subtle primary** button for the primary action, ensure that **subtle secondary** and **subtle tertiary** buttons are used for supporting and contextual actions respectively. - **Danger variants:** Use for destructive or critical actions like "delete" or "remove". We typically use the danger button for actions that are irreversible or have a significant impact on the user’s data or the application state. ## Options - **Label:** Displays short, descriptive text that clearly communicates the action triggered by the button. - **Icon:** Appears left of the label and supports the label visually. This is the preferred position. Use icons that are widely recognized by users for the intended action. See [icon button](../icon-button/index.mdx) for buttons without label with icon only. In loading state, this icon is replaced by a loading spinner. - **Icon right:** Appears to the right of the label. Use this position as placing the icon on the left is counterintuitive, such as a “Next” button with a right-pointing arrow in wizard-like modals. - **Type:** Use `submit` when sending user input from a form to a server. For all other actions such as triggering dialogs or performing navigation use the default type `button`. ## Behavior in context - **Interaction:** Buttons can be triggered by pressing anywhere within the button container. When buttons are focused, they can be triggered by pressing `Space`. - **Text truncation:** Button labels are not truncated. All text on buttons is one line only. - **Alignment:** Buttons can be left or right-aligned or fully span a container’s width. - **Button width:** Buttons dynamically adjust their width based on content, but have a default minimum width of `5rem` to ensure harmonious alignment for common pairs like "OK" and "Cancel". The minimum width can be customized for different needs. - **Cluster buttons:** Cluster buttons in groups with related functions. A cluster might include various types of buttons, e.g. primary, secondary and tertiary. We recommend a gap of `0.5rem` between buttons. ![Cluster buttons](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=5773-6487&t=yk9Vv3HSXaEzBbQk-4) ## States Buttons have six states: Default, hover, active, disabled, loading and focused. In a disabled and loading state, buttons are visually displayed but never offer any user interaction. ![Button states](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=5878-6015&t=yk9Vv3HSXaEzBbQk-4) ## Dos and Don’ts Do use short button labels to allow users to quickly scan, understand and remember them (see our [writing style guide](../../guidelines/language/dialogs-and-buttons.md)) Do use ellipsis (…) to indicate that an action requires further input or choice from the user, e.g. "Save as…" which opens a list of file types to choose from Do use the primary variant for buttons to indicate one primary action in a visual unit, all other secondary actions should use the secondary variant Don’t place icons both left and right of the label on the same button Don’t use the danger button excessively or repetitively in lists or tables Don’t rely on standard buttons when many actions are necessary (use [dropdown buttons](../dropdown-button/index.mdx) or [split buttons](../split-button/index.mdx) instead, or move some functionality to a [pane](../panes/index.mdx) or a [dialog](../modal/index.mdx)) ## Related - [Dropdown button](../dropdown-button/index.mdx) - [Split button](../split-button/index.mdx) - [Toggle button](../toggle-button/index.mdx) - [Modal](../modal/index.mdx) --- ## Card - Code import CardPlayground from '@site/docs/autogenerated/playground/card.mdx'; import ActionCardPlayground from '@site/docs/autogenerated/playground/action-card.mdx'; import PushCardPlayground from '@site/docs/autogenerated/playground/push-card.mdx'; import ActionCardPropsApi from '@site/docs/autogenerated/api/ix-action-card/api.mdx'; import PushCardPropsApi from '@site/docs/autogenerated/api/ix-push-card/api.mdx'; import CardPropsApi from '@site/docs/autogenerated/api/ix-card/api.mdx'; # Card - Code ## Basic ## Action Card ## Push Card --- ## Card - Usage Cards make it easy for users to quickly scan small chunks of information. We typically use cards to create dashboards or modular, flexible designs that adapt seamlessly to various screen sizes. Additionally, cards can be used to draw attention to important content and serve as an entry point to deeper levels of navigation or detailed views. We offer three types of cards: 1. **Cards:** Use flexibly to display various types of content, e.g. images, charts or key data. 2. **Action cards:** Use to trigger key actions, similar to [buttons](../button). 3. **Push cards:** Use to display notifications and additional content related to the notification value. ![Card - anatomy](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=7006-24531&t=jxTcJOGghqA7qt1M-4) **Card** 1. Card container 2. Card content ![Action card - anatomy](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=7007-858&t=jxTcJOGghqA7qt1M-11) **Action card** 1. Icon 2. Heading 3. Subheading ![Push card - anatomy](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=858-4956&t=jxTcJOGghqA7qt1M-4) **Push card** 1. Icon 2. Notification 3. Heading 4. Subheading 5. Expand area 6. Expandable content ## Variants Cards are available in nine variants: * Outline: Use as default for a balanced and subtle appearance. * Filled * Alarm * Critical * Warning * Success * Info * Neutral * Primary Each variant emphasizes different aspects to guide the user's attention. These variants differ visually through the presence of an outline and a distinct container fill color, but they all follow the same interaction pattern. ![Card variants](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=858-4969&mode=design&t=RDimbEsIHFIXIByo-1) ## Options - **Card:** - **Selected:** Use the selected state to indicate that the corresponding action is currently active. - **Content area:** Cards can contain various types of content, e.g. images, charts, key data. It is positioned below the heading and subheading. We recommend a padding of `1rem`. - **Action card & push card**: - **Selected (action card only):** Use the selected state in action cards to indicate that the corresponding action is currently active. - **Icon:** Use icons that are widely recognized by users for the intended action. - **Notification (push card only):** By default, push cards display a notification value at the top of the container. This value is logically related to the items displayed in the expanding content area. - **Heading:** Display a heading in the top-left corner of the container. - **Subheading:** Display a subheading below the heading to provide additional context. - **Expandable content (push card only):** Push cards can include an expandable content area that reveals additional information when expanded. This area is positioned below the subheading and is hidden by default. ## Behavior in context - **Interaction:** As a general rule, the entire card container is interactive and clickable. If the card also contains interactive elements, the corresponding actions are triggered. - **Size:** - By default, cards have a fixed width and height. However, content overflow is not managed automatically, so the card size must be manually adjusted. - Action cards have a default width and height which can be adjusted to fit nicely in layouts. - Push cards have a fixed height and a default width. The width can be adjusted as needed. - **Placement:** We typically group cards using [grids](../layout-grid) or [card lists](../card-list) and position them in the top-left of their container. ![Card examples](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=1329-26613&mode=design&t=sOZRNgWt7R52iLSF-1) ## States Cards have four states: Default, hover, active and focused. ![Card states](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=858-4979&mode=design&t=RDimbEsIHFIXIByo-1) ## Dos and Don’ts Do group cards in [card lists](../card-list) or [grids](../grid) Do keep multiple cards equal in size Don’t nest cards inside each other Don’t use cards to collect user input ## Related - [Card list](../card-list) - [Flip](../flip) - [Tile](../tile) --- ## Card list - Code import PropsApi from '@site/docs/autogenerated/api/ix-card-list/api.mdx'; import CardListPlayground from '@site/docs/autogenerated/playground/card-list.mdx'; # Card list - Code ## Basic --- ## Card list - Usage Card list content can be hidden or revealed by clicking on a control element. We typically use card lists on dashboards to show a huge amount of information in an organized and hierarchical way. Card lists consist of a header section at the top and a content section below. The header section includes an icon button with a chevron on the left, followed by the card list's label. In the content section, items of the same type can be arranged in two different layout styles: stack and scroll. ![Card list overview](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=897-31906&mode=design&t=2pf1CqY5ifYKN3F2-1) 1. Header section 2. Content section 3. "Show all" button 4. "Show more" card ## Types The stack card list style displays content items from left to right next to each other and wraps them into a new line when space runs out. This means the height of the section can dynamically change. ![Card list - stack style](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=910-8581&mode=design&t=2pf1CqY5ifYKN3F2-1) The scroll card list style displays the content items from left to right next to each other in a single row. When the space runs out, horizontal scrolling is enabled, indicated by a semi-transparent area on the left or right end of the content section. ![Card list - scroll style](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=915-8647&mode=design&t=2pf1CqY5ifYKN3F2-1) ## Options - **Label**: Card lists can include a label in the header section. The label is positioned right next to the chevron. - **Collapse**: By default, the card list is expanded, but this can be customized to suit your specific needs. - **Max visible cards**: By default, the card list displays a maximum of 12 items. If more items are available, a "Show more" card is displayed. - **Show all button**: The header section can contain a button that triggers the action to show all card list items. Typically, these items are shown on a new page. - **String - Show all**: By default, the button to display all items is labeled "Show all". - **Show all count**: This represents the total number of card list items. This value is displayed on the "Show all" button. - **String - More cards**: By default, the card used to indicate when there are more items available is labeled "There are more cards available". ## Behavior in context - **Interaction**: Users expand and collapse card list content by clicking on the icon button with the chevron in the header section. When the card list is expanded, content below the card list is pushed downwards. - **"Show all" button**: Sometimes card lists only need to show the most important or most recent items. Clicking on the "Show all" button in the header section shows all items. Typically, these items are displayed on a new page. - **"Show more" card**: The number of visible items inside a list can be limited to reduce the user's cognitive load. The "Show more" card indicates that more information is available. Selecting the card either displays the next chunk of items or shows all items on a new page, similar to the "Show all" button pattern. ## Dos and Don’ts Do keep cards and items within card lists the same size Don’t place different types of components within card lists Don’t nest card lists within each other ## Related - [Blind](../blind) - [Card](../card) --- ## Category filter - Code import PropsApi from '@site/docs/autogenerated/api/ix-category-filter/api.mdx'; import CategoryFilterPlayground from '@site/docs/autogenerated/playground/category-filter.mdx'; import CategoryFilterSuggestionsPlayground from '@site/docs/autogenerated/playground/category-filter-suggestions.mdx'; # Category filter - Code ## Basic ## Without categories --- ## Category filter - Usage The category filter component enhances data navigation and user experience. We typically use a category filter to efficiently navigate large data sets, and it’s particularly useful for complex data scenarios. The filter also enhances the user experience by providing autocomplete suggestions and customizable filter conditions. ![Category filter overview](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=1799-38402&mode=design&t=hgAA8GogE70JbHHy-1) 1. Container 2. Search icon 3. Input chip 4. Clear button ## Options - **Categories**: Select these predefined groups to narrow down searches or browsing. The categories are customizable and should be defined based on the specific needs of your application or website. - **Suggestions**: These are potential search terms that appear as users begin to type in the input field. The aim is to assist users by predicting their intended search or category, thereby speeding up the input process and reducing potential errors. - **Non-selectable categories**: This option is useful in scenarios where the user should not be able to select certain categories. This could be due to categories that are irrelevant in the current context, restricted through user permissions or dependent on other conditions. - **Repeat categories**: Allows users to select the same category more than once. This can be useful when users want to apply different filter conditions to the same category. - **Placeholder**: Use to provide guidance or context to users when the category filter is empty. - **Icon**: The default icon is "search". Changing or hiding the icon within the category filter enhances the user experience and improves visual communication. - **Plain text**: Provides the possibility to do a plain text search without choosing a specific category. - **Static operator**: Use to restrict the filter condition to either equal (=) or not equal (!=). This is useful when it doesn't make sense, or is not applicable, to let the user decide between equal and not equal. By default, the filter condition is without restriction. ## Behavior - **Default**: The category filter is designed to adapt to the user’s needs and the context it’s used in. As soon as the user starts typing, the filter begins to apply, narrowing down the available options based on user input. This provides a dynamic and responsive user experience. - **Filter conditions**: These are the operators that determine how the filter matches the user’s input against the available categories. Available are equals (=) and not equals (!=). These conditions provide flexibility and precision in filtering, allowing users to find exactly what they’re looking for. - **Display modes**: The different modes are automatically detected by the component itself. If the user enters more than one row of search terms it automatically increases the size. When it comes to more then two lines of search terms it applies a scrollbar automatically. - **Autocomplete**: When the user starts typing it can automatically suggest possible matches. This helps with speeding up the input process and reducing potential errors. - **Category selection**: The behavior of category selection can vary. It can be configured as non-selectable, multi-selectable or single-selectable depending on the specific application needs and context. - **Without category selection**: Use without category selection if user input alone is sufficient to filter the data, such as when the data is not well-organized into distinct categories, or if the categories are too numerous/complex. - **Visual feedback**: When a category is selected, it’s highlighted and a chip is added to the input field. If a user chooses to delete a category, the chip is removed and the data is unfiltered, allowing for further filtering. ## States Category filter has six states: Default, hover, active, disabled, read-only and focused. ![Category filter states](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=1799-38415&mode=design&t=1vxCdaFjmBNHp8Sk-4) - **Read-only**: By setting the category filter to read-only, accidental data modifications or deletions can be prevented. This can be particularly useful when dealing with critical or sensitive information that should not be altered without proper authorization. - **Disabled**: This state is typically applied when the element is not applicable to the current context or when certain conditions must be met before the category filter can be enabled. ## Dos and Don’ts Do use if you have a large amount of content or products organized into different categories Do use when catering to a diverse user base with different interests or needs Do use if your content or products are organized into distinct categories or topics Do use to make it easier for users to refine their search queries and receive more targeted results Don’t use if your content is minimal or not organized into distinct categories Don’t use if it’s not the primary method of navigation Don’t use if it slows down the user experience Don’t use if your users are not familiar with the category names ## Related - [Expanding search](../expanding-search) - [Input](../input) - [Select](../select) - [Dropdown button](../dropdown-button) --- ## Overview import EchartsPlayground from '@site/docs/autogenerated/playground/echarts.mdx'; import EchartsEmptyStatePlayground from '@site/docs/autogenerated/playground/echarts-empty-state.mdx'; # Overview - Code Siemens Industrial Experience provides a theme for the popular chart library [ECharts](https://echarts.apache.org/handbook/en/get-started). This lets you seamlessly integrate ECharts into the Siemens Industrial Experience design system. ECharts is a third-party library distributed under [Apache License 2.0](https://www.apache.org/licenses). ![Chart usage guide](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?node-id=3532-4181&t=MD9MvUCkoIcmSi8H-4) ## Attributes | Name | Description | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | **Axes** | Axes are used to display the data in a chart. They are the horizontal and vertical lines that form the chart's grid. Axes are labeled to indicate what data they represent. | **Scale** | Scales are used to map data values to a visual representation. The scale type is determined by the type of data being visualized. | **Labels** | Labels are used to describe the dimensions represented, often including units of measurement, e.g. “Distance traveled (m)”. | **Grid lines** | Grid lines help to visually align data points within the chart. | **Legend** | Legends explain the symbols, colors or patterns used in the chart to represent different data sets. You can toggle the visibility of the data series by clicking on the date in the legend. | **Tooltip** | Tooltips provide more details about data while hovering over the area. ## Installation To install the Siemens Industrial Experience ECharts theme, follow the steps below: ```sh npm install --save @siemens/ix-echarts ``` 1. Import the `registerTheme` function from our module. 2. Invoke this function, passing in your `echarts` instance as an argument. You do not need to provide the `echarts` instance if it’s provided globally in your `window` object when using vanilla JavaScript. 3. Once this is done, you’ll be able to utilize the `brand-dark`, `brand-light`, `classic-dark` and `classic-light` themes for your chart. ```typescript import { registerTheme } from '@siemens/ix-echarts'; registerTheme(echarts); ``` For Angular, make sure to correctly add `NgxEcharts` in your module file. ## Colors The Siemens Industrial Experience ECharts theme provides a set of colors that are used to style the charts. These colors are optimized for accessibility and readability. ### Categorical data For easily distinguishable data series, where each category is distinct but not ordered, we recommend the following color sequence. Example: Different product types or regions. ![Colors for categorical data](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?node-id=3223-1647&t=MD9MvUCkoIcmSi8H-4) ### Sequential data For ordered data, we recommend using every second color, e.g. chart-1, chart-3, chart-5. Example: monthly data. ![Colors for sequential data](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?node-id=3225-2412&t=MD9MvUCkoIcmSi8H-4) ### Comparative data For comparing data within a category, we recommend using the matching -40 color with 40% opacity. Example: last year and current year. ![Colors for comparative data](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?node-id=3225-2885&t=MD9MvUCkoIcmSi8H-4) ## Loading indicators A loading indicator provides users with visual feedback that the chart is being processed and will be displayed shortly. The loading indicator should be displayed when the chart is loading data or performing a long-running operation. ## Empty states An empty state occurs when a user first opens an application, no data is available, or the user has filtered out all data. The empty state should be visually distinct from the loading state and should provide a clear message to the user. This message should explain why the empty state is being displayed and provide guidance on how to proceed. ## Failure and error messages A failure occurs when no data can be displayed within the chart. This can happen for various reasons, such as connection failure and missing data. Error messages have the following elements to help guide the user: - State problem: What happened? Add a clear reason for the error, e.g. "No data available" - Explain cause: Why did the error appear? A clear and concise message explaining why the error happened, e.g. "Connection failure" - Give solution: What can the user do to move forward? Add clear instructions for the user regarding what to do next to resolve the error, e.g. "Try again" ## Missing data points Indicate missing data with a special visual marker (like a different color or shape) to highlight the gaps without connecting them. --- ## Chat - Code import ChatPlayground from '@site/docs/autogenerated/playground/chat.mdx'; import PropsApi from '@site/docs/autogenerated/api/ix-chat/api.mdx'; # Chat - Code ## Basic --- ## Chat - Usage Chats are the outer containers that bring together the three building blocks of a conversational thread: [Chat input](../chat-input) at the bottom for writing and sending prompts, [user messages](../user-message) that show what users submitted and [AI messages](../ai-message) that display AI responses. ![Chat anatomy](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=7962-804&t=8Rj3ErabF16Vm3lH-4) 1. [User message](../user-message) 2. [AI message](../ai-message) 3. [Chat input](../chat-input) ## Behavior in context - **Placement:** We recommend placing the chat either in the main content or in panes depending on the user goals: - [Main content](../content): Use when the chat is the main focus of the experience, e.g. standalone or workspace copilots - [Panes](../panes): Use when the chat is a secondary feature, e.g. for contextual help - **Responsiveness:** Chats will resize to a max-width of `45rem`. ## Dos and Don’ts - Do enable auto-scroll when users are reading the current response, not when they are reading previous responses - Don't add limits to how many messages are visible, instead always display full chat sessions ## Related - [Chat input](../chat-input) - [User message](../user-message) - [AI message](../ai-message) - [Conversational design guidelines](../../guidelines/conversational-design/getting-started) - [SDL AI UX Guidelines](https://www.figma.com/design/KbgPxj7qLgngXkJfnDM4Ty/SDL-AI-UX-Guidelines?t=Kv2aR7JVmhNYuR1S-0) (Siemens AG internal resource) --- ## Chat attachment - Code import ChatAttachmentPlayground from '@site/docs/autogenerated/playground/chat-user-message.mdx'; import PropsApi from '@site/docs/autogenerated/api/ix-chat-attachment/api.mdx'; # Chat attachment - Code ## Basic --- ## Chat attachment - Usage Chat attachments display files that users have uploaded to a chat prompt. They are typically shown while users compose messages in [chat input](../chat-input) and after sending in [user messages](../user-message/). ![Chat attachment anatomy](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=7970-230&t=HrpSIFfB7yjzt741-4) 1. File icon 2. File name 3. Remove button ## Options - **File icon:** Show a recognizable file-type [icon](../../icons/icon-library) so users can identify attachments quickly, e.g. `pdf-document`. - **File name:** Show the file name including the file extension. - **Remove button:** Show remove buttons in a [chat input](../chat-input/) and hide it once an attachment is part of a submitted [message](../user-message/). - **Preview supported:** Use only for supported files to show e.g. thumbnails. ## Behavior in context - **Chat input context:** If attachments exceed the chat input's width, they overflow into a scrollable horizontal list. - **User message context:** If attachments exceed the user message container's width, a more button is visible. - **Text overflow:** If an attachment exceeds `20rem`, the file name is truncated at the end while preserving the file extension. A tooltip is shown on hover to display the full file name. ## States Chat attachments have six states: default, hover, active, loading, focused and error. Chat attachments follow the [chip](../chip) interaction model, including hover, active and focused behavior. In an error state, attachments stay visible and show clear feedback so users can retry or remove files. ## Dos and Don’ts - Do keep attachments visible in user messages so attachments stay traceable within context - Don’t hide the remove action while users are still composing a prompt in the [chat input](../chat-input/) - Don’t detach attachments from their related [user message](../user-message/) after sending ## Related - [Chat](../chat) - [Chat input](../chat-input) - [Chip](../chip) - [User message](../user-message) --- ## Chat input - Code import ChatInputPlayground from '@site/docs/autogenerated/playground/chat-input.mdx'; import PropsApi from '@site/docs/autogenerated/api/ix-chat-input/api.mdx'; # Chat input - Code ## Basic --- ## Chat input - Usage In chat inputs, users write and send messages. We recommend using them for quick, iterative exchanges, not for multi-step data entries. ![Chat input anatomy](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=7940-7427&t=mrtbkWj76QJhvNLI-11) 1. Follow-up prompts 2. Attachments 3. Textarea 4. Start slot for secondary actions 5. Disclaimer 6. End slot for alternative input methods 7. Send button ## Options - **Placeholder:** Use clear, contextual prompts, e.g. “Enter a command, question or topic…” (see [writing guidelines](../../guidelines/conversational-design/essentials/wording-terms)). - **Follow-up slot:** Optionally include a slot for follow-up questions. We typically use tertiary outline [buttons](../button) or [icon buttons](../icon-button) for that purpose. - **Attachment slot:** Optionally include a slot for [attachments](../chat-attachment/). - **Start slot:** Add secondary actions. We recommend using tertiary outline [icon buttons](../icon-button) and trying to stick to one action. If you have more than one action, use [dropdown buttons](../dropdown-button/). - **End slot:** Use this slot to add alternative input methods, e.g. voice input. - **Disclaimer:** In AI contexts, we recommend including a visible disclaimer under the input instead of under each [AI message](../ai-message/). For Siemens AG products, find legal disclaimers [here](https://code.siemens.com/siemens-ix/ix-brand-theme/-/blob/main/apps/documentation/src/pages/legal-disclaimers-copilots.md). - **Character limit:** Set soft and hard character limits that either warn users or prevent further input. ## Behavior in context - **Interaction:** Keep the input compact at start and let it grow to multiline while users type - **Overflow:** - On the follow-up actions: If the actions exceed max width, they break into multiple lines - On the input: If the input reaches max height, the input shows a vertical scroll - On the attachments: If the attachments reach max width, they show a horizontal scroll ![Overflow behavior](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=7940-7020&t=mrtbkWj76QJhvNLI-11) ## States Chat inputs have four states: default, hover, focused and processing. ![States](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=7940-2809&t=mrtbkWj76QJhvNLI-4) ## Dos and Don’ts - Do keep action labels verb-based and specific so users understand the outcome (see [guidelines for Siemens AG employees](https://www.figma.com/design/lqjt9c5IzzwQ4eJ4nqG7Kv/AI-Terminology?node-id=1-9&t=d5UkOPKJfj9qDmYM-1)) - Don’t allow users to send empty input - Don’t rely on color alone to communicate validation errors - Don’t place AI disclaimers away from user input and messages ## Related - [Chat](../chat) - [AI message](../ai-message) - [User message](../user-message) - [Textarea](../textarea) - [Conversational design guidelines](../../guidelines/conversational-design/getting-started) --- ## Checkbox - Code import FormCheckboxPlayground from '@site/docs/autogenerated/playground/form-checkbox.mdx'; import FormCheckboxDisabledPlayground from '@site/docs/autogenerated/playground/form-checkbox-disabled.mdx'; import FormCheckboxGroupPlayground from '@site/docs/autogenerated/playground/form-checkbox-group.mdx'; import FormCheckboxGroupIndeterminatePlayground from '@site/docs/autogenerated/playground/form-checkbox-group-indeterminate.mdx'; import FormCheckboxValidationPlayground from '@site/docs/autogenerated/playground/form-checkbox-validation.mdx'; import PropsApi from '@site/docs/autogenerated/api/ix-checkbox/api.mdx'; import PropsGroupApi from '@site/docs/autogenerated/api/ix-checkbox-group/api.mdx'; # Checkbox - Code Enclosing related checkboxes within a single checkbox group container ensures correct selection behavior, grouping and accessibility. ## Basic ## Disabled ## Group ## Indeterminate group ## Validation --- ## Checkbox - Usage Checkboxes are commonly used when there are multiple options that can be selected or used to easily enable or disable a setting. They are often utilized in forms where users can choose multiple options, such as selecting items or categories that apply to a specific product or service. ![Checkbox anatomy](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?node-id=3364-8247&t=VCAAFzKIYCDb7nIX-4) 1. Checkbox 2. Checkbox label 3. Group label 4. Group required indicator 5. Group helper or feedback text ## Options - **Checkbox**: - **Label:** See [form field](../forms-field). - **Indeterminate:** Indicates that only some items in a checkbox group are selected. - **Checkbox group**: - **Label:** Add a label to the group of checkboxes to provide context to your users. We typically use short and descriptive labels to summarize the options in the group. - **Helper text**: See [form field](../forms-field). - **Show text as tooltip**: See [form field](../forms-field). ## Behavior in context - **Validation**: See [validation](../forms-validation). - **Interaction**: Clicking on the checkbox toggles the state between checked and unchecked. - **Grouping**: Checkbox groups have only one label and helper text for the entire group. Grouped checkboxes are validated collectively, not individually. ## States ![Checkbox states](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?node-id=3749-1431&t=VCAAFzKIYCDb7nIX-4) ## Dos and Don’ts Do use checkboxes when you have multiple options that can be selected Do group related checkboxes together to indicate their relationship Do use checkboxes in forms to allow users to select multiple options Don’t use a checkbox for binary choices (yes/no, true/false) - use a toggle switch instead Don’t use checkboxes for mutually exclusive options - use [radio buttons](../radio) instead Don’t use checkboxes for actions that have immediate consequences - use [buttons](../button) or links instead --- ## Chip - Code import PropsApi from '@site/docs/autogenerated/api/ix-chip/api.mdx'; import ChipPlayground from '@site/docs/autogenerated/playground/chip.mdx'; # Chip - Code ## Basic --- ## Chip - Usage Chips typically contain a concise label and sometimes an icon, and they are both clickable and closable. ![Chip overview](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=1149-41643&mode=design&t=ruQOzpPQJMKwnk8f-1) 1. Container 2. Label text 3. Icon 4. Close button ## Variants With our chip variants, you can apply different colors based on their purpose, importance or context. We use chip variants to show class, status and levels of importance. The custom variant is often used for chips that visualize a high number of different categories, but does not permit color specification for hover and active states. Chip variants: - **Primary**: For high visual emphasis - **State-related variants**: Alarm, critical, warning, success, info and neutral - **Custom**: For a customized background and label color ![Chip variants](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=1201-9512&mode=design&t=ruQOzpPQJMKwnk8f-1) ## Options - **Active**: Specifies chip interactivity. When set to false, user input such as mouse-over and keyboard navigation are disabled and the close button is not visible. - **Background**: Use to set a custom background color when you require more flexibility in styling the chip. Only available for the custom chip variant. - **Outline**: Use for lower visual emphasis. - **Closable**: When set, the chip contains a close button that removes the entire chip when selected. This feature is only applicable to active chips so users can easily remove specific chips when necessary. - **Icon**: Chips can include an icon within the element which is positioned before the chip's label. - **Color**: Customize font and icon color for chip. This allows users to specify a unique font color in combination with a custom background color (only applicable when the variant is set to 'custom'). - **Width**: Typically content length determines chip width with a minimum width of '2rem'. Chip width can be set to a specific value. - **Tooltip text**: Provide a specific text to be displayed as the tooltip or set the attribute without a specific value to display the chip's text content. ## Behavior - **Reactive**: Chips react or change their appearance or behavior based on user actions. For example, updates occur as a response to system actions, providing real-time information about system changes or events. - **Multi-selection**: Chips can visualize multi-selection and filter actions. This helps users to easily identify and understand their choices. - **Placement**: We typically place chips inline with other objects to inform users about their state, within tables or grouped together to show selected options and filters. We do not place chips within input and filter components as these components have similar components already built-in. - **Dismiss**: When users select close, chips are dismissed from the list or interface and are removed visually. - **Text truncation**: When a width is set for chips, long labels are truncated to fit the available space. ## States Chips take a default, hover, focused or active state with a varying background color. For the custom chip variant, the specified colors for font and background are applied to all states. ![Chip states](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=1246-6190&mode=design&t=GHOok90R6TcaUrYi-1) ## Dos and Don’ts Do use chips to tag and categorize so users can easily organize and filter content Do ensure proper color contrast between chip background and text/icon with the custom variant to support readability Do consider chip spacing for easy tapping or selecting with mobiles and desktops Don’t overuse chips as this leads to cluttered and overwhelming interfaces Don’t use different styles for chips with the same or similar use Don’t use chips without any interaction (we recommend pills instead) ## Related - [Pill](../pill) --- ## Content - Code import PropsApi from '@site/docs/autogenerated/api/ix-content/api.mdx'; import ContentPlayground from '@site/docs/autogenerated/playground/content.mdx'; # Content - Code The `ix-content` is usually used as layouting component on a single page. ## Basic --- ## Content - Usage ![application content](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=1759-25130&mode=design&t=UPXhDWuRHtygtfFI-11) The purple dotted line illustrates the extent of the content component. 1. Header slot (optional): Hosts a header component like the [content header](../content-header). 2. Current content --- ## Content header - Code import PropsApi from '@site/docs/autogenerated/api/ix-content-header/api.mdx'; import ContentHeaderPlayground from '@site/docs/autogenerated/playground/content-header.mdx'; import ContentHeaderNoBackPlayground from '@site/docs/autogenerated/playground/content-header-no-back.mdx'; import ContentHeaderWithSlotPlayground from '@site/docs/autogenerated/playground/content-header-with-slot.mdx'; # Content header - Code ## Basic ## No back button ## With header slot --- ## Content header - Usage The content header helps users understand what the page is about. We typically use it at the very top of the page to show a clear page hierarchy. ![Content header overview](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=2250-4784&mode=design&t=XmCepM9jPR9PImPw-4) 1. Back button 2. Header title 3. Header subtitle 4. Header slot 5. Action buttons ## Variants Our content header variants makes it easier to achieve a well-balanced visual hierarchy throughout the page. - Primary: In our applications, we most often use the primary variant for main pages or primary sections. - Secondary: We typically use this variant when we want to provide context or actions for a specific section of a page, such as when displaying detailed information related to a selected item from a list. ![Content header variants](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=2250-9102&mode=design&t=XmCepM9jPR9PImPw-4) ## Options - **Back button**: Enable if you want to provide a way for the user to navigate back. - **Header title**: Set your page title here. Use a clear, short and descriptive wording. - **Header subtitle**: Provide additional info for your content such as a descriptive sentence when required. - **Header slot**: Use this slot to add additional content that is relevant to the page. We typically use it to display an object's status or a counter displaying the number of children by using a [pill](../pill). - **Action buttons**: Offer convenient shortcuts for actions that the user might need to perform frequently, for example "Add" or "Edit". ## Behavior - **Interaction**: The back button navigates usually one step back or behaves the same as the browser back. Action buttons typically navigate to another view. - **Alignment**: - Place the content header at the very top left corner related to the content position. - Back button, title and subtitle are automatically aligned on the left side while the action buttons are aligned on the right side. - Elements in the header slot are top aligned by default. Use top margin to center align it with the title. - **Cluster action buttons**: Action buttons are automatically aligned to the right. An example for the primary content header has the back button, title and subtitle at the left top corner of the whole page, and the action buttons at the right top corner of the page. ## Dos and Don’ts Do use to provide quick access to common tasks for the whole content area Do place only items in the header slot that don’t take up too much space, such as a status or a counter Don’t use a secondary content header as a page title Don’t use more than one primary headline in one page ## Related - [Application header](../application-header) - [Content](../content) - [Button](../button) --- ## Custom field - Code import CustomFieldPlayground from '@site/docs/autogenerated/playground/custom-field.mdx'; import CustomFieldValidationPlayground from '@site/docs/autogenerated/playground/custom-field-validation.mdx'; import PropsApi from '@site/docs/autogenerated/api/ix-custom-field/api.mdx'; # Custom field - Code With the help of `ix-custom-field` you are able to create form fields that can host any component / markup, while still having access to all validation states as well as ascociated explanatory texts like `helper-text`, `valid-text`, `info-text`, `warning-text` or `invalid-text`. The component will check if any of its children has one of these classes set: `ix-valid, ix-info, ix-warning or ix-invalid` If this is the case the custom field will display the corresponding text. Custom fields can be used to migrate from the existing input validation (native inputs) to the new validation / froms concept. ## Basic ## Validation --- ## Custom field - Usage The custom field's properties allow you to control the validation state of the field and the helper text. It's a versatile tool to create your own form fields that can be used in combination with the 'Form' components to create complex forms. ![Custom field](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?node-id=3303-3291&t=SikqVQr6LWjMEjKI-4) 1. Label 2. Helper or feedback text 3. Form component(s) 4. Required indicator ## Options - **Label:** See [form field](../forms-field). - **Group label:** Add a label to the group of radio buttons to provide context to your users. We typically use short and descriptive labels to summarize the options in the group. - **Helper text**: See [form field](../forms-field). - **Feedback text**: See [form field](../forms-field). - **Customization**: Add form components to create the use case you need. For example, for a file upload field, add an input field with a `readonly` state and an [icon button](../icon-button). ![Custom field example](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?node-id=3483-7223&t=DlxXBQ9vTnyDcIUI-4) ## Behavior in context - **Validation:** See [validation](../forms-validation). - **Form behavior:** See [behavior](../forms-behavior). ## States The states depend on the component that you use in the custom field. The custom field itself does not have any interaction states. ## Dos and Don’ts Do use the custom field when your desired solution is not covered by the already existing form field components Do use the custom field in combination with the form component to create complex forms Don’t use the custom field for simple form fields, use the form field component instead Don’t use the custom field without a form component, it is a wrapper component that is meant to be used in combination with the form component Don’t use helper and feedback texts for single fields within a custom field, use the helper and feedback text of the whole custom field instead ## Related - [Form field](../forms-field) - [Validation](../forms-validation) - [Behavior](../forms-behavior) - [Layout](../forms-layout) --- ## Date dropdown - Code import PropsApi from '@site/docs/autogenerated/api/ix-date-dropdown/api.mdx'; import DateDropdownPlayground from '@site/docs/autogenerated/playground/date-dropdown.mdx'; import DateDropdownPresetsPlayground from '@site/docs/autogenerated/playground/date-dropdown-presets.mdx'; # Date dropdown - Code ## Basic ## With presets --- ## Date picker - Code import PropsApi from '@site/docs/autogenerated/api/ix-date-picker/api.mdx'; import DatepickerRangePlayground from '@site/docs/autogenerated/playground/datepicker-range.mdx'; import DatepickerPlayground from '@site/docs/autogenerated/playground/datepicker.mdx'; import DatepickerLocalePlayground from '@site/docs/autogenerated/playground/datepicker-locale.mdx'; # Date picker - Code ## Basic ## Single Selection ## Translation The `ix-date-picker` can be configured using [BCP 47](https://tools.ietf.org/html/rfc5646) locale strings specifying the language to use generating or interpreting strings. More information can be found [here](https://moment.github.io/luxon/#/intl?id=default-locale) --- ## Date picker - Usage ![Date picker anatomy](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=7436-1700&t=BStIEA03mmCLaHAL-4) 1. Month and year navigation 2. Weekday labels 3. Week numbers 4. Selected date or date range 5. Confirm [button](../button) ## Options - **Value**: Defines the selected date or date range. - **Single selection**: By default, users select date ranges. Use single selection to allow selecting a single date. - **Format**: Define the date format that determines how dates are displayed, e.g. `yyyy/LL/dd` for `2024/06/15`. - **Week start**: Define which day the week starts on. By default, it will be defined based on the locale. - **Week numbers**: Show calendar weeks on the left side of the calendar when needed for reference. - **Min and max dates**: Restrict the selectable date range by defining the earliest and latest dates users can choose. - **Corners**: By default, date pickers show rounded corners to be consistent with the [dropdown](../dropdown). Use straight, left or right corners to combine with other components. ## Behavior in context - **Range selection**: In range mode users select a start date and then an end date. The time period between both dates is visually highlighted to provide clear feedback. - **Month navigation**: Users can navigate between months using the arrow buttons in the header or the dropdown menu to quickly jump to a specific month and year. - **Interaction**: Users can navigate through the date picker using the keyboard. The following keys are supported: - **Tab**: Navigate between areas of the date picker (header, body, footer). - **Arrow keys**: Move through dates in the calendar. - **Enter or click**: Select the highlighted date. - **Escape**: Close date pickers when used in a dropdown. If header dropdown for month/year selection is open, it closes first. ## States Individual calendar dates within a date picker have five states: Default, hover, active, disabled and focused. Dates outside the allowed range appear in a disabled state and cannot be selected. ![Date picker states](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=7436-1708&t=BStIEA03mmCLaHAL-4) ## Dos and Don’ts Do use date pickers to ensure accurate date selection Do provide clear labels when the date picker is used in a form context Do ensure the date picker is accessible via keyboard navigation Do use range selection for date periods like booking dates or report timeframes Do set min and max dates to prevent invalid date selections Don’t use date pickers for dates that are far in the past or future, use [date inputs](../input) instead Don’t clutter the date picker interface with unnecessary options Don’t forget to handle empty or invalid date states in your validation logic ## Related - [Date input](../input-date) - [Date time picker](../date-time-picker) - [Time picker](../time-picker) - [Writing guidelines for date and time](../../guidelines/language/formatting/date.mdx) - [W3C date picker accessibility reference](https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-datepicker/) --- ## Date time picker - Code import PropsApi from '@site/docs/autogenerated/api/ix-datetime-picker/api.mdx'; import DatetimepickerPlayground from '@site/docs/autogenerated/playground/datetimepicker.mdx'; # Date time picker - Code ## Basic --- ## Date time picker - Usage ![Date time picker anatomy](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=7440-82856&t=BStIEA03mmCLaHAL-4) 1. [Date picker](../date-picker) 2. [Time picker](../time-picker) 3. Confirm [button](../button) ## Options - **Value**: See [date picker](../date-picker/guide#options) and [time picker](../time-picker/guide#options). - **Single selection**: See [date picker](../date-picker/guide#options). - **Format**: Choose the date and time format, e.g. `yyyy/LL/dd` and `HH:mm:ss`. - **Min and max dates**: See [date picker](../date-picker/guide#options). - **Date picker appearance**: See [date picker](../date-picker/guide#options). - **Week start**: Define which day the week starts on. By default, it will be defined based on the locale. - **Week numbers**: Show calendar weeks on the left side of the calendar when needed for reference. - **Time picker appearance**: See [time picker](../time-picker/guide#options). - **Time reference**: Show time reference input for AM/PM notation when using 12-hour time format. - **Header**: Customize the header of the time picker. - **Corners**: By default, date time pickers show rounded corners to be consistent with the [dropdown](../dropdown). Use straight, left or right corners to combine with other components. ## Behavior in context - **Combined selection**: Users select both a date and a time before confirming their choice. The selection is only finalized when the confirmation button is clicked. - **Range selection**: Range mode allows users to select a start and end date while using one shared time value for both. If start and end need different times, use two separate date time pickers instead. - **Month navigation**: Users can navigate between months using the previous and next buttons in the header. This allows quick access to dates outside the current view. - **Interaction**: Users can navigate through the date time picker using the keyboard. The following keys are supported: - **Tab**: Navigate between areas of the picker (header, body, time input, footer). - **Arrow keys**: Move through dates in the date picker and times in the time picker. - **Enter or click**: Select the highlighted date or time. - **Escape**: Close the date time picker when used in a dropdown. If the header dropdown for month/year selection is open, it closes first. ## States Individual calendar dates within a date time picker have five states: Default, hover, active, disabled and focused. Dates outside the allowed range appear in a disabled state and cannot be selected (see [date picker](../date-picker/guide#states) and [time picker](../time-picker/guide#states) for reference). ## Dos and Don’ts Do use date time pickers when both date and time information are required Do ensure the date time picker is accessible via keyboard navigation Do use range selection for time periods like booking appointments or scheduling events Do set appropriate min and max dates to prevent invalid selections Don’t use date time pickers when only a date or only a time is needed (use [date pickers](../date-picker) or [time pickers](../time-picker) instead) Don’t forget to validate both date and time inputs in your form logic Don’t use date time pickers for dates that are far in the past or future without setting appropriate min and max constraints Don’t clutter the interface with unnecessary time precision when approximate times are sufficient ## Related - [Date picker](../date-picker) - [Time picker](../time-picker) - [Date time input](../input-date-time) - [Writing guidelines for date and time](../../guidelines/language/formatting/date.mdx) - [W3C date picker accessibility reference](https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-datepicker/) --- ## Dropdown - Code import PropsApi from '@site/docs/autogenerated/api/ix-dropdown/api.mdx'; import ItemPropsApi from '@site/docs/autogenerated/api/ix-dropdown-item/api.mdx'; import DropdownPlayground from '@site/docs/autogenerated/playground/dropdown.mdx'; import DropdownIconPlayground from '@site/docs/autogenerated/playground/dropdown-icon.mdx'; import DropdownQuickActionsPlayground from '@site/docs/autogenerated/playground/dropdown-quick-actions.mdx'; import DropdownSubmenuPlayground from '@site/docs/autogenerated/playground/dropdown-submenu.mdx'; # Dropdown - Code ## Basic ## Dropdown with icon ## Dropdown with quick actions menu ## Dropdown with submenu --- ## Dropdown - Usage Dropdown containers allow users to select one option from a list. Selecting one of the items in the dropdown performs the action. ![Overview](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=2353-2278&mode=design&t=OVHeXvLZYLkP2CzN-4) 1. Dropdown container 2. Item 3. Header 4. Quick actions 5. Submenu 6. Checked 7. Separator 8. Icon 9. Label ## Options - **Header:** Add a header for the dropdown container. This allows users to better understand which elements are in the dropdown. - **Quick actions:** Add a quick action bar. Add 3 to 5 actions/items to the quick actions. We typically use quick actions to access common functions such as cut, copy and paste. - **Checked:** Mark selected items in the dropdown with a check mark. We typically use check marks when an item can be activated (e.g. for the dropdown "Sort by:" selection: name, modified date, create date). - **Submenu:** Add a submenu for a multi-level dropdown. We typically use a submenu when there is a long item list and different systematic categorization within the items. - **Separator:** Add a separator to visually divide items from each other. We normally use a separator to isolate individual elements from a cohesive item list. - **Icon:** Icons can be displayed to support the label and make the item more easy to discover by the user. The icon should be widely known for representing the action or function among your users. - **Label:** Set a label for the dropdown item. We typically use short labels including verbs. - **Trigger:** The trigger defines which element opens the dropdown. A trigger should also be defined for a dropdown submenu. We typically use a button as the trigger element. - **Anchor:** An anchor defines where the dropdown is placed. When no anchor is defined the trigger element is used as the anchor. - **Close behavior:** Defines whether a click inside and/or outside the dropdown closes the dropdown. A submenu is always closed together with the parent dropdown. Three Options are possible: - Inside: clicking within the dropdown closes the dropdown. - Outside: clicking outside the dropdown closes the dropdown. - Both: clicking within and outside the dropdown closes the dropdown. - False: dropdown will only close if it’s parent gets closed. - **Placement:** Place a dropdown at the top, bottom, left or right edge as well as at the beginning or end of the trigger/anchor element. The placement may be automatically adjusted in case it cannot be displayed correctly (detailed behavior described in the context section below). We typically use the default (bottom right) placement option to ensure consistency. - **Date selection:** Use the component [date dropdown](../date-dropdown) to get a date selection in the dropdown. ![Dropdown Examples](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=2372-2696&mode=design&t=OVHeXvLZYLkP2CzN-4) ## Behavior in context - **Text truncation:** The labels of the items and the header only consist of one line. A truncation only occurs if there is not enough space on the screen. - **Scrollbar:** A dropdown is provided with a scrollbar when the dropdown takes up 50% of the screen. - **Placement:** The position depends on the trigger/anchor element (e.g. a button). By default, the dropdown is displayed at the bottom right of the trigger element. When there is not enough space for the selected placement, it is corrected automatically. The placement of the submenu is always generated automatically. - **Quick actions:** Quick actions only consist of icons, therefore, it is important to use icons that are understandable without a label or tooltip. A quick action bar can also be used without additional items in the dropdown. ![Dropdown in Context](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?node-id=2463-3302&t=QaiBJKNOwHMdBuk2-4) ## States Dropdown items have five states: Default, hover, active, disabled and focused. When a submenu is in an active state, the submenu displays an additional dropdown with selectable options. ![Item States](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=2343-42235&mode=design&t=OVHeXvLZYLkP2CzN-4) ## Dos and Don’ts Do structure dropdown items coherently with submenus, quick actions and separators Do use dropdowns to showcase related actions Do disable items that cannot be used at that moment Don’t use global navigation options in a dropdown Don’t use too many dropdown items - we recommend a maximum of seven Don’t insert the [date picker](../date-dropdown) instead) ## Related - [Dropdown button](../dropdown-button) - [Split button](../split-button) - [Date dropdown](../date-dropdown) - [Select](../select) --- ## Dropdown button - Code import PropsApi from '@site/docs/autogenerated/api/ix-dropdown-button/api.mdx'; import DropdownButtonPlayground from '@site/docs/autogenerated/playground/dropdown-button.mdx'; import DropdownButtonIconPlayground from '@site/docs/autogenerated/playground/dropdown-button-icon.mdx'; # Dropdown button - Code ## Basic ## Icon --- ## Dropdown button - Usage Dropdown buttons are button elements that allow users to select an action from a list of options by clicking on a button and revealing a dropdown. Clicking on one of the exposed options triggers the action. We typically use dropdown buttons when no default action is available. Dropdown buttons typically group similar or related actions. ![Overview](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=5887-7624&t=yk9Vv3HSXaEzBbQk-4) 1. Container 2. Label 3. Chevron 4. Icon All the variants, options and states of the [button](../button/index.mdx) component apply to the dropdown button. We've listed additional or deviating specifications here. ## Options - **Label:** Set a label for the dropdown button. We typically use short labels including verbs. - **Placement:** Define where the dropdown appears when the button is active. Choose between different directions (top, bottom, left, right) and two options for alignment with the button (start, end). When there isn’t enough space for the chosen placement, it’s automatically corrected. ![Placement example](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=5887-7647&t=yk9Vv3HSXaEzBbQk-4) 1. Bottom-end placement 2. Bottom-start placement - For options of the dropdown triggered when pressing the button, please refer to our separate [dropdown](../dropdown/index.mdx) component guide. - The options **loading** and **type** are not available for dropdown buttons. ## States Dropdown buttons have five states: Default, hover, active, disabled and focused. In an active state, dropdown buttons show a dropdown with the available options. The visual appearance of the states is the same as the [button](../button/index.mdx) component. ## Dos and Don’ts Do use dropdown buttons when selecting an option triggers an action Don’t use dropdown buttons when there is a frequent or most-important action (use a standard button or a split button instead) ## Related - [Button](../button) - [Dropdown](../dropdown) - [Select](../select) - [Split button](../split-button) --- ## Empty state - Code import PropsApi from '@site/docs/autogenerated/api/ix-empty-state/api.mdx'; import EmptyStatePlayground from '@site/docs/autogenerated/playground/empty-state.mdx'; import EmptyStateCompactPlayground from '@site/docs/autogenerated/playground/empty-state-compact.mdx'; import EmptyStateCompactBreakPlayground from '@site/docs/autogenerated/playground/empty-state-compact-break.mdx'; # Empty state - Code ## Basic ## Compact ## Compact break --- ## Empty state - Language import EmptyStateContent from '@site/docs/guidelines/language/messaging/empty-state-messages.mdx'; # Empty state - Language --- ## Event list - Code import PropsApi from '@site/docs/autogenerated/api/ix-event-list/api.mdx'; import ItemPropsApi from '@site/docs/autogenerated/api/ix-event-list-item/api.mdx'; import EventListPlayground from '@site/docs/autogenerated/playground/event-list.mdx'; import EventListSelectedPlayground from '@site/docs/autogenerated/playground/event-list-selected.mdx'; import EventListFilledPlayground from '@site/docs/autogenerated/playground/event-list-filled.mdx'; import EventListCustomItemHeightPlayground from '@site/docs/autogenerated/playground/event-list-custom-item-height.mdx'; import EventListCompactPlayground from '@site/docs/autogenerated/playground/event-list-compact.mdx'; import EventListCustomItemHeightInNumberPlayground from '@site/docs/autogenerated/playground/event-list-custom-item-height-in-number.mdx'; # Event list - Code ## Basic ## Filled ## Selected ## Predefined item height ## Custom item height ## Compact --- ## Expanding search - Code import PropsApi from '@site/docs/autogenerated/api/ix-expanding-search/api.mdx'; import ExpandingSearchPlayground from '@site/docs/autogenerated/playground/expanding-search.mdx'; # Expanding search - Code ## Basic --- ## Flip - Code import PropsApi from '@site/docs/autogenerated/api/ix-flip-tile/api.mdx'; import FlipTilePlayground from '@site/docs/autogenerated/playground/flip-tile.mdx'; # Flip - Code ## Basic --- ## Forms field - Code All components which are tagged via `form-ready` are usable inside a `form` without requiring manual integration. ## Label Each `form-ready` component includes a `label` attribute that displays a label above the component. ```html ``` The `label` attribute is optional and can be left empty to display no label. ## Required indicator To display an indicator whether a field is required, use the attribute `required`. The indicator is only displayed, when a label is set. ```html ``` ## Helper or feedback text To display a helper or feedback text below your component please refer to [validation](../forms-validation). ## Counter To display a counter on inputs or textareas, use the attribute `maxLength`. If you prefer not to display a counter, programmatically apply a custom validation. ```html ``` --- ## Forms field - Usage ![Field](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?node-id=2781-323&t=pKzFQBhaXmjTsR8P-4) 1. Label 2. Form component 3. Helper text 4. Required indicator 5. Counter (input and textarea field only) **Note:** In this chapter, we describe the default field component. For details about custom fields, see the [custom fields](../custom-field/) chapter. ## Options - **Label:** Add a label for the field that provides context to your users. - **Required:** The asterisk states whether user input is required on the field before submitting the form. - **Field:** Use the appropriate field based on the type of input data, e.g. use [toggles](../toggle) for a binary choice. - **Helper text:** Use to help users understand the field better. We typically use this when there are input restrictions or more information is required. - **Show text as tooltip:** Display validation feedback either below the input field or as tooltip when the user hovers or focuses on the form field. Use a different text for the individual validation states that apply (see [validation](../forms-validation)). - **Text alignment:** Set individual fields to align at the start or the end so inputs line up visually, e.g. a form with several [text input fields](../input) and a single [number input](../input-number). - **Counter:** Use a counter to show the number of characters entered into the field and the maximum number of characters allowed. We typically use it for [textarea](../textarea) fields. ## Behavior in context - **Interaction:** See [validation](../forms-validation). - **Behavior of a field as part of a form:** See [behavior](../forms-behavior). - **Text truncation:** Labels, feedback and helper texts are not truncated but break into multiple lines if they exceed the field's width. ## States Interaction states: Default, hover, active, disabled, readonly, focus. When a feedback tooltip is chosen over a message, the field shows a tooltip when in focus or hovered over in specific validation states. ![States](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?node-id=2781-12426&t=pKzFQBhaXmjTsR8P-4) **Note:** There are also several validation states (default, valid, info, warning, invalid) that are described in [validation](../forms-validation). ## Dos and Don’ts Do use a label for every field Do use a counter for fields with a character limit Do use helper text to provide additional information or context about the field Don’t use helper text as a replacement for clear labels Don’t mix different variants of feedback text and tooltips ## Related - [Validation](../forms-validation) - [Behavior](../forms-behavior) - [Input](../input) - [Textarea](../textarea) - [Select](../select) - [Checkbox](../checkbox) - [Radio button](../radio) - [Toggle switch](../toggle) --- ## Forms layout - Code import FormLayoutAutoPlayground from '@site/docs/autogenerated/playground/form-layout-auto.mdx'; import FormLayoutGridPlayground from '@site/docs/autogenerated/playground/form-layout-grid.mdx'; # Forms layout - Code ## Using custom layout To align `form-ready` components in a complex form layout, you typically omit the `label` attribute and define the label as an `ix-field-label` component. You can follow the example here: 1. Define the `ix-input` component including an `id` attribute. ```html ``` 2. Define an `ix-field-label` component with a `for` attribute to link the label to the `ix-input` component. ```html Test ``` 3. Define an `ix-helper-text` component with a `for` attribute to link the helper text to the `ix-input` component. ```html ``` ## Using `ix-layout-auto` ## Using `ix-layout-grid` --- ## Forms layout - Usage ![Form layout examples](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?node-id=3046-516&t=kneyH2DQ9aKpFhdv-4) 1. Small form (modal) 2. Medium form 3. Big form (page) ## Structuring a form Effective ways to organize form elements enhance user comprehension and interaction within your forms: - **Single-column layout:** Ideal for short forms with a few fields or small viewports. - **Multi-column layout:** Suitable for long forms with multiple fields to save vertical space. Use a [layout grid](../layout-grid) or flexbox to align fields. - **Tabbed layout:** Use [tabs](../tabs) to break up long forms into manageable sections. This helps users focus on one part of the form at a time. - **Stepped layout:** Use our workflow pattern to guide users through multi-step forms. - **Fieldset:** Group related fields together using fieldsets. This helps users understand the context of the information they are providing. Add a legend (title) to describe the field group. - **Section heading:** Use section headings to break up long forms into manageable sections. This helps users focus on one part of the form at a time. - **Blind:** Use a [blind](../blind) to hide optional fields and reveal them when the user selects a specific option. ## Best practice - **Z and F shape pattern:** Follow natural reading patterns, for example left to right, to guide users through the form. Consider a clear order of fields to ensure users don’t forget to fill in fields and improve data quality. - **Button alignment:** Position primary action buttons, e.g. submit and cancel consistently. We recommend: - Bottom left: Short forms (up to 5 fields) - Bottom right: Long forms (more than 5 fields) - Bottom right and sticky: Long forms that are already filled in (e.g. edit) with a large number of fields - **Label alignment:** By default, the label is positioned above its input field. Use a custom field component for long forms with a lot of fields to position the label on the left (which saves vertical space). - **Grouping fields:** In some cases, it makes sense to combine multiple fields in one [custom field](../custom-field) with a single label that are connected contextually or through validation, e.g. entering the value and unit of an entity, selecting start and end date. It allows a clearer validation, e.g. the end date must be after the start date. - **Field width:** Use a consistent width for input fields to create a harmonious layout. For example, use a width of 100% for full-width fields and 50% for two-column fields. - **Responsive behavior**: Use [layout grids](../layout-grid/) or flexbox to create responsive forms that adapt to different screen sizes. ## Related - [Validation](../forms-validation) - [Behavior](../forms-behavior) --- ## Forms validation - Code import FormValidationPlayground from '@site/docs/autogenerated/playground/form-validation.mdx'; import Admonition from '@theme/Admonition'; # Forms validation - Code This section details the technical implementation of validation in form components, utilizing component attributes along with corresponding CSS classes to represent various validation states. ## Validation text - **helperText** (optional): Text displayed below the field component to provide additional information. - **infoText** (optional): Informational text for the field component. - **warningText** (optional): Warning text for the field component. - **invalidText** (optional): Error text for the field component. - **validText** (optional): Valid text for the field component. - **showTextAsTooltip** (optional): Determines whether to display helper, info, warning, error, and valid text as tooltips. ## Validation states To change the validation representation, you have to apply the corresponding classes to the component. - `ix-valid`: To show component as valid (Priority 1) - `ix-info`: To show component as info (Priority 2) - `ix-warning`: To show component as warning (Priority 3) - `ix-invalid`: To show component as invalid (Priority 4) These classes have different priority levels, which determining in which order the styling is applied to the component. (`1` is the lowest priority and `3` the highest) ## Example ```html ``` Above example will result in displaying the component as `invalid`, because `invalid` has a higher priority than `info`. When using Angular in combination with reactive forms, it is not necessary to manually apply the CSS classes `.ix-invalid` and `.ix-valid`. This will be done automatically through value accessors. ## Suppress internal validation To suppress the internal validation of a component, you have to provide the `novalidate` attribute to the [form element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#novalidate). ```html
``` ## Basic ## Angular Please note that using the `required` attribute in an Angular application could result in unfavourabe behaviour displaying the field as invalid even if there was no user interaction yet. To avoid that it is suggested not to add the `required` attribute, but implement a custom validator for required fields instead (see `name` and `last-name` in the following code). ## React Using `react-form-hook` is just an example to demonstrate how validation could be done within React. You can use any other validation library or write your own validation logic. ## Vue Using `@vuelidate/core` is just an example to demonstrate how validation could be done within Vue. You can use any other validation library or write your own validation logic. --- ## Forms validation - Usage ![Invalid state](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?node-id=2767-5955&t=IIgjTqoOEP524yAH-4) Key aspects: - Data accuracy: Collect precise information for informed decisions. - Security: Prevent malicious submissions. - User experience: Improve by guiding users and saving time. ## Options - Tooltip and feedback: See [form field](../forms-field). - Validation options: - On value change (validate during input) - On blur (validate on leaving a field) - On blur of a certain part of the form (validate on leaving a certain part of the form) - On click on submit button (validate after users press the submit button) ## On value change This option provides instant feedback to the user as they type, making it suitable for checking character rules. Examples: As the user types a password, it instantly shows whether the password meets the required length or contains special characters. With an e-mail address, it validates when the email format is correct. ## On blur With this option, validation occurs after the user finishes inputting and leaves the control. It provides immediate feedback and is commonly used for checking required inputs, specific data patterns and comparing input with server data. Example: When the user enters an email address and moves to the next field, it validates when the email format is correct. ## On click on submit button This option validates all relevant user input for completeness and plausibility after the user presses the submit button. It's useful for checking data before sending it to the server and for final validation on the server side. Example: When the user fills out a registration form and clicks the submit button, it validates when all required fields are completed and if the data is valid. ## On blur of a certain part of the form This option validates multiple input controls when users leave a specific part of the form. It provides feedback on the plausibility of multiple dependent inputs. Example: When the user completes the shipping address section of an e-commerce checkout form and moves to the payment section, it validates if the shipping address is complete and valid. ## Behavior in context - **Validation:** A validation occurs when a user interacts with a form field, such as submitting a form or moving to the next field. - **Override behavior:** When multiple validation states are present, only the message with the highest priority state is shown. The order of priority, from lowest to highest, is: valid, info, warning and invalid. ## States - Default: The initial state of a form field, often before any user interaction or validation. - Example: Helper text with password strength requirements. - Valid: Indicates that the user input meets all validation criteria and is acceptable. - Example: User enters a password that meets all the criteria for a strong password. - Info: Provides additional context or guidance to the user. - Example: User changes a field that has a dependency to another field or is not saved yet. - Warning: A non-critical issue or suggestion related to the input. - Examples: User enters a weak password, or a rotation speed that is beyond a safety threshold. - Invalid: Indicates that the user input does not meet the specified requirements. - Examples: User enters an email address without the "@" symbol or misses a required input. ![States](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?node-id=2767-5681&t=IIgjTqoOEP524yAH-4) ## Dos and Don’ts Do use short and helpful copy for validation Do include all relevant information in the validation message, including context Don’t show valid feedback on components, only in the input help component ## Related - [Form field](../forms-field) - [Behavior](../forms-behavior) --- ## Gauge chart import EchartsGaugePlayground from '@site/docs/autogenerated/playground/echarts-gauge.mdx'; import EchartsProgressCirclePlayground from '@site/docs/autogenerated/playground/echarts-progress-circle.mdx'; import EchartsProgressArcPlayground from '@site/docs/autogenerated/playground/echarts-progress-arc.mdx'; # Gauge chart - Code ## Metric gauge charts Metrics gauge charts, also known as dial or speedometer charts, are an effective way to visualize key performance indicators (KPIs) and other metrics. These charts indicate the current value of a metric within a predefined range, often segmented into different zones, e.g. red for poor performance, green for good performance, etc. ## Circle gauge charts Circle gauge charts, also known as radial progress charts or circular progress bars, are a visually appealing way to represent data and track progress towards a goal. These charts use a circle to display the percentage of completion, making it easy to quickly grasp the status of a project or task. The circle is typically filled in proportion to the progress made, with the center often displaying the percentage value. ## Arc gauge charts Arc gauge charts, also known as semi-circular progress bars, are a dynamic way to visualize data and track progress. Unlike circle charts, arc gauge charts use a semi-circle or arc to represent the percentage of completion. This design can be particularly effective in dashboards and user interfaces where users need a clear and engaging visual representation but space is limited. ## Dos and Don’ts Do keep it simple and easy to read, with a clear needle and well-defined ranges Do use color coding, e.g. green for good, red for danger, etc. to indicate different ranges Do label ranges and the needle value clearly to avoid confusion Don’t overcrowd the gauge with too many ranges or labels Don’t use gauge charts for visualizing complex data or large datasets Don’t use similar colors for adjacent ranges to avoid confusion --- ## Angular data grid - Code import AggridPlayground from '@site/docs/autogenerated/playground/aggrid.mdx'; # Angular data grid - Code :::info AG Grid is a third party library that provides a feature rich data grid implementation. Its basic functionality is free and open source (distributed under the [MIT license](https://www.ag-grid.com/eula/AG-Grid-Community-License.html)). Please note that more advanced features like e.g. Row Grouping are only available with AG Grid Enterprise which is a commercial product. More information can be found on the [AG Grid licenses page](https://www.ag-grid.com/license-pricing). ::: ## Installation - **React**: Follow the official AG Grid [installation instructions](https://www.ag-grid.com/react-data-grid/getting-started/) for React. - **Angular**: Follow the official AG Grid [installation instructions](https://www.ag-grid.com/angular-data-grid/getting-started/) for Angular. - **Vue**: Follow the official AG Grid [installation instructions](https://www.ag-grid.com/vue-data-grid/getting-started/) for Vue. - **Javascript**: Follow the official AG Grid [installation instruction](https://www.ag-grid.com/javascript-data-grid/getting-started/) for JavaScript. :::note AG Grid version 33 or higher is required. ::: ## Siemens Industrial Experience theme for AG Grid Install the `@siemens/ix-aggrid` package. ```shell npm install @siemens/ix-aggrid ``` Import and configure the IX theme: ```javascript import { getIxTheme, getIxThemeAsync } from '@siemens/ix-aggrid'; import * as agGrid from 'ag-grid-community'; // Get iX theme based on your AG Grid module const ixTheme = getIxTheme(agGrid); // Alternative: Use async import const ixTheme = await getIxThemeAsync(() => import('ag-grid-community')); // Option 1: Set the theme per grid instance const gridOptions = { theme: ixTheme, // ... other options }; // Option 2: Set the theme globally for all grids // Note: Must be called before initializing any grid instance agGrid.provideGlobalGridOptions({ theme: ixTheme, }); ``` ## Basic --- ## Data Grid (AG Grid) - Usage [AG Grid](https://www.ag-grid.com) displays large datasets with advanced interactive features such as sorting, filtering, and row selection. Use it when you need to present tabular data with complex interactions and rich customization options. ![Data grid overview](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=7694-2867&t=DhTc5f9RNL434mRu-4) 1. Header 2. Row with checkbox selection 3. Column sorting 4. Row context menu ## Options :::info Only a subset of the most commonly used options and features are listed here. For a complete set of available options and configuration, please refer to the [official AG Grid documentation](https://www.ag-grid.com). ::: - **[Filtering](https://www.ag-grid.com/javascript-data-grid/filtering-overview/)**: Column-level filters with operators (equals, contains, range). Support AND/OR combinations. - **Rows**: - **Alternate row styling**: Use striped rows to improve readability. We typically use it for datasets with many columns to help users track across rows. - **[Grouping](https://www.ag-grid.com/javascript-data-grid/grouping/)**: Group rows by selected criteria. Grouped sections collapse and expand via interactive controls. - **[Selection](https://www.ag-grid.com/javascript-data-grid/row-selection/)**: Enable row selection via checkboxes. Selection is independent of row clicks. - **Detail view**: Open [modals](../modal) or [panes](../panes) via row click or context menu. - **Columns**: - **[Sorting](https://www.ag-grid.com/javascript-data-grid/row-sorting/)**: Support single or multi-column sorting. Supports ascending and descending for all data types. - **[Visibility](https://www.ag-grid.com/javascript-data-grid/tool-panel-columns/) and [reordering](https://www.ag-grid.com/javascript-data-grid/row-dragging/)**: Enable to show or hide columns, or to reorder columns via drag-and-drop. - **Cells**: - **[Inline editing](https://www.ag-grid.com/javascript-data-grid/cell-editing/)**: Enable cell editing directly in the grid for single or multiple records. ## Behavior in context - **Interaction**: - **Column header**: Click column header to sort. Show active sort indicators. Support multi-column sorting with Ctrl/Cmd+click. - **Selection**: Click row checkbox to select. Header checkbox selects/deselects all visible rows. Row clicks open detail view without affecting selection. - **Row selection and actions**: Users select rows via independent checkboxes (with a header checkbox for all visible rows), access actions via context menu. - **Overflow**: By default, if the total [width of columns](https://www.ag-grid.com/javascript-data-grid/column-sizing/#auto-sizing-columns) exceeds the grid width, horizontal scrolling is enabled. ## States Data grid columns, rows and cells have multiple states: Default, hover, active and focused. ![Data grid states](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=7743-1852&t=pnIkODidZu9oNqXj-4) ## Dos and Don’ts Do only display primary information by default and use [column tool panels](https://www.ag-grid.com/javascript-data-grid/tool-panel-columns/) for secondary information Do keep selection and row-click behavior independent to avoid confusion Do design responsive layouts that adapt to different screen sizes Don’t embed heavily interactive components within grid cells Don’t rely solely on color for status, use icons, labels or badges instead ## Related - [HTML Table](../html-grid) - [Key value list](../key-value-list) - [KPI](../kpi) - [Panes](../panes) - [Modal](../modal) --- ## Development import PropsApi from '@site/docs/autogenerated/api/ix-group/api.mdx'; import ItemPropsApi from '@site/docs/autogenerated/api/ix-group-item/api.mdx'; import GroupPlayground from '@site/docs/autogenerated/playground/group.mdx'; import GroupHeaderSuppressedPlayground from '@site/docs/autogenerated/playground/group-header-suppressed.mdx'; import GroupCustomEntryPlayground from '@site/docs/autogenerated/playground/group-custom-entry.mdx'; import GroupContextMenuPlayground from '@site/docs/autogenerated/playground/group-context-menu.mdx'; # Development ## Basic ## Suppress header selection ## Custom group entry ## Group with context menu :::info Please note that there is an issue with the slot rendering that can only be fixed with the next major version of Siemens iX. Luckily there exists a workaround for rendering context menus inside the group component. ::: To show a context menu place an `ix-dropdown` with `slot="dropdown"` combined with `ix-dropdown-item`'s inside the `ix-group-tag` tag. --- ## HTML table - Code import HtmlTablePlayground from '@site/docs/autogenerated/playground/html-table.mdx'; import HtmlTableStripedPlayground from '@site/docs/autogenerated/playground/html-table-striped.mdx'; # HTML table - Code ## Basic ## Striped --- ## HTML Table - Usage HTML tables display structured, tabular data enabling users to compare, sort, and filter information. In our applications, we use tables to present datasets where users need to quickly locate items and perform actions. Typically, we use tables for comparing data across rows and columns. For more complex datasets with advanced features, we recommend using [data grids](../grid). :::note The HTML table is not a dedicated web component, but rather styling applied to the standard HTML `` element. For a complete reference of all native HTML table properties and options, see the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/table). ::: ![Table overview](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=7694-3505&t=88rD8RIqPEX6oMWs-4) 1. Header row 2. Body row 3. Leading column 4. Column ## Options - **Striped**: Use alternating row colors to improve readability. ## Behavior in context - **Interaction**: By default, HTML tables do not include interactive features like sorting or selection. However, we can enhance tables with JavaScript to add sorting by clicking column headers and row selection via checkboxes. For more advanced interactions (e.g. filtering, grouping, inline editing), we recommend using [data grids](../grid) instead. - **Overflow**: By default, text wraps within cells. For tables with many columns, enable horizontal scrolling to maintain readability. ## Dos and Don’ts Do display only essential information Do design tables to adapt responsively to different screen sizes, e.g. by hiding less critical columns on smaller screens, enabling horizontal scrolling or wrapping content within cells Don’t use tables for unstructured or hierarchical data, use [event lists](../event-list) or [trees](../tree) instead Don’t rely solely on color for status; also use icons or labels for additional transparency ## Related - [Data Grid (AG Grid)](../grid) - [Panes](../panes) - [Button](../button) - [Application Header](../application-header) --- ## Icon button - Code import ButtonWithIconPlayground from '@site/docs/autogenerated/playground/button-with-icon.mdx'; import PropsApi from '@site/docs/autogenerated/api/ix-icon-button/api.mdx'; # Icon button - Code ## Basic --- ## Icon button - Usage Icon buttons are button elements containing only an icon and no text. Due to their small size, icon buttons are often used in complex layouts. We only use icon buttons if a well-known icon is available or the meaning of the icon metaphor is clear from the context. ![Overview](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=6403-7454&t=rJDt18BP7skzAPnM-4) 1. Container 2. Icon All the variants, options and states of the [button](../button) component apply to the icon button. We’ve listed additional or deviating specifications here. ## Options - **Color:** The color of the icon displayed on an icon button is adjustable. In our applications, we only adjust the icon color when we place icon buttons on backgrounds with a non-standard color to maintain a proper contrast between the elements. - **Oval:** The shape of icon buttons can be adjusted from square to oval. The recommended shape of icon buttons depends on the shape of the parent component. We typically use square icon buttons within rectangular components or in a button cluster, and oval icon buttons within oval components. - **Size:** Icon buttons can have three different sizes. We use the extra small size (12) within very small parent components, the small size (16) within any standard parent components (e.g. to clear the search input) and the default size (24) for standalone applications. ## Dos and Don’ts Do use icons that have a clear meaning for the user, otherwise use text buttons Don’t use icon buttons in large numbers, instead use a toolbar Don’t stretch icon buttons to span a container’s width ## Related - [Button](../button) --- ## Input - Code import InputPlayground from '@site/docs/autogenerated/playground/input.mdx'; import InputDisabledPlayground from '@site/docs/autogenerated/playground/input-disabled.mdx'; import InputLabelPlayground from '@site/docs/autogenerated/playground/input-label.mdx'; import InputPatternPlayground from '@site/docs/autogenerated/playground/input-pattern.mdx'; import InputReadonlyPlayground from '@site/docs/autogenerated/playground/input-readonly.mdx'; import InputTypesPlayground from '@site/docs/autogenerated/playground/input-types.mdx'; import InputValidationPlayground from '@site/docs/autogenerated/playground/input-validation.mdx'; import InputWithSlotsPlayground from '@site/docs/autogenerated/playground/input-with-slots.mdx'; import PropsApi from '@site/docs/autogenerated/api/ix-input/api.mdx'; # Input - Code ## Basic ## Disabled ## Label ## Pattern ## Readonly ## Types ## Validation ## Slots --- ## Input - Usage Input fields are commonly used in forms, search bars and other areas where data input is required. ![Overview](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?node-id=3054-593&t=jhhv5OZGqmBpgXcs-4) 1. Label 2. Required indicator 3. Placeholder 4. Slot-end 5. Slot-start 6. Container 7. Helper or feedback text 8. Counter ## Options - **Label:** See [form field](../forms-field). - **Slot options:** Add optional elements at the end and/or start of the input field, e.g. an icon, a button or a text option. We typically use slots for additional indications, options or information like a visibility toggle in a password field. - **Placeholder**: Use a placeholder to provide a hint about what to enter or additional relevant context while the input field is empty. We typically use a placeholder when the label is not visible or we need to provide additional context. - **Text alignment:** See [form field](../forms-field) (by default at start). - **Helper text:** See [form field](../forms-field). - **Counter:** See [form field](../forms-field). - **Feedback text**: See [form field](../forms-field). ## Behavior in context - **Validation:** See [validation](../forms-validation). - **Interaction**: Clicking in the container enables the editing of the field. - **Text truncation**: The text in an input field is cut off with the length of the container. - **Alignment**: Inputs are always aligned to the left, while right alignment is reserved exclusively for [number fields](../input-number). ## States The input field has five states: default, focused, hover, disabled and read-only. In the read-only state, the input field is displayed without offering any user interaction. ![Field States](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?node-id=3198-7167&t=jhhv5OZGqmBpgXcs-4) ## Dos and Don’ts Do ensure that the width of the input field is appropriate for the expected content ## Related - [Form field](../forms-field) - [Validation](../forms-validation) - [Layout](../forms-layout) - [Number input](../input-number) - [Date input](../input-date) --- ## Date input - Code import DateInputPlayground from '@site/docs/autogenerated/playground/date-input.mdx'; import DateInputDisabledPlayground from '@site/docs/autogenerated/playground/date-input-disabled.mdx'; import DateInputLabelPlayground from '@site/docs/autogenerated/playground/date-input-label.mdx'; import DateInputReadonlyPlayground from '@site/docs/autogenerated/playground/date-input-readonly.mdx'; import DateInputValidationPlayground from '@site/docs/autogenerated/playground/date-input-validation.mdx'; import DateInputWithSlotsPlayground from '@site/docs/autogenerated/playground/date-input-with-slots.mdx'; import DateInputMinMaxDatePlayground from '@site/docs/autogenerated/playground/date-input-min-max-date.mdx' import PropsApi from '@site/docs/autogenerated/api/ix-date-input/api.mdx'; # Date input - Code ## Basic ## Disabled ## Label ## Readonly ## Validation ## Slots ## Min- and max-date --- ## Date input - Usage ![Date input overview](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?node-id=3629-6200&t=ADQCetGKOEH1WG2r-4) 1. Label 2. Required field indicator 3. Current value 4. Calendar icon button 5. Input field 6. Date dropdown 7. Month and year selection 8. Weekdays 9. Week numbers 10. Current day 11. Selected date or date range ## Options - **Label**: See [form field](../forms-field/guide#options). - **Required**: See [form field](../forms-field/guide#options). - **Helper text**: See [form field](../forms-field/guide#options). - **Feedback text**: See [form field](../forms-field/guide#options). - **Show text as tooltip**: See [form field](../forms-field/guide#options). - **Placeholder**: See [form field](../forms-field/guide#options). We typically use a placeholder to show an example date format to assist users when the field is empty. - **Text alignment:** See [form field](../forms-field/guide#options) (by default at start). - **Error message**: Feedback text when date is not parsable. We typically use this to inform users that the entered date format is incorrect and guide them to enter a valid date. - **Format**: Specify the date format, default `yyyy/LL/dd` to ensure that dates are entered in a consistent and recognizable format. ## Behavior in context - **Interaction**: - Click or focus opens the date picker. - Use mouse or keyboard arrows to navigate to the desired date. - Selecting a date in date picker with mouse click or enter closes the date picker. - Typing a date into input field with valid format closes the date picker. - Escape key closes the date picker. - **Validation**: - Use feedback text for validation types valid, info, warning and invalid. - Invalid feedback is automatically provided if the entered date is not parsable. - Refer to the [validation](../forms-validation) chapter for detailed guidelines. - **Overflow**: The input field should be wide enough to display the full date without truncation. - **Alignment**: Date inputs are always aligned to the left. ## States Date input has five states: Default, hover, disabled, read-only and focused. ![Date input states](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?node-id=3989-2545&t=ADQCetGKOEH1WG2r-4) ## Dos and Don’ts Do use consistent date formats throughout the application to avoid confusion Do use separate inputs for start and end dates to simplify date ranges Do provide clear instructions, such as “Enter the date in yyyy/mm/dd format” Do consider localization to adapt date formats to local conventions Don’t use ambiguous formats like 09/08/2006 without giving clear context Don’t allow free text without validation or formatting guidance ## Related - [Date dropdown](../date-dropdown) - [Date picker](../date-picker) - [Date time picker](../date-picker) - [Forms field](../forms-field) - [Validation](../forms-validation) - [Dropdown](../dropdown) - [Input](../input) - [Select](../select) - [W3C date picker accessibility reference](https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-datepicker/) --- ## Date time input - Code import DatetimeInputPlayground from '@site/docs/autogenerated/playground/datetime-input.mdx'; import DatetimeInputDisabledPlayground from '@site/docs/autogenerated/playground/datetime-input-disabled.mdx'; import DatetimeInputLabelPlayground from '@site/docs/autogenerated/playground/datetime-input-label.mdx'; import DatetimeInputReadonlyPlayground from '@site/docs/autogenerated/playground/datetime-input-readonly.mdx'; import DatetimeInputValidationPlayground from '@site/docs/autogenerated/playground/datetime-input-validation.mdx'; import DatetimeInputWithSlotsPlayground from '@site/docs/autogenerated/playground/datetime-input-with-slots.mdx'; import DatetimeInputMinMaxDatePlayground from '@site/docs/autogenerated/playground/datetime-input-min-max-date.mdx'; import PropsApi from '@site/docs/autogenerated/api/ix-datetime-input/api.mdx'; # Date time input - Code ## Basic ## Disabled ## Label ## Readonly ## Validation ## Slots ## Min- and max-date --- ## Date time input - Usage ![Date time input overview](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=7441-86110&t=BStIEA03mmCLaHAL-4) 1. Label 2. Required field indicator 3. Current date and time value 4. Calendar [icon button](../icon-button) 5. [Input field](../input) 6. [Date time picker](../date-time-picker) 7. Month and year navigation ## Options - **Label**: See [form field](../forms-field/guide#options). - **Required**: See [form field](../forms-field/guide#options). - **Helper text**: See [form field](../forms-field/guide#options). - **Feedback text**: See [form field](../forms-field/guide#options). - **Show text as tooltip**: See [form field](../forms-field/guide#options). - **Placeholder**: See [form field](../forms-field/guide#options). We typically use a placeholder to show an example date time format to assist users when the field is empty. - **Text alignment**: See [form field](../forms-field/guide#options) (by default at start). - **Error message**: Feedback text when date or time is not parsable. We typically use this to inform users that the entered date time format is incorrect and guide them to enter a valid date and time. - **Format**: Choose the date and time format, e.g. `yyyy/LL/dd` and `HH:mm:ss`. - **Min and max dates**: Restrict the selectable date range by defining the earliest and latest dates users can choose. - **Date time picker appearance**: See [date time picker](../date-time-picker/guide#options). - **Week start**: Define which day the week starts on. By default, it will be defined based on the locale. - **Week numbers**: Show calendar weeks on the left side of the calendar when needed for reference. ## Behavior in context - **Interaction**: - Click opens date time pickers. Via keyboard focus followed by arrow down key also opens it. - Use mouse or keyboard arrows to navigate to the desired date and adjust the time. - Confirm closes the date time picker and applies the selection. - Typing a valid date and time into input field closes the picker. - Escape key closes the date time picker. - **Validation**: - Use feedback text for validation types valid, info, warning and invalid. - Invalid feedback is automatically provided if the entered date or time is not parsable. - Refer to the [validation](../forms-validation) chapter for detailed guidelines. - **Overflow**: The input field should be wide enough to display the full date and time without truncation. - **Alignment**: Date time inputs are aligned to the left by default. - **Combined selection**: Users select both a date and a time before confirming their choice. The selection is only finalized when the confirmation button is clicked. ## States Date time input has five states: Default, hover, disabled, read-only and focused. ![Date time input states](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=7441-86123&t=BStIEA03mmCLaHAL-4) ## Dos and Don’ts Do use consistent date and time formats throughout the application to avoid confusion Do provide clear instructions on the expected format, such as "Enter the date time in yyyy/mm/dd HH:mm format" Do consider localization to adapt date and time formats to local conventions Do use separate inputs for start and end date times when defining time ranges Don't use date time inputs when only a date or only a time is needed (use [date input](../input-date) or [time input](../input-time) instead) ## Related - [Time picker](../time-picker) - [Date time picker](../date-time-picker) - [Time input](../input-time) - [Date input](../input-date) - [Forms field](../forms-field) - [Validation](../forms-validation) - [Writing guidelines for date and time](../../guidelines/language/formatting/date.mdx) - [W3C date picker accessibility reference](https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-datepicker/) --- ## Number input - Code import NumberInputPlayground from '@site/docs/autogenerated/playground/number-input.mdx'; import NumberInputDisabledPlayground from '@site/docs/autogenerated/playground/number-input-disabled.mdx'; import NumberInputLabelPlayground from '@site/docs/autogenerated/playground/number-input-label.mdx'; import NumberInputReadonlyPlayground from '@site/docs/autogenerated/playground/number-input-readonly.mdx'; import NumberInputStepperButtonPlayground from '@site/docs/autogenerated/playground/number-input-stepper-button.mdx'; import NumberInputValidationPlayground from '@site/docs/autogenerated/playground/number-input-validation.mdx'; import NumberInputWithSlotsPlayground from '@site/docs/autogenerated/playground/number-input-with-slots.mdx'; import PropsApi from '@site/docs/autogenerated/api/ix-number-input/api.mdx'; # Number input - Code ## Basic ## Disabled ## Label ## Readonly ## Stepper buttons ## Validation ## Slots --- ## Number input - Usage The number input component is commonly used in forms, calculators and other areas where precise numerical input is required. We typically use the number input component to ensure accurate and efficient data entry. ![Number input overview](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?node-id=3805-24565&t=DtCmoFcLwhf7ke3S-4) 1. Label 2. Required field indicator 3. Value 4. Stepper buttons 5. Input field 6. Helper or feedback text ## Options - **Label**: See [form field](../forms-field). - **Value**: See [form field](../forms-field). - **Required**: See [form field](../forms-field). - **Helper text**: See [form field](../forms-field). - **Show text as tooltip**: See [form field](../forms-field). - **Placeholder**: See [form field](../forms-field). - **Text alignment:** See [form field](../forms-field) (by default at end). - **Allowed characters pattern**: Specify the characters allowed for input. We typically use this to reject invalid characters, such as decimal points. When users type an invalid character, a shaking animation is immediately triggered. - **Pattern**: Define the expected input using regular expressions, such as an integer between 1 and 100. We often use this to validate the input when the user leaves the field or clicks submit. - **Min/Max**: Specify the minimum and maximum values that can be entered to ensure the input stays within the defined range. We typically use this option to prevent invalid entries and guide users towards acceptable values. - **Show stepper buttons**: Use these optional controls to increment or decrement the value (suitable for small ranges with few steps). We typically use these buttons when precise adjustments are needed, such as in quantity selectors, rating systems or form inputs requiring fine-tuned numerical values. ## Behavior in context - **Interaction:** Users can type a value or use stepper buttons to adjust it. We recommend using stepper buttons, especially for touch interactions, to enhance usability and precision. - **Validation:** See [form field](../forms-validation). - **Overflow:** Numbers are truncated to fit within the input field. Ensure that the expected value is visible in the input field so it can be properly displayed. - **Alignment:** Number inputs are always aligned to the right. - **Display format:** After losing focus, scientific notations are converted into standard numeric formats, e.g. 1e3 becomes 1000, 1e-3 becomes 0.001. ## States The number input has five states: default, hover, focused, disabled and read-only. ![Number input states](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?node-id=4097-1041&t=lGjPn4Q9U7Fa81TI-4) ## Dos and Don’ts Do consider special cases such as zero, negative numbers and very large numbers to ensure all possible inputs are handled correctly Don’t specify patterns that do not align with your use case, e.g. inappropriate intervals between valid values ## Related - [Form fields](../forms-field) - [Validation](../forms-validation) - [Layout](../forms-layout) - [Input](../input) - [Select](../select) --- ## Time input - Code import TimeInputPlayground from '@site/docs/autogenerated/playground/time-input.mdx'; import TimeInputDisabledPlayground from '@site/docs/autogenerated/playground/time-input-disabled.mdx'; import TimeInputLabelPlayground from '@site/docs/autogenerated/playground/time-input-label.mdx'; import TimeInputReadonlyPlayground from '@site/docs/autogenerated/playground/time-input-readonly.mdx'; import TimeInputValidationPlayground from '@site/docs/autogenerated/playground/time-input-validation.mdx'; import TimeInputWithSlotsPlayground from '@site/docs/autogenerated/playground/time-input-with-slots.mdx'; import PropsApi from '@site/docs/autogenerated/api/ix-time-input/api.mdx'; # Time input - Code ## Basic ## Label ## Disabled ## Readonly ## Validation ## Slots --- ## Time input - Usage Time inputs are typically used in forms, filters and scheduling tools to ensure consistent and accurate time entries. Standardizing time inputs ensures data integrity and improves the user experience in applications requiring precise time information. ![Time input overview](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=5647-1381&t=X5f645XuQl3ZV8XD-4) 1. Label 2. Required field indicator 3. Current value 4. Clock [icon button](../icon-button) 5. [Input field](../input) 6. [Time picker](../time-picker) ## Options - **Label**: See [form field](../forms-field). - **Required**: See [form field](../forms-field). - **Helper text**: See [form field](../forms-field). - **Feedback text**: See [form field](../forms-field). - **Show text as tooltip**: See [form field](../forms-field). - **Placeholder**: See [form field](../forms-field). We typically use a placeholder to show an example time format to assist users when the field is empty. - **Text alignment:** See [form field](../forms-field/guide#options) (by default at start). - **Error message**: Feedback text when time is not parsable. We typically use this to inform users that the entered time format is incorrect and guide them to enter a valid time. - **Format**: Specify the time format to ensure that times are entered in a consistent and recognizable format. Default is `TT` which is the localized 24-hour time with seconds (read more in the [UX writing guidelines](./../../guidelines/language/writing-style-guide-getting-started)). - **Columns**: Show the respective columns in the time picker (see [time picker](../time-picker/guide#options)). - **Intervals**: Define intervals to restrict allowed values (see [time picker](../time-picker/guide#options)). - **Time picker**: See [time picker](../time-picker/guide#options) - **Header**: Hide the header when there is a label on the input, or if the context is conveyed in another way. - **Corners** - **Standalone appearance** ## Behavior in context - **Interaction**: - Click or focus opens the time picker. - Scroll via mouse or touch, or keyboard arrows navigates to the desired time. - Confirm closes the time picker. - Escape key closes the time picker. - **Validation**: - Use feedback text for validation types valid, info, warning and invalid. - Invalid feedback is automatically provided if the entered time is not parsable. - Refer to the [validation](../forms-validation) chapter for detailed guidelines. - **Overflow**: Input fields should be wide enough to display the full time without truncation. - **Alignment**: Time inputs are always aligned to the left. ## States Time input has five states: Default, hover, disabled, read-only and focused. ![Time input states](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=7147-9559&t=DrLi4Tgyh22TBGiT-4) ## Dos and Don’ts Do use consistent time formats throughout the application to avoid confusion Do add helper text to clarify the time format being used Do ensure the time picker is accessible via keyboard Do consider localization to adapt time formats to local conventions Don’t use the same input for start and end times, instead separate them ## Related - [Time picker](../time-picker) - [Date time picker](../date-time-picker) - [Date time input](../input-date-time) - [Forms field](../forms-field) - [Validation](../forms-validation) - [Writing guidelines for date and time](../../guidelines/language/formatting/date.mdx) - [W3C date picker accessibility reference](https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-datepicker/) --- ## Key value - Code import PropsApi from '@site/docs/autogenerated/api/ix-key-value/api.mdx'; import KeyValuePlayground from '@site/docs/autogenerated/playground/key-value.mdx'; import KeyValueWithCustomValuePlayground from '@site/docs/autogenerated/playground/key-value-with-custom-value.mdx'; import KeyValueWithIconPlayground from '@site/docs/autogenerated/playground/key-value-with-icon.mdx'; import KeyValueWithLabelLeftPlayground from '@site/docs/autogenerated/playground/key-value-with-label-left.mdx'; # Key value - Code ## Basic ## With custom value ## With icon ## With label on left side --- ## Key value list - Code import PropsApi from '@site/docs/autogenerated/api/ix-key-value-list/api.mdx'; import KeyValueListPlayground from '@site/docs/autogenerated/playground/key-value-list.mdx'; import KeyValueListWithCustomValuePlayground from '@site/docs/autogenerated/playground/key-value-list-with-custom-value.mdx'; import KeyValueListWithIconPlayground from '@site/docs/autogenerated/playground/key-value-list-with-icon.mdx'; import KeyValueListStripedPlayground from '@site/docs/autogenerated/playground/key-value-list-striped.mdx'; # Key value list - Code ## Basic ## With custom value ## With icon ## Striped --- ## KPI - Code import PropsApi from '@site/docs/autogenerated/api/ix-kpi/api.mdx'; import KpiPlayground from '@site/docs/autogenerated/playground/kpi.mdx'; # KPI - Code ## Basic --- ## Layout auto - Code import LayoutAutoPlayground from '@site/docs/autogenerated/playground/layout-auto.mdx'; import LayoutAutoCustomPlayground from '@site/docs/autogenerated/playground/layout-auto-custom.mdx'; import PropsApi from '@site/docs/autogenerated/api/ix-layout-auto/api.mdx'; # Layout auto - Code ## Basic ## Custom columns --- ## Layout grid - Code import PropsApi from '@site/docs/autogenerated/api/ix-layout-grid/api.mdx'; import ColPropsApi from '@site/docs/autogenerated/api/ix-col/api.mdx'; import GridPlayground from '@site/docs/autogenerated/playground/grid.mdx'; import GridSizePlayground from '@site/docs/autogenerated/playground/grid-size.mdx'; import GridPaddingPlayground from '@site/docs/autogenerated/playground/grid-padding.mdx'; # Layout grid - Code ## Basic ## Size ## Padding --- ## Layout grid - Usage With layout grids, a two-dimensional layout system is available to create responsive layouts. Our layout grids are made of three elements: a grid, row(s) and column(s). The layout grid adapts to screen size and orientation. Commonly, the layout grid is based on a 12 column layout. Columns are nested in rows and adapt in width according to the available space. Content is placed within columns. Column widths are set as percentage. ![Layout grid overview](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=800-2637&mode=design&t=R26qUrZCUTY2iIxG-1) 1. Layout grid 2. Row 3. Column 4. Gutter 5. Margin ## Options ## Layout grid options - The default number of columns in a grid is 12. It is possible to choose any number of columns between 2 and 12. - Layout grids contain horizontal margins. For smaller viewports or when used within a component, the margin can be removed or reduced. - As a general rule, a gutter of `1.5rem` is applied. The gutter can be decreased to allow for a narrower grouping of columns. ## Column options - The size of a column is defined by the available space and the number of columns. If no size is set, columns automatically have equal width. The size of a column can be adjusted so that it takes a higher percentage of the available space. The size property refers to the number of columns from the default of 12 per row. Example: In a 12 column layout with 6 columns with equal width in place, each column takes a space of 1/6 (or 2 out of 12). When setting the size of the first column to `3` (corresponding to 3 out of 12), the remaining columns adjust their width to fit within the remaining space of 3/4 (or 9 out of 12). ![Example for column size option](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=796-3&mode=design&t=R26qUrZCUTY2iIxG-1) - A column size `auto` is available. When set to `auto`, column width is defined by the width of its content. The remaining columns resize to fill the row. - Column size can be tailored to viewports. Three viewports are currently supported. The viewport size can't be adjusted at this point. When setting the size for one viewport, larger viewports are adjusted in the same way. | Viewport name | Viewport size | Description | | ------- | ------------- | ---------------------------------- | | Small | 0-767 | set columns when min width is 0 | | Medium | 768-1279 | set columns when min width is 768 | | Large | 1280+ | set columns when min width is 1280 | Example: Here is an example of a 12 column layout grid with 4 columns, each with equal width. The columns' `size` is set to `12` and for medium viewports and larger (`size md`) it is set to `3`. On small viewports, the columns take the full width and stack vertically. For medium and large viewports, columns take equal width. ![Example for viewport-based column sizes](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=800-23920&mode=design&t=R26qUrZCUTY2iIxG-1) ## Behavior in context Decreasing and increasing the viewport width influences the width of each column within a layout grid. When column width is decreased to the point that the minimum content width is reached for at least one column, the layout breaks into a second line. --- ## Line chart import EchartsLineSimplePlayground from '@site/docs/autogenerated/playground/echarts-line-simple.mdx'; import EchartsLineMultipleYAxisPlayground from '@site/docs/autogenerated/playground/echarts-line-multiple-y-axis.mdx'; import EchartsLineAdvancedPlayground from '@site/docs/autogenerated/playground/echarts-line-advanced.mdx'; # Line chart - Code ## Basic Basic line charts use a series of data points connected by straight lines to show changes in values, making it easy to identify patterns, trends and fluctuations. Line charts are particularly effective for displaying continuous data, such as stock prices, temperature changes or sales figures. Their simplicity and clarity make them a popular choice for dashboards, where understanding data trends is essential. ## Multi-y-axis line charts Multi-y-axis line charts are used to compare multiple data series that have different scales or units of measurement. By using multiple y-axes, you can display data with different ranges on the same chart, making it easier to compare trends and relationships between variables. Multi-y-axis line charts are particularly useful when visualizing data with distinct patterns or trends. ## Advanced line charts Advanced line charts are an enhanced version of basic line charts, designed to provide deeper insights and a more detailed analysis of data trends. These charts often incorporate features such as multiple data series, interactive elements, and additional annotations to highlight key points or events. Advanced line charts can also include trend lines, moving averages and other statistical tools to help identify patterns and correlations. ## Dos and Don’ts Do start the Y-axis at zero and label axes clearly Do use contrasting colors for multiple lines to better distinguish different data series Do use consistent intervals on axes Do highlight important data points Do use visual cues to show gaps in data Don’t overcrowd the chart with colors Don’t clutter the chart with too many lines, we recommend no more than 7 lines --- ## Link button - Code import PropsApi from '@site/docs/autogenerated/api/ix-link-button/api.mdx'; import LinkButtonPlayground from '@site/docs/autogenerated/playground/link-button.mdx'; import LinkButtonDisabledPlayground from '@site/docs/autogenerated/playground/link-button-disabled.mdx'; # Link button - Code ## Basic ## Disabled --- ## Link button - Usage ![Overview](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=1506-4003&mode=design&t=5MYmq6zAbfw7xIkC-11) 1. Chevron 2. Label :::info Use inline [hyperlinks](https://developer.mozilla.org/de/docs/Web/HTML/Reference/Elements/a) for inline links `` instead of link buttons, e.g. within a paragraph. They are styled and ready to use without additional configuration needed. ::: ## Options - **Target:** Define where a link opens (see [official MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/a#target)): - `_self`: Opens the target in the same tab. - `_blank`: Opens the target in a new tab. - `_parent`: Opens the target in the parent frame. - `_top`: Opens the target in the full body of the window. - **URL:** Specify the link destination. ## Behavior in context - **Interaction:** Link buttons can be triggered by pressing anywhere within the button area. When link buttons are focused, they can be triggered by pressing `Enter`. - **Placement:** We typically place link buttons below or next to related content but not within paragraphs. It's also possible to place multiple link buttons on top of each other to create link lists. - **Line length:** Link buttons cannot support line break or text truncation. Link button texts are displayed in one line. If there is not enough space, the complete link text is not visible. ## States Link buttons take five states: Default, hover, active, disabled and focused. On hover, the link destination is shown. In a disabled state, link buttons are visually displayed but don’t offer any user interaction. ![States](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=1507-9250&mode=design&t=5MYmq6zAbfw7xIkC-11) ## Dos and Don’ts Do use link buttons for navigation Don’t use link buttons to indicate actions Don’t place link buttons within a paragraph --- ## Loading modal - code import LoadingModalUtils from '@site/docs/autogenerated/utils/loading.mdx'; import LoadingService from "@site/docs/autogenerated/utils/loading.service.mdx"; import ModalLoadingPlayground from "@site/docs/autogenerated/playground/loading.mdx"; # Loading modal - code ## Loading How to open a loading modal is independent of the framework in use. Note that you need to import `showModalLoading` from the core package `@siemens/ix`. ## API for loading modal utils (JavaScript, React, Vue) ### Functions ## API for LoadingService (Angular) ### Functions --- ## Loading modal - usage Loading modals communicate that the system is performing an operation that takes time and that users should wait. Use them for short blocking tasks (upload, processing) where users should not interact with the page until completion. ![Loading modal](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=7351-4017&t=WHbXyipgpGwQbVsV-4) 1. Spinner 2. Message ## Options - **Message**: Provide a concise, contextual message that explains what is happening (e.g. "Uploading files" instead of "Loading", see [writing guidelines](../../guidelines/language/dialogs-and-buttons)). - **Centered**: Center- or top-align loading modals consistently with other [modals](../modal) in your app. ## Behavior in context - **Interaction:** Loading modals open and close automatically to prevent user interaction. - **Overflow:** If the message exceeds the available width, it breaks into multiple lines. - **Placement:** Vertically centered or top-aligned, horizontally centered. - **Responsiveness:** Loading modals adjust their width depending on the screen width. ## States Loading modals have two states: Closed and opened. ## Dos and Don’ts Do only use if any user interaction needs to be blocked, otherwise use [spinners](../spinner) instead Do use if user interaction needs to be blocked and the progress is unknown, otherwise use [progress indicators](../progress-indicator) placed in [custom modals](../modal) instead Don’t block users for long tasks without an alternative Don’t show vague messages that leave users unsure what is happening ## Related - [Message modal](../message-modal) - [Custom modal](../modal) - [Progress indicator](../progress-indicator) - [Toasts](../toast) - [Accessibility](../../guidelines/accessibility) --- ## Code import ModalMessagePlayground from '@site/docs/autogenerated/playground/message.mdx'; import MessageModalUtils from '@site/docs/autogenerated/utils/message.mdx'; import MessageModalService from '@site/docs/autogenerated/utils/message.service.mdx'; How to open a message modal is independent of the framework in use. Note that you need to import `showMessage` from the core package `@siemens/ix`. `showMessage` provides multiple pre-configured messages: - info - warning - error - success - question The `showMessage` method returns a Listener with the following signature: ```ts TypedEvent<{ actionId: string; payload: T; }>; ``` `actionId` represents the configured action button. ## API for message modal utils (JavaScript, React, Vue) ### Functions ## API for MessageService (Angular) ### Functions --- ## Message modal - usage import { IxButton } from '@siemens/ix-react'; # Message modal - usage Message modals present short messages, confirmations or important alerts that require a decision or acknowledgment. Use them for confirmations, simple decisions and critical alerts that need user action before proceeding. ![Message modal](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=7349-215&t=WHbXyipgpGwQbVsV-4) 1. Icon 2. Title 3. Close button 4. Message 5. Cancel action 6. Confirm action ## Variants - **Error:** Use for system failures, validation issues or blocking errors. - **Info:** Use for neutral information, instructions or notifications. - **Question:** Use for confirmations requiring user decisions. - **Success:** Use for completed actions when another action is needed, e.g. download backup or copy generated link. - **Warning:** Use for potential issues or action consequences, e.g. overwrite files. ![Message modal variants](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=7376-535&t=APgwguIwWKMbj5sA-4) ## Options - **Title:** Use a clear, outcome-oriented title (e.g. "Delete item", see [writing guidelines](/docs/guidelines/language/dialogs-and-buttons)). - **Message:** Include if you need to provide additional information, e.g. consequences (see [writing guidelines](/docs/guidelines/language/messaging/error-messages)). - **Confirm action:** Use precise action text, e.g. "Delete", "Confirm", or "Continue". - **Cancel action:** Use "Cancel" or "Close". We recommend returning to the previous context the user was in. - **Close on backdrop click:** Enable clicking on the backdrop to close modals for informational messages. Disable for critical decisions that require confirmation. Note that the choice of button variant is independent from the modal variant, e.g.: | Visual | Content and buttons | | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | | ![Error](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=7351-3560&t=WHbXyipgpGwQbVsV-4) | **Title:** A system error occurred**Variant:** Error**Buttons:** Subtle primary button "Reload" and primary button "Try again" | | ![Question delete](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=7351-3731&t=WHbXyipgpGwQbVsV-4) | **Title:** Deleting this item cannot be undone**Variant:** Question**Buttons:** Primary danger button "Delete" and primary ghost button "Cancel" | | ![Question discard](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=7351-3947&t=WHbXyipgpGwQbVsV-4) | **Title:** Do you want to save your changes before leaving?**Variant:** Question**Buttons:** Primary button "Save changes", secondary button "Cancel" and tertiary button "Discard" | Since our web component offers a predefined cancel and confirm action use [modals](../modal) if you intend to adapt the button arrangement or variants. ## Behavior in context - **Interaction:** See [custom modal behavior](../modal/guide.md#behavior-in-context). - **Placement:** Horizontally centered, vertically top-aligned. ## States Message modals have two states: Closed and opened. ## Dos and Don’ts Do use action labels that describe the result (avoid Yes or No) Do communicate consequences clearly for destructive actions Do keep messages short and scannable Don’t use message modals for non-essential information, use [toasts](../toast) instead Don’t hide confirm actions behind ambiguous labels ## Related - [Custom modal](../modal) - [Loading modal](../loading-modal) - [Toast](../toast) - [Message bar](../messagebar) - [Accessibility](../../guidelines/accessibility) --- ## Message bar - Code import PropsApi from '@site/docs/autogenerated/api/ix-message-bar/api.mdx'; import MessageBarPlayground from '@site/docs/autogenerated/playground/message-bar.mdx'; import MessageBarRemovalPlayground from '@site/docs/autogenerated/playground/message-bar-removal.mdx'; # Message bar - Code The message bar Web Component only provides the visual appearance of the message bar. To fully utilize the message bar, you need to implement a mechanism to remove it from the DOM when it is no longer needed. This typically involves handling the close event and updating the state of your application to reflect the removal of the message bar. ## Basics ## Dismissible --- ## Modal - Code import PropsHeaderJavaScriptApi from '@site/docs/autogenerated/api/ix-modal-header/api.mdx'; import ModalUtils from '@site/docs/autogenerated/utils/modal.mdx'; import ModalConfig from '@site/docs/autogenerated/utils/modal-config.mdx'; import ModalInstance from '@site/docs/autogenerated/utils/modal-instance.mdx'; import ModalSizesPlayground from '@site/docs/autogenerated/playground/modal-sizes.mdx'; import Playground from '@site/src/components/Playground'; import modal_by_template_ts_angular from '@site/docs/autogenerated/usage/angular/modal-by-template.ts.md'; import modal_by_instance_ts_angular from '@site/docs/autogenerated/usage/angular/modal-by-instance.ts.md'; import modal_by_instance_content_ts_angular from '@site/docs/autogenerated/usage/angular/modal-by-instance-content.ts.md'; import modal_tsx_react from '@site/docs/autogenerated/usage/react/modal.tsx.md'; import modal_vue_vue from '@site/docs/autogenerated/usage/vue/modal.vue.md'; import modal_html_html from '@site/docs/autogenerated/usage/html/modal.html.md'; import loading_tsx_react from '@site/docs/autogenerated/usage/react/loading.tsx.md'; import message_tsx_react from '@site/docs/autogenerated/usage/react/message.tsx.md'; import ModalService from '@site/docs/autogenerated/utils/modal.service.mdx'; # Modal - Code Our modals support the following sizes: - `360` - `480` - `600` - `720` - `840` - `full-width` - Modal extends to fill entire screen width (modal will still have some horizontal margin) - `full-screen` - Modal extends to fill entire screen The `size` can be configured over the configuration object of the `showModal` function. ## Custom How to open a modal depends on the framework in use. Note that you will not instantiate `ix-modal` on your own. Select the appropriate section below for the respective usage information. ### Angular #### By template #### By instance `@siemens/ix-angular` provides an injectable service that allows to open modal dialogs based on a `ng-template` reference or by component type. If you want to pass arbitrary data to the modal use the `data`-property. In order to access that data inside the modal template, use `let-modal` as seen in the angular example above. **ModalService** ```ts open(config: ModalConfig): Promise> ``` ### React `@siemens/ix-react` provides an function that allows to open modal dialogs based on a `JSXElement`. :::info Use context It is highly recommended to provide the `IxApplicationContext` as part of your application. ::: ```tsx ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render( {/* */} ); ``` ### Vue `@siemens/ix-vue` provides a function that allows to open modal dialogs based on a `VNode`. :::info JSX/TSX support The example above is using TSX. To add JSX/TSX support in your Vue project, please refer to the [Vue documentation](https://vuejs.org/guide/extras/render-function.html#jsx-tsx). It is not required to use JSX and as an alternative you can use the [`h()`](https://vuejs.org/guide/extras/render-function.html#creating-vnodes) function to create the modal's VNode. ::: :::warning Use context It is required to provide the `IxApplicationContext` as part of your application in order to use the `showModal` function. ::: ```vue ``` ### Javascript ## API for modal utils (JavaScript, React, Vue) ### Functions ## API for ModalService (Angular) ### Functions --- ## Custom modal - Usage Custom modals present rich, contextual content, e.g. forms, complex workflows or nested interactions that require the user's focus. Use custom modals when a task requires immediate attention and the user returns to the same place after closing the modal. ![Modal overview](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=7350-2529&t=WHbXyipgpGwQbVsV-4) 1. Title 2. Close button 3. Modal header 4. Modal content 5. Modal footer ## Options - **Centered**: Center content by default; use top alignment for tall dialogs that expand during interaction. - **Size**: Choose an appropriate size based on context and device: - **Fixed max-width (360-840px):** Use as default for most layouts. Note that on narrower screens or viewports, the modal scales down and becomes proportionally narrower to fit the available space. - **Full width:** Use for data-heavy interfaces on desktop, e.g. large datasets. - **Full screen:** Since the modal container covers the whole [application](../application) (including [menu](../application-menu) and [header](../application-header)), use for immersive experiences or multi-step workflows. Note that users have no visual connection to the app which is why we recommend establishing it in the title or content. - **Backdrop**: Use a backdrop to focus attention and prevent background interaction. - **Animation**: By default, modals fade in. Disable for performance-sensitive contexts. - **Is non-blocking**: Hides the backdrop. Use to allow interaction with the background content while the modal is open, e.g. to copy data from the page into the modal. - **Close on backdrop click**: Enable clicking on the backdrop to close modals for informational messages. Disable for critical decisions that require confirmation. - **Before dismiss**: Add follow-up actions when users try to close modals, e.g. add a confirmation prompt to avoid unintentional discarding of inputs when closing. - **Modal header:** - **Title**: Use a short, specific title that describes the task or decision. - **Icon and icon color:** Repeat icons from the trigger to establish a connection (e.g. if a button with label and icon opens the modal then reuse the same label and icon). Use [iX theme colors](../../styles/colors). - **Hide close**: We recommend only hiding the close button for critical flows that require an explicit decision. - **Modal footer:** Place one primary, one secondary and optionally one tertiary [button](../button) on the right side to follow the Z-shape reading pattern in left-to-right languages. ## Behavior in context - **Interaction:** - Modals are opened by the system (e.g. when another process finishes) or by users (e.g. when clicking buttons). - Modals are closed: - When clicking on close or on buttons in the footer (typically cancel or confirm). - When pressing the Escape key. - If enabled, when clicking outside the modal (on the backdrop). - Focus moves into the modal when it opens and returns to the trigger when it closes. - **Overflow:** - The modal height increases with content until reaching screen height, then a scrollbar appears. - We recommend implementing a sticky footer when content overflows. - Avoid horizontal scrollbars by using a larger modal size and defining adaptive behaviors for different viewports. - **Placement:** Vertically centered or top-aligned, horizontally centered. - **Responsiveness:** - Height: Depends on its content except for `full-screen`. - Content: Needs to be built responsively to adapt with the container's width. ## States Modals have two states: Closed and opened. ## Dos and Don’ts Do provide at least one visible way to close the modal Do provide a clear primary action that describes the result Do ensure all controls are accessible by keyboard and screen‑reader Do preserve scroll position and page state when closing Do return users to the previous state when cancelling, not an unrelated page Don’t use modals if a decision should be made (use [message modals](../message-modal) instead) Don’t nest modals, e.g. to load more data, instead use [spinners](../spinner) within modal contents) Don’t auto close modals for irreversible actions Don’t overload the modal with unrelated content ## Related - [Message modal](../message-modal) - [Loading modal](../loading-modal) - [Forms field](../forms-field) - [Accessibility](../../guidelines/accessibility) --- ## Components overview import { IxLayoutGrid, IxRow } from '@siemens/ix-react'; import { CategoryButton } from '@site/src/components/CategoryButton'; # ![Application frame](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=5186-249&t=gkh6VNlJun96I6Ac-4) ![Navigation and hierarchy](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=5186-259&t=gkh6VNlJun96I6Ac-4) ![Containers and layouts](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=5186-269&t=gkh6VNlJun96I6Ac-4) ![Forms](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=5186-283&t=gkh6VNlJun96I6Ac-4) ![Input fields and selections](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=5186-298&t=gkh6VNlJun96I6Ac-11) ![Buttons and actions](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=5186-305&t=gkh6VNlJun96I6Ac-11) ![System feedback and status](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=5186-332&t=gkh6VNlJun96I6Ac-11) ![Data display](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=5186-370&t=gkh6VNlJun96I6Ac-11) ![Chat](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=7974-3280&t=HrpSIFfB7yjzt741-4) ![Charts](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=5186-387&t=gkh6VNlJun96I6Ac-11) ## Application frame | Component | Description | | :--------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [Application](./application/index.mdx) | Applications manage the layout and theming of top-level app elements, ensuring a cohesive user experience. | | [Application header](./application-header/index.mdx) | Application headers provide a structured area for key elements like brand logo, application name and user avatar. | | [Application menu](./application-menu/index.mdx) | The navigation menu provides direct access to main application parts, legal and version information, and settings. | | [Avatar](./avatar/index.mdx) | Avatars visually or textually represent individual identities, typically for users logged into a system. | | [Content](./content/index.mdx) | The content component is a simple layout component made for hosting content. | | [Content header](./content-header/index.mdx) | Content headers provide a brief overview of the content on a page. | | [About and legal](./about-and-legal/index.mdx) | The About and legal component is an overlay we typically use to show application information, application versions, license terms, legal regulations, copyright information and other legal content. | | [Settings](./settings/index.mdx) | The settings overlay provides a centralized location for application settings. | | [Popover news](./popover-news/index.mdx) | Popover news presents important updates and information when the application starts. | ## Navigation and hierarchy | Component | Description | | :----------------------------------- | :-------------------------------------------------------------------------------------------------------- | | [Breadcrumb](./breadcrumb/index.mdx) | Breadcrumbs provide a clear navigation path within an application. | | [Group](./group/index.mdx) | Groups are expandable containers for a list of selectable options. | | [Pagination](./pagination/index.mdx) | Paginations allow users to navigate between pages of content when it is split for performance reasons. | | [Tabs](./tabs/index.mdx) | Tabs consist of tab items and organize content into separate sections by grouping similar information. | | [Tree](./tree/index.mdx) | Trees display hierarchical data structures and allow users to navigate by expanding and collapsing nodes. | | [Workflow](./workflow/index.mdx) | Workflows are a series of logical steps that guide users through a process. | ## Containers and layouts | Component | Description | | :------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------- | | [Blind](./blind/index.mdx) | Blinds enhance content organization by allowing users to toggle visibility through collapsing and expanding sections. | | [Card](./card/index.mdx) | Cards neatly organize and group related information about a specific subject. | | [Card list](./card-list/index.mdx) | Card lists display a large number of cards or items of the same type in a lightweight, grouped manner. | | [Flip](./flip/index.mdx) | Flips are containers that flip when clicked to reveal additional content. | | [Event list](./event-list/index.mdx) | Event lists display a list of any type of element with additional details. | | [Layout auto](./layout-auto/index.mdx) | Auto-layouts are containers that automatically adjust the size of their columns based on the content. | | [Layout grid](./layout-grid/index.mdx) | Layout grids are used to structure the layout of a page or screen responsively. | | [Modal](./modal/index.mdx) | Modals present information prominently and are useful for gathering essential user input without navigating to another page. | | [Panes](./panes/index.mdx) | Panes are interactive components that allow users to access content that isn't constantly visible on the screen. | | [Popovers](./popover/index.mdx) | Popovers display contextual information next to a trigger element. | | [Tile](./tile/index.mdx) | Tiles are containers that display content in a card-like format. | ## Forms | Component | Description | | :----------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [Forms field](./forms-field/index.mdx) | A field is a form element when user input is needed. It's typically used with other form elements in a fieldset. | | [Forms layout](./forms-layout/index.mdx) | Effective form layouts play a crucial role in usability. Well-structured forms include fieldsets, considering the hierarchy of information, and understanding how to strike the right balance between aesthetics and functionality. | | [Forms validation](./forms-validation/index.mdx) | Form validation gives users feedback on their input to ensure accurate, consistent data is submitted. When requirements are not met or data is incorrect, it’s rejected. | | [Forms behavior](./forms-behavior/index.mdx) | Forms behavior refers to the way in which user input is handled and validated within a form. It plays a crucial role in providing a seamless and user-friendly experience for form interactions. | ## Input fields and selections | Component | Description | | :----------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [Category filter](./category-filter/index.mdx) | Category filters allow users to quickly narrow their search by selecting predefined categories. | | [Checkbox](./checkbox/index.mdx) | Checkboxes are form controls that allow users to select none, one or more options. | | [Custom field](./custom-field/index.mdx) | Custom fields are wrapper components that can host any form component. | | [Date dropdown](./date-dropdown/index.mdx) | Date dropdowns allow users to select a specific date from a date picker or pre-defined date options. | | [Date input](./input-date/index.mdx) | Date inputs allow users to enter and select dates in a standardized format, ensuring consistency and accuracy. | | [Date picker](./date-picker/index.mdx) | Date pickers provide a versatile calendar that can be used as a standalone element or within a dropdown for date input, offering a seamless way to select dates. | | [Date time picker](./date-time-picker/index.mdx) | Date-time pickers offer an interface for selecting both dates and times, which can be used as a standalone element or within a dropdown, providing a seamless way to input date and time values. | | [Expanding search](./expanding-search/index.mdx) | Expanding searches are search fields that expand on click to save space. | | [Number input](./input-number/index.mdx) | Number inputs allow users to enter and adjust numerical values. | | [Range field](./range-field/index.mdx) | Range fields group two related inputs into a start and end value so users can enter date, time and date-time ranges consistently. | | [Radio](./radio/index.mdx) | Radio buttons enable users to choose only one option from a predefined set of mutually exclusive options. | | [Select](./select/index.mdx) | Selects allow users to choose from a list of options. | | [Slider](./slider/index.mdx) | Sliders allow users to select a value from a range of values. | | [Input](./input/index.mdx) | Input fields allow users to enter and edit single-line text, numbers, and other character-based symbols within an application. | | [Textarea](./textarea/index.mdx) | Textareas allow users to enter and edit multi-line text input, making it perfect for forms that require longer entries. | | [Time picker](./time-picker/index.mdx) | Time pickers allow users to select specific times ensuring accurate time input. | | [Toggle](./toggle/index.mdx) | Toggle switches enable users to toggle between an on and off state. | | [Upload](./upload/index.mdx) | Uploads allow users to select and upload files from their device via drag-and-drop. | ## Buttons and actions | Component | Description | | :--------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------- | | [Button](./button/index.mdx) | Buttons facilitate user interactions by initiating actions and applying functions within an application. | | [Dropdown button](./dropdown-button/index.mdx) | Dropdown buttons reveal a list of actions when selected. | | [Icon button](./icon-button/index.mdx) | Icon buttons use only icons to represent actions, making them ideal for space-constrained layouts. | | [Link button](./link-button/index.mdx) | Link buttons take users to another location either within or outside the application and contain a chevron and a text label. | | [Split button](./split-button/index.mdx) | Split buttons are button elements that allow users to either trigger an action with one click or select an action from a list of options. | | [Toggle button](./toggle-button/index.mdx) | Toggle buttons allow users to either activate or deactivate a function. | | [Chip](./chip/index.mdx) | Chips are interactive elements that display small pieces of information in a compact and visually appealing way. | ## System feedback and status | Component | Description | | :------------------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------- | | [Empty state](./empty-state/index.mdx) | Empty states inform users that there is no content to display. | | [Message bar](./messagebar/index.mdx) | Message bars display important information to users, e.g. feedback, warnings or errors. | | [Badge](./badge/index.mdx) | Badges display compact status, counter or notification cues on (or next to) UI elements. | | [Pill](./pill/index.mdx) | Pills display small pieces of information, e.g. counters or statuses. | | [Popover](./popover/index.mdx) | Popovers display contextual information in a floating panel anchored to a trigger element. | | [Progress indicator](progress-indicator/guide.md) | Progress indicators inform users about the status of ongoing processes, e.g. loading data, submitting forms or processing non-blocking operations. | | [Spinner](./spinner/index.mdx) | Spinners indicate that a process is running to provide feedback to the user. | | [Toast](./toast/index.mdx) | Toasts are small pop-ups that provide simple feedback on a process. | | [Tooltip](./tooltip/index.mdx) | Tooltips provide additional information when users hover over or focus on an element. | ## Data display | Component | Description | | :------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [Angular data grid](./grid/index.mdx) | The popular data grid library AG Grid is seamlessly integrated into our design system, allowing you to harness its powerful features while maintaining consistency with our styleguide. | | [HTML table](./html-grid/index.mdx) | HTML tables are used to display tabular data in a structured way. | | [Key value](./key-value/index.mdx) | Key value pairs display a label (key) and a value in a structured, easy way. | | [Key value list](./key-value-list/index.mdx) | Key value lists organize and list a series of key value pairs. | | [KPI](./kpi/index.mdx) | KPIs display measured values together with a status indicator to help users interpret data. | ## Chat | Component | Description | | :--------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------- | | [Chat](./chat/index.mdx) | Chat component for building conversational chatbot experiences. | | [Chat input](./chat-input/index.mdx) | Chat inputs are used to compose and submit messages, attachments and follow-up actions in a conversational AI thread. | | [User message](./user-message/index.mdx) | User messages display messages authored by the user in a chat thread. | | [AI message](./ai-message/index.mdx) | AI messages display responses generated by the AI in a conversational chat. | | [Chat attachment](./chat-attachment/index.mdx) | Chat attachments are files attached to chat inputs and user messages. | ## Charts | Component | Description | | :----------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [Chart overview](./charts-overview/overview.mdx) | Charts are essential tools for visualizing data, making complex information more accessible and easier to understand. | | [Line chart](./line-chart/overview.mdx) | Line charts display data as a series of data points connected by straight line segments. Line charts are commonly used to visualize trends over time or compare two variables. We typically use line charts to visualize continuous data. | | [Bar chart](./bar-chart/overview.mdx) | Bar charts display data using rectangular bars. The length of each bar is proportional to the value it represents. Bar charts are commonly used to compare the values of different categories. We typically use bar charts to visualize data that is categorical or ordinal in nature. | | [Gauge chart](./gauge-chart/overview.mdx) | Gauge charts are a type of chart that displays data using a dial or needle to indicate a value within a specific range. Gauge charts are commonly used to visualize performance metrics, such as speedometers, progress meters, and other KPIs. We typically use gauge charts to represent a single value within a range of values. | | [Pie chart](./pie-chart/overview.mdx) | Pie charts display data using a circular graph. The length of each slice is proportional to the value it represents. Pie charts are commonly used to visualize the parts of a whole and are particularly useful for comparing the relative sizes of different categories. | | [3D chart](./3d/overview.mdx) | 3D charts are a powerful way to visualize data in three dimensions. They provide a more immersive and interactive experience compared to traditional 2D charts. We typically use 3D charts to represent complex data sets or to visualize data in a more engaging way. | | [Special chart](./special-chart/overview.mdx) | ECharts offer a wide variety of different chart types and features. The following page deals with some of the more special chart types and features. | --- ## Pagination - Code import PropsApi from '@site/docs/autogenerated/api/ix-pagination/api.mdx'; import PaginationPlayground from '@site/docs/autogenerated/playground/pagination.mdx'; import PaginationAdvancedPlayground from '@site/docs/autogenerated/playground/pagination-advanced.mdx'; # Pagination - Code ## Basic ## Advanced --- ## Panes - Code import PanePropsApi from '@site/docs/autogenerated/api/ix-pane/api.mdx'; import PaneLayoutPropsApi from '@site/docs/autogenerated/api/ix-pane-layout/api.mdx'; import PanePlayground from '@site/docs/autogenerated/playground/pane.mdx'; import PaneLayoutPlayground from '@site/docs/autogenerated/playground/pane-layout.mdx'; # Panes - Code ## Basic ## Pane Layout --- ## Panes - Usage Panes have a header and a content area. When collapsed, panes are either hidden or reduced to a bar. In our applications, we often include contextual information, options, trees and lists inside panes. Panes help users focus on tasks as related controls are visually grouped and the main content has less information. They are also beneficial for compact and hierarchically organized content and provide a more dynamic layout. ![Pane overview](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=1680-22044&mode=design&t=iP7h44Wf17P209P7-4) 1. Left pane, inline 2. Top pane, inline 3. Right pane, floating 4. Bottom pane, inline ## Options - **Heading**: Set a headline for the pane (we normally use a short content description). - **Icon**: Panes can display an icon in the pane header next to the title. - **Composition**: Panes can be positioned on the left, top, right or bottom. We often use left panes for structuring components like trees or lists, and right panes for contextual information. Top and bottom panes are less common in our applications, but can help communicate a clear "top to bottom" hierarchy. - **Size**: Sizes can be picked either as a fixed size (in pixels) or as a relative size (in percentage) depending on the intended layout. However, picking sizes only applies to medium and large screens as small screen panes are always displayed in full screen (see responsiveness below for more information). We usually choose a pane width and height that avoids the need for scrolling in our applications. - **Borderless**: Panes can have borders to visually split them from other content areas. We typically use borderless panes when placed within layouts that already have other visual means to split areas. - **No padding**: By default, panes apply inline and bottom padding around their content. Enabling the no padding option removes this padding so the content can span the full pane area. This is useful for content that brings its own spacing or should sit flush against the pane edges, such as banner images, horizontal dividers, etc. - **Hide on collapse**: Define whether a pane is visible in its collapsed state. If it is visible, it has a bar appearance when collapsed that contains both the title and the expand button. We usually use inline panes with a collapsible option and floating panes without since they are triggered from a dedicated control like a button or a list item. - **Variant**: When used within a layout, floating panes are placed above (z-axis) the main content but below the navigation menu and header. When expanded, they cover a part of the main content. Inline panes are placed on one level with the main content. When expanded, they move the main content and reduce its available space. - **Layout**: Depending on which pane needs more focus, the top/bottom or left/right panes can use more space. ![Pane layouts](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=1681-28910&mode=design&t=iP7h44Wf17P209P7-4) 1. Full height (left/right) 2. Full width (top/bottom) ## Behavior - **Interaction**: Users expand panes that are collapsible by pressing on the expand button. To expand panes with hidden collapsed state, users typically click on a button or another interactive component within the main content. They close these panes by either pressing on the button on the right side of the header or clicking outside the pane area. This removes the pane from their view. - **Overflow**: When content extends the available space within the pane, scrollbars appear. Headers stay fixed at the top allowing users to scroll the content area. We like to avoid overfilling panes with content to remove the need for scrolling. - **Stacking**: When users expand multiple panes within a pane layout, panes are stacked. - **Placement**: We typically fit a pane layout within the complete content area of a page bounded by the application header on top and the navigation menu on the left. - **Responsiveness**: On large and medium size screens, all panes have a maximum width or height of `50%` of the available space. On small screens, all panes have full width and expand to full height, but the header and navigation menu remain visible. We show collapsed left and right panes on the top and bottom for a more efficient use of space. ![Pane small viewport](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=1680-26548&mode=design&t=iP7h44Wf17P209P7-4) 1. Inline panes in collapsed state 2. Inline or floating pane in expanded state 3. Opened navigation menu ## States Panes have two states: collapsed and expanded. The appearance of the states varies between variants and screen sizes. ## Dos and Don’ts Do use panes to organize your content and guide your users' attention Do use panes to display different views within a single screen Do use panes to expand/collapse content or hide/reveal content Don’t use panes for a small amount of content Don’t use panes for content that should stay visible ## Related - [Header](../application-header) - [Menu](../application-menu) --- ## Pie chart import EchartsPiePlayground from '@site/docs/autogenerated/playground/echarts-pie.mdx'; import EchartsCirclePlayground from '@site/docs/autogenerated/playground/echarts-circle.mdx'; # Pie chart - Code ## Basic ## Donut charts Donut charts are a variation of pie charts that have a hole in the center. Donut charts are often used to display the same information as a pie chart, but additional information can be displayed in the center of the chart. --- ## Pill - Code import PropsApi from '@site/docs/autogenerated/api/ix-pill/api.mdx'; import PillPlayground from '@site/docs/autogenerated/playground/pill.mdx'; import PillVariantsPlayground from '@site/docs/autogenerated/playground/pill-variants.mdx'; # Pill - Code :::info Pills are deprecated and removed in V7.0.0. We recommend using [badges](../badge/index.mdx) with type `label` instead, which support the same compact status and category use cases. ::: ## Basic ## Variants --- ## Pill - Usage :::warning Pills are deprecated and removed in V7.0.0. We recommend using [badges](../badge/index.mdx) with type `label` instead, which support the same compact status and category use cases. ::: Pills typically contain a concise label and sometimes an icon. They are not clickable or closable, making them ideal for presenting static information succinctly within an application. ![Pill overview](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=1377-3110&mode=design&t=ZmcRP4ggXtr8b7vZ-1) 1. Container 2. Icon 3. Label text ## Variants With our pill variants, you can apply different colors based on their purpose, importance or context. We use pill variants to show class, status and levels of importance. The custom variant is often used for pills that visualize a high number of different categories. Pill variants: - **Primary**: For high visual emphasis. - **State-related variants**: Alarm, critical, warning, success, info and neutral. - **Custom**: For a customized background and label color. ![Pill variants](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=1375-1985&mode=design&t=ZmcRP4ggXtr8b7vZ-1) ## Options - **Align left**: Position the pill content to the left side. - **Background**: Use to set a custom background color when you require more flexibility in styling the pill. Only available for the custom pill variant. - **Color**: Customize font and icon color for pill. This allows users to specify a unique font color in combination with a custom background color (only applicable when the variant is set to 'custom'). - **Icon**: Pills can include a close icon within the element which is positioned before the pill label. - **Outline**: Use for lower visual emphasis. - **Width**: Pill width can be set to a specific value, but content length normally determines pill width with a minimum width of '2rem'. - **Tooltip text**: Provide a specific text to be displayed as the tooltip or set the attribute without a specific value to display the pill's text content. ## Behavior - **Placement**: We usually position pills inline with other elements to convey their status or category. We do not place pills within input and filter components as these already contain similar components. However, it’s possible to add components similar to pills to tabs and navigation menu items. These counter or notification components are provided as component options. - **Text truncation**: When you set a width for pills, long labels are truncated to fit the available space. ## States Pills are read-only. ## Dos and Don’ts Do use pills to communicate tags and categories Do use pills to indicate the status or characteristics of an item Don’t overuse pills as this leads to cluttered and overwhelming interfaces Don’t use different styles for pills with the same or similar use Don’t use pills if users can interact with the component (e.g. click, close) use chips instead ## Related - [Chip](../chip) --- ## Popover - Code import PropsApi from '@site/docs/autogenerated/api/ix-popover/api.mdx'; import HeaderPropsApi from '@site/docs/autogenerated/api/ix-popover-header/api.mdx'; import ContentPropsApi from '@site/docs/autogenerated/api/ix-popover-content/api.mdx'; import FooterPropsApi from '@site/docs/autogenerated/api/ix-popover-footer/api.mdx'; import ImagePropsApi from '@site/docs/autogenerated/api/ix-popover-image/api.mdx'; import PopoverPlayground from '@site/docs/autogenerated/playground/popover.mdx'; # Popover - Code ## Basic --- ## Popover - Usage Use popovers when users need extra context without leaving the current task or losing sight of the trigger. We recommend popovers for short, contextual content that helps users act, confirm or learn more in place. ![Anatomy component](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=7956-140&t=ekGYaTlPLbfy7TSp-4) 1. Header with popover title 2. Image 3. Content 4. Footer 5. Spike as anchor indicator ## Options - **Trigger:** Use a clear trigger that signals additional context, e.g. an info icon, status chip or secondary action. - **Trigger mode:** Use click for interactive content. Use hover only for lightweight, non-essential information. - **Placement:** We typically use the default bottom placement because it follows the natural reading order. - **Close on click outside:** Keep this enabled for temporary, dismissible information so users can return to the page quickly. - **Has spike:** Use the spike when the trigger has a weak selected state or is a compact icon trigger. If the trigger already reads clearly as active, the spike is often unnecessary. - **Header:** Use the header to establish context before users scan the body content. - **Title:** Add a short title when users need to understand the topic before scanning the content. Keep titles specific and scannable. - **Header icon:** An icon can be placed in the header to support quick recognition of the message context. Use it only when it adds meaning and avoid purely decorative icons. - **Additional header items slot:** Add compact supporting items beside the title, e.g. a status pill, only when they help users interpret the message faster. - **Image:** Use images sparingly and only when they clarify the message faster than text alone. In a small transient overlay, images should never be decorative, contain text, and always include meaningful alt text. - **Footer:** Use the footer for actions. - **Actions:** Add footer actions only when users need a next step, e.g. dismissing a hint or opening more details. We recommend limiting the footer to a maximum of three actions with clear priority, e.g. primary, secondary and tertiary. - **Alignment:** Use horizontal footer actions by default. Switch to vertical only when labels are long or space is constrained. - **Start area:** Use the leading side of the footer for supporting context, e.g. a helper label and keep primary actions grouped on the action side. ## Behavior in context - **Interaction:** - Popovers open from a trigger and stay visually linked to it while the surrounding page remains visible. - While the popover is open, users can still reference nearby content in the underlying layout without changing screens. - If the content includes interactive elements, the popover remains dismissible so users can return to the trigger quickly. - When a popover contains interactive elements, opening it moves focus from the trigger to the first interactive element in the popover. - Closing the popover returns focus to the trigger so users can continue in the same flow. - When a popover contains no interactive elements, focus remains on the trigger. - **Overflow:** - Popovers are rendered above surrounding elements and can cover nearby controls when the panel grows. - If the available space around the trigger is limited, the panel size and placement affect how much context stays visible. - For content that needs more space or sustained reading, a [modal](../modal) or dedicated page preserves readability. - **Placement:** - Popovers are anchored to the trigger element and positioned to keep that relationship clear. - When there is not enough space near the viewport edge, the position can flip to keep the panel visible. - **Responsiveness:** - On smaller viewports, a popover can overlap a larger share of the interface around the trigger. - If users need to compare information, read longer content, or complete multiple actions, a [modal](../modal) or dedicated page supports the flow better. ## States Popovers have two states: Closed and opened. When a popover is opened, it appears anchored to the trigger and is dismissible so users can return to the underlying context quickly. ## Dos and Don’ts - Do use popovers for contextual information, e.g. release highlights or guided hints - Do use popovers when users need one lightweight action without leaving the current task - Do use a short title and concise content so users can scan the message quickly - Don’t use popovers for essential information that must be read before proceeding, use [modals](../modal) instead - Don’t use popovers for selecting from a list of actions, use [dropdowns](../dropdown) instead - Don’t allow multiple popovers to be open at the same time, close the current one before opening another ## Related - [Popover news](../popover-news) - [Tooltip](../tooltip) - [Modal](../modal) - [Dropdown](../dropdown) --- ## Popover - Language import InfotipContent from '@site/docs/guidelines/language/messaging/infotips.mdx'; # Popover - Language In this writing chapter, we use the term infotips instead of popovers to stay consistent with the messaging guidelines. --- ## Popover news - Code import PopoverNewsPlayground from '@site/docs/autogenerated/playground/popover-news.mdx'; import PropsApi from '@site/docs/autogenerated/api/ix-menu-about-news/api.mdx'; # Popover news - Code ## Basic --- ## Popover news - Usage Use the popover news component to present news and information when the application starts like release notes, new app features or marketing-related information. For Siemens applications, provide the information within the [About and legal overlay](../about-and-legal) as well. ![Popover news](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=1013-70517&mode=design&t=Ntzn8IlSOlPey8s5-11) - (1) Header text - (2) Close button - (3) Content - (4) "Show more" button takes users to another place in the app to learn more about the information given - (5) Spike shows popover origin ## Options - **label:** Defines the header text of the popover news (1)| - **i18nShowMore:** Adjusts the text of the "Show more" button (4) | - **offsetBottom:** Adjusts the popover position. The spike (5) should point to the info icon. ## Behavior Unlike a modal, popover news does not prevent users from navigating and interacting with the content. It only overlays the content partially and appears once triggered by the app. As soon as the user closes the popover, it does not appear again until it is re-triggered. Therefore we recommend that the information should be additionally available in the [About and legal overlay](../about-and-legal). The popover spike should always point to the information icon so users can find the information again. The `offsetBottom` option can be used to control its exact position. ## Dos and Don’ts Do use popover news for "nice to know" information ## Related - [Toast message](../toast) - [Modal](../modal) - [Message bar](../messagebar) --- ## Progress-Indicator - Code import PropsApi from '@site/docs/autogenerated/api/ix-progress-indicator/api.mdx'; import Playground from '@site/docs/autogenerated/playground/progress-indicator.mdx'; import CircularPlayground from '@site/docs/autogenerated/playground/progress-indicator-circular.mdx'; import LinearSizesPlayground from '@site/docs/autogenerated/playground/progress-indicator-linear-sizes.mdx'; import LinearStatusPlayground from '@site/docs/autogenerated/playground/progress-indicator-linear-status.mdx'; import CircularSizesPlayground from '@site/docs/autogenerated/playground/progress-indicator-circular-sizes.mdx'; import CircularStatusPlayground from '@site/docs/autogenerated/playground/progress-indicator-circular-status.mdx'; # Progress-Indicator - Code ## Linear ## Circular ## Linear status ## Linear sizes ## Circular status ## Circular sizes --- ## Progress indicator - Usage Progress indicators inform users about the status of ongoing measurable processes, e.g. loading data, submitting forms or processing non-blocking operations (for indeterminate processes use [spinners](../spinner/index.mdx) instead). ![Progress indicator anatomy](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=2094-345&t=pq3AmdWOVOjIx4S4-4) 1. Label 2. Helper text 3. Fill 4. Track 5. Content slot The basic anatomy of progress indicators consists of a value indicator moving along a background track. The track represents the total expected length while the fill shows the current progress. ## Variants Progress indicator variants (types): - **Linear:** Use for horizontal layouts or when the progress value should be more visible. - **Circular:** Use for compact or centered layouts, e.g. when it’s replacing an icon. ## Options - **Status:** Use the status to reflect the outcome or current condition of a process: - Default: Normal, ongoing process without special attention needed - Success: Process completed successfully - Info: Process ongoing with low-impact additional information, e.g. "Compressing files before upload" - Warning: Process ongoing but needs attention, e.g. "Storage space is running low" - Error: Process interrupted or failed, e.g. due to network connection problems - Paused: Process temporarily stopped by the system or by the user, e.g. by pressing a button - **Alignment:** By default, the label, control and helper text are left-aligned. Use the centered option to accommodate layouts with vertical reading patterns, e.g. low-width containers. - **Label:** Add a label to describe the process being tracked, helping users understand what operation is in progress. - **Helper text:** Use helper text to provide additional context, e.g. percentage completed, estimated time remaining or errors that happened during the process. - **Show text as tooltip:** This option hides the helper text and displays it only when the user hovers or focuses the progress indicator. - **Size:** Progress indicators are available in five predefined heights: `xs`, `sm`, `md`, `lg` and `xl`. - **Value, min and max:** The progress range is customizable. By default, it spans from 0 to 100. Adjust the min and max values to suit your specific use case. - **Content slot:** Use this slot to display additional content such as percentage values or custom elements like icons. :::info For more information about writing effective helper texts or labels, see our [UX writing guidelines](../../guidelines/language/writing-style-guide-getting-started.md). ::: ## Behavior in context - **Resizing:** The total width of progress indicators is `24rem` by default. Customize it to your context. - **Text overflow:** If the helper text or label are too long for the available horizontal space, it has a line-break. - **Slot:** Slots in linear progress indicators have a min-width of `2.25rem` to accommodate using values from 0% to 100% without changing the width of the actual bar. ![progress indicator resizing](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=5650-16162&t=pq3AmdWOVOjIx4S4-4) ## Dos and Don’ts Do use progress indicators consistently for similar processes Do use progress indicators for determinate processes where progress can be measured (otherwise use [spinners](../spinner/index.mdx)) Do use linear progress indicators in horizontal layouts and circular indicators in compact spaces or centered layouts Do keep your slot content short, especially for the centered alignment (use helper texts and labels for lengthier content) Don't use progress indicators for operations shorter than one second Don't only indicate progress completion with the indicator without clear task messages, e.g. success toasts or displaying the loaded content ## Related - [Loading modal](../loading-modal) - [Spinner](../spinner) - [Accessibility](../../guidelines/accessibility) --- ## Radio - Code import RadioPlayground from '@site/docs/autogenerated/playground/radio.mdx'; import RadioDisabledPlayground from '@site/docs/autogenerated/playground/radio-disabled.mdx'; import RadioGroupPlayground from '@site/docs/autogenerated/playground/radio-group.mdx'; import RadioValidationPlayground from '@site/docs/autogenerated/playground/radio-validation.mdx'; import PropsApi from '@site/docs/autogenerated/api/ix-radio/api.mdx'; import RadioGroupPropsApi from '@site/docs/autogenerated/api/ix-radio-group/api.mdx'; # Radio - Code Enclosing all related radio buttons together in a single radio group container ensures correct selection behavior, grouping and accessibility. ## Basic ## Disabled ## Group ## Validation --- ## Radio button - Usage Radio buttons are presented in groups to signify that only one selection is allowed at a time. Selecting a radio button automatically deselects any previously chosen radio button within the same group. We typically use radio buttons to offer users a set of exclusive choices. ![Anatomy radio button](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?node-id=3384-108&t=GDd4aJQUrPB3cC9X-4) 1. Label 2. Required indicator 3. Radio button group 4. Helper or feedback text 5. Radio button 6. Radio button label ## Options - **Radio button**: - **Label:** See [form field](../forms-field). - **Radio button group**: - **Label:** Use group labels if radio button labels are not self-explanatory and in context of forms. See [form field](../forms-field). - **Helper text**: See [form field](../forms-field). - **Show text as tooltip**: See [form field](../forms-field). - **Required**: When enabled, users are required to select an option in a group. See [form field](../forms-field). - **Direction**: Choose to align radio buttons vertically or horizontally. We typically use a horizontal layout for short labels with two to three options, and a vertical layout for more options to enhance readability. ## Behavior in context - **Validation**: Radio buttons are validated collectively, not individually. For more information on validation, see [validation](../forms-validation). - **Interaction**: Clicking on a radio button toggles its state between checked and unchecked/default. Every other radio button in the group is automatically unchecked. ## States ![States radio button](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?node-id=3387-8703&t=ZvZOV5vvqWRxmqyv-4) ## Dos and Don’ts Do use radio buttons when the user needs to select only one option from a set of options Do group related radio buttons together to indicate that only one option can be selected at a time Do provide a default (already selected) option when the user first sees the radio button group Don’t use radio buttons if the user needs to select multiple options from a set of options - use a checkbox instead Don’t use only one radio button in a group, groups should have at least two options ## Related - [Form field](../forms-field) - [Validation](../forms-validation) - [Layout](../forms-layout) - [Checkbox](../checkbox) - [Toggle](../toggle) --- ## Range field - Code import DateRangePlayground from '@site/docs/autogenerated/playground/date-range.mdx'; import TimeRangePlayground from '@site/docs/autogenerated/playground/time-range.mdx'; import DatetimeRangePlayground from '@site/docs/autogenerated/playground/datetime-range.mdx'; import PropsApi from '@site/docs/autogenerated/api/ix-range-field/api.mdx'; # Range field - Code ## Date range ## Time range ## Date time range --- ## Range field - Usage Range fields work as a wrapper component when two related inputs describe one bounded interval with a clear start and end. They are often used with date, time or date-time inputs, but they also work with other paired inputs, e.g. number inputs for defining minimum and maximum allowed values. ![Anatomy range field](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=7795-3782&t=VdWD2lSX0POwEDXH-4) 1. Start field 2. Range separator 3. End field ## Variants - **Date range:** Use this variant for calendar-based periods, e.g. maintenance windows or reporting periods - **Time range:** Use this variant for time-only intervals, e.g. shifts or operating windows within a day - **Date-time range:** Use this variant when both the day and the time are relevant, e.g. for event windows or analysis periods ![Variants range field](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=7796-2797&t=VdWD2lSX0POwEDXH-4) ## Options - **Labels:** Label both inputs clearly, e.g. "Start date" and "End date" or "From" and "To". Keep labels short when the surrounding heading already explains the context. - **Arrow separator:** The default arrow helps users read the direction from start to end. Hide it only when the relationship is already obvious from the surrounding layout or label. - **Validation and helper text:** Use the validation and helper text of the paired inputs for field-specific guidance. Use surrounding form content when the message applies to the whole interval. For the individual inputs, all available options of the paired input components stay available. See [date input](../input-date), [time input](../input-time) and [date time picker](../date-time-picker) for component-specific guidance. ## Behavior in context - **Interaction:** Keep the earlier value first and the later value second so users can move through the range in a predictable order. Validate both fields individually and together. Make it clear when the end value is earlier or smaller than the start value. - **Overflow:** Give both fields enough width to show the full value format without clipping. If space is limited, shorten surrounding labels before reducing the field width. - **Text truncation:** Avoid truncating entered values by choosing an appropriate input width. ## States Range fields rely on the states of the paired inputs. Use the same guidance as [date input](../input-date) and [time input](../input-time), and apply disabled or read-only states consistently to both inputs when the whole range is unavailable. ## Dos and Don’ts Do use range fields when start and end values describe one bounded interval Do label both inputs clearly so users can scan the order quickly Do omit labels on both inputs consistently when the surrounding context already makes the range clear Do validate that the end value is not smaller or earlier than the start value Don’t use range fields for single values or unrelated inputs Don’t use different input types, formats or levels of precision within one range Don’t mix date, time and date-time inputs in one range ## Related - [Date input](../input-date) - [Time input](../input-time) - [Date time picker](../date-time-picker) - [Form field](../forms-field) - [Validation](../forms-validation) - [Slider](../slider) --- ## Select - Code import PropsApi from '@site/docs/autogenerated/api/ix-select/api.mdx'; import ItemPropsApi from '@site/docs/autogenerated/api/ix-select-item/api.mdx'; import SelectPlayground from '@site/docs/autogenerated/playground/select.mdx'; import SelectEditablePlayground from '@site/docs/autogenerated/playground/select-editable.mdx'; import SelectMultiplePlayground from '@site/docs/autogenerated/playground/select-multiple.mdx'; import SelectValidationPlayground from '@site/docs/autogenerated/playground/select-validation.mdx'; import { SinceTag } from '@site/src/components/UI/Tags'; # Select - Code ## Basic ## Editable ## Multiselect ## Validation --- ## Select - Usage The select component supports single or multiple selections and the editable variant allows users to add new items. We typically use select components in forms, filters and settings where users need to choose from predefined options. ![Overview](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?node-id=3647-6332&t=DtCmoFcLwhf7ke3S-4) 1. Label 2. Required indicator 3. Value 4. Clear button 5. Open dropdown button 6. Container 7. Dropdown list 8. List header 9. Selected list item 10. Editable mode (add new items) ## Options - **Label:** See [form field](../forms-field). - **Placeholder:** Use a placeholder to provide information about what to enter or additional relevant context while the input field is empty. We typically use a placeholder when the label is not visible or we need to provide additional context. - **Helper text:** See [form field](../forms-field). - **Feedback text:** See [form field](../forms-field). - **Show clear button:** Select components can have a dedicated button to easily clear the selection. Hide the button when offering users other ways to reset, e.g. a default item like "none", or if you aim for simplified keyboard accessibility. - **List header:** Use an optional header to provide additional context or instructions about the items to help users understand choices better. - **Information for no matches:** Set a message to be displayed when no item matches the inserted text. - **Editable:** When enabled, users can add new items to the list. - **Multiselect:** Allow users to select multiple items from the list. - **Collapse multiple selections:** When enabled, selected items are collapsed into a counter instead of showing all selected items. - **Items:** - **Label:** Set a short and concise label for dropdown items. - **Selected:** Mark selected items in the dropdown with a check mark. - **Disabled:** Mark individual items as disabled when they cannot be selected in the current context. Disabled items are visually muted, skipped during keyboard navigation and cannot be picked via mouse or keyboard. ## Behavior in context - **Validation:** See [validation](../forms-validation). - **Interaction:** - Click or Enter key on button opens dropdown list. - Typing in the input field filters the dropdown list. - Arrow keys navigate within the dropdown list. - Click or Enter selects a highlighted list item. - Escape key closes dropdown list and returns to the originally selected value. - **Overflow:** - The text in an input field is truncated with the length of the container. - On the multiselect, the selected items break into a second line and then show a scrollbar if it extends beyond two lines. - The dropdown list is scrollable when the list exceeds the container height. Its width is defined by the longest item. The maximum width of the dropdown list is set to 100% by default. Use the properties `dropdownWidth` and `dropdownMaxWidth` to customize the dimensions. - **Alignment:** Selects are always aligned to the left, while right alignment is reserved exclusively for [number inputs](../input-number). ## States The select field has five states: default, hover, focused, disabled and read-only. In the disabled state, the input field is displayed without offering any user interaction. ![Field states](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?node-id=3960-760&t=MWpyPDZDK5B531n9-4) ## Dos and Don’ts Do consider performance when loading an extensive list of items Do use the select component when there is a finite list of items available to avoid manual input errors or duplicates Do sort items logically, e.g. alphabetically or numerically Don’t use selects for binary choices, like yes and no, use [radio buttons](../radio) instead Don’t use selects for navigational or search patterns, use [category filters](../expanding-search) instead Don’t combine several data attributes in an item label, use [HTML tables](../html-grid) or [AG Grids](../grid) with a search functionality instead ![Don’t combine data attributes](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?node-id=3978-800&t=MWpyPDZDK5B531n9-4) ## Related - [Form field](../forms-field) - [Validation](../forms-validation) - [Layout](../forms-layout) - [Input](../input) - [Radio button](../radio) - [Checkbox](../checkbox) - [Date input](../input-date) --- ## Settings - Code import SettingsPlayground from '@site/docs/autogenerated/playground/settings.mdx'; import PropsApi from '@site/docs/autogenerated/api/ix-menu-settings/api.mdx'; # Settings - Code ## Basic --- ## Settings - Usage The settings component appears when users click on the "settings" icon (1). It overlays the current content and closing this overlay brings users back to the original content. ![Settings overlay](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=1030-80408&mode=design&t=Ntzn8IlSOlPey8s5-11) - (1) Settings icon: opens and closes the settings overlay - (2) Content header: default string is "Settings" and can be replaced - (3) Close button: closes overlay - (4) Tabs (optional): navigates through multiple settings categories - (5) Content ## Behavior The overlay opens on top of the application content. The overlay has a semi-transparent background with a background blur effect to emphasize the overlay character. Closing this overlay brings users back to previous content. The overlay can be closed in three ways: - Use the close button - Click the settings icon again - Click another navigation item --- ## Slider - Code import PropsApi from '@site/docs/autogenerated/api/ix-slider/api.mdx'; import SliderPlayground from '@site/docs/autogenerated/playground/slider.mdx'; import SliderMarkerPlayground from '@site/docs/autogenerated/playground/slider-marker.mdx'; import SliderTracePlayground from '@site/docs/autogenerated/playground/slider-trace.mdx'; import SliderErrorPlayground from '@site/docs/autogenerated/playground/slider-error.mdx'; import SliderValidationPlayground from '@site/docs/autogenerated/playground/slider-validation.mdx'; # Slider - Code ## Basic ## Marker ## Trace ## Error ## Validation --- ## Special chart import EchartsSpecialToolboxPlayground from '@site/docs/autogenerated/playground/echarts-special-toolbox.mdx'; import EchartsSpecialZoomPlayground from '@site/docs/autogenerated/playground/echarts-special-zoom.mdx'; # Special chart - Code ## Interactive toolbox Apache ECharts offers a versatile toolbox that enables users to interact with and manipulate charts effectively. By default, the toolbox appears in the top right corner of the chart. It includes various interactive tools like download, zoom, zoom reset and restore. Each has been designed to enhance the user experience. You can customize this toolbox using the `toolbox` option within the option object. Below is an example demonstrating some of the most commonly used tools and how you can configure them. ## Advanced zoom and pan In addition to the toolbox, ECharts provides zoom and pan functionality for a more interactive chart experience. Users can zoom in and out using the mouse wheel, and pan the chart by clicking and dragging. These advanced features offer a seamless way to explore detailed data within the chart. --- ## Spinner - Code import PropsApi from '@site/docs/autogenerated/api/ix-spinner/api.mdx'; import SpinnerPlayground from '@site/docs/autogenerated/playground/spinner.mdx'; import SpinnerLargePlayground from '@site/docs/autogenerated/playground/spinner-large.mdx'; # Spinner - Code ## Basic ## Large --- ## Split button - Code import PropsApi from '@site/docs/autogenerated/api/ix-split-button/api.mdx'; import SplitButtonPlayground from '@site/docs/autogenerated/playground/split-button.mdx'; import SplitButtonIconsPlayground from '@site/docs/autogenerated/playground/split-button-icons.mdx'; # Split button - Code ## Basic ## With icon only --- ## Split button - Usage Split buttons consist of two parts: a button labeled with text and/or an icon on the left and a dropdown button labeled with an icon on the right. We typically use split buttons when a default action is available but more options need to be offered. Split buttons group similar or related actions. ![Overview](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=5888-8071&t=rJDt18BP7skzAPnM-4) 1. Button 2. Dropdown button 3. Button icon 4. Button label 5. Dropdown button icon All the variants, options and states of the [button](../button/index.mdx) and the [dropdown button](../dropdown-button/index.mdx) components apply to the split button. We've listed additional or deviating specifications here. ## Options - **Label:** Set a label for the button component (left side). We typically use short labels that contain a verb. - **Split icon:** We typically use a chevron icon on the dropdown button, but a custom icon can be set. A common alternative to the chevron is the "more-menu" icon. The options **loading** and **type** are not available for split buttons. ## Behavior in context - **Interaction:** When users press an option from the dropdown list, the action is triggered. Typically the label of the button on the left side stays static. Be aware that updating the left side with the last triggered action may lead to layout changes (e.g. button width) and requires updating the dropdown by adding the action that was removed from the button face. ## States Split buttons have five states: Default, hover, active, disabled and focused. States are applied to left and the right part of the split button independently. The visual appearance and the behavior of the states is the same as the [button](../button) and the [dropdown button](../dropdown-button). ## Dos and Don’ts Do use split buttons when there is a frequent or most-important action Don’t use split buttons for unrelated actions Don’t duplicate the default option in the dropdown ## Related - [Button](../button) - [Dropdown](../dropdown) - [Select](../select) - [Dropdown button](../dropdown-button) --- ## Tabs - Code import PropsApi from '@site/docs/autogenerated/api/ix-tabs/api.mdx'; import ItemPropsApi from '@site/docs/autogenerated/api/ix-tab-item/api.mdx'; import TabsPlayground from '@site/docs/autogenerated/playground/tabs.mdx'; import TabsRoundedPlayground from '@site/docs/autogenerated/playground/tabs-rounded.mdx'; # Tabs - Code ## Basic ## Tabs Rounded --- ## Textarea - Code import TextareaPlayground from '@site/docs/autogenerated/playground/textarea.mdx'; import TextareaDisabledPlayground from '@site/docs/autogenerated/playground/textarea-disabled.mdx'; import TextareaReadonlyPlayground from '@site/docs/autogenerated/playground/textarea-readonly.mdx'; import TextareaRowsColsPlayground from '@site/docs/autogenerated/playground/textarea-rows-cols.mdx'; import TextareaValidationPlayground from '@site/docs/autogenerated/playground/textarea-validation.mdx'; import PropsApi from '@site/docs/autogenerated/api/ix-textarea/api.mdx'; # Textarea - Code ## Basic ## Disabled ## Readonly ## Resize behavior ## Validation --- ## Textarea - Usage The textarea component is typically used in scenarios such as feedback forms, comment sections and message composition. Its ability to handle extensive text input makes it a versatile tool for collecting detailed user information. ![Textarea overview](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?node-id=3814-1128&t=DtCmoFcLwhf7ke3S-4) 1. Label 2. Required field indicator 3. Placeholder 4. Container 5. Resize handle 6. Helper or feedback text 7. Counter ## Options - **Label**: See [form field](../forms-field). - **Value**: See [form field](../forms-field). - **Required**: See [form field](../forms-field). - **Helper text**: See [form field](../forms-field). - **Feedback text**: See [form field](../forms-field). - **Show text as tooltip**: See [form field](../forms-field). - **Placeholder**: See [form field](../forms-field). - **Counter**: See [form field](../forms-field). - **Resize behavior**: Determines how textareas can be resized (both directions, horizontally, vertically, or no resizing). Default size is 300px x 100px. - **Columns and width**: Defines initial width by number of columns and/or width. - **Rows and height**: Defines initial height by number of rows and/or height. ## Behavior in context - **Interaction**: - Clicking in the container enables the editing of the field. - Users can type, copy, paste and cut text within textareas. - Optional: Users can resize textareas to fit their needs. For example, vertical resizing can be useful in feedback forms when the entry exceeds the default height. - **Validation**: - Minimum and maximum length defines number of characters allowed. - See [form validation](../forms-validation). - **Overflow**: Text within the textarea is not truncated; it supports scrolling for overflow content. - **Alignment**: Text is always left-aligned in textareas. - **Sizing**: - Use columns and rows when you want to define the size of the textarea based on the number of characters (columns) and lines (rows) it can display. This is particularly useful for textareas where the content length is predictable, such as input fields with character limits. - Use width and height when you need to specify the exact dimensions of the textarea in terms of pixels, rems or other units. This is ideal for ensuring consistent layout and design across different screen sizes and devices, especially in responsive designs. ## States Textareas have five states: Default, hover, focused, read-only and disabled. ![Textarea states](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?node-id=3947-527&t=DtCmoFcLwhf7ke3S-4) ## Dos and Don’ts Do ensure the textarea size matches the expected input, e.g. 5 to 10 rows for detailed feedback Do use the placeholder to give users an example of the expected input Do set minimum and maximum character limits to ensure appropriate input length Don’t use the textarea for short, single-line input like name or email address, use an [input field](../input) instead ## Related - [Form fields](../forms-field) - [Validation](../forms-validation) - [Layout](../forms-layout) - [Input](../input) --- ## Tile - Code import PropsApi from '@site/docs/autogenerated/api/ix-tile/api.mdx'; import TilePlayground from '@site/docs/autogenerated/playground/tile.mdx'; # Tile - Code ## Basic --- ## Time picker - Code import PropsApi from '@site/docs/autogenerated/api/ix-time-picker/api.mdx'; import TimepickerPlayground from '@site/docs/autogenerated/playground/timepicker.mdx'; import TimepickerFormatAdjustedPlayground from '@site/docs/autogenerated/playground/timepicker-format-adjusted.mdx'; import TimepickerIntervalsPlayground from '@site/docs/autogenerated/playground/timepicker-intervals.mdx'; # Time picker - Code ## Basic ## Adjusted to Format ## Custom intervals --- ## Time picker - Usage Time pickers are primarily used within [time inputs](../input-time) but can also be utilized standalone in applications where direct time selection is required. ![Time picker anatomy](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=5730-2889&t=X5f645XuQl3ZV8XD-4) 1. Time picker container 2. Time unit (column) headers 3. Selected time 4. AM/PM select (12-hour format only) 5. Confirm [button](../button) ## Options - **Value**: The selected time value. - **Format**: Choose which time units to display, depending on your needs (hours, minutes, seconds, milliseconds). Additionally, define a 12- or 24-hour format. We recommend to use a 24-hour format for universal readability (read more in the [UX writing guides](./../../guidelines/language/writing-style-guide-getting-started)). - **Columns**: Hide hours, minutes, seconds and milliseconds columns when not needed. - **Intervals**: Define an interval for every unit to restrict allowed values and provide a faster selection. For example 2 hours, 15 minutes, 30 seconds, 100 milliseconds. - **Header**: Define a header text that conveys the context of the time selection. Hide it when there is already a related headline in your UI. - **Corners**: By default, the time picker shows rounded corners to be consistent with the [dropdown](../dropdown). Use straight, left or right corners to combine with other components. - **Standalone appearance**: Shows a flat design without a shadow. We typically use it for inline placement. ## Behavior in context - **Interaction**: Users can navigate through the time picker using the keyboard. The following keys are supported: - **Tab**: Navigate between areas of the time picker (header, body, footer). - **Arrow keys or scroll**: Move through time options. - **Enter or click**: Select the highlighted time. ## States An individual time item of a time picker has five states: Default, hover, active, disabled and focused. ![Time picker states](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=5730-2897&t=ZhOOQlwBUWtHJWDA-4) ## Dos and Don’ts Do use the time picker to ensure accurate time selection (we recommend to use [time inputs](../input-time) for that reason) Do provide clear instructions and labels for users Do ensure the time picker is accessible via keyboard Don’t clutter the time picker with unnecessary options ## Related - [Time input](../input-time) - [Date picker](../date-picker) - [Date time picker](../date-time-picker) - [Dropdown](../dropdown) - [W3C date picker accessibility reference](https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-datepicker/) --- ## Toast - Code import { SinceTag } from '@site/src/components/UI/Tags'; import ToastPlayground from '@site/docs/autogenerated/playground/toast.mdx'; import ToastCustomPlayground from '@site/docs/autogenerated/playground/toast-custom.mdx'; import ToastPositionPlayground from '@site/docs/autogenerated/playground/toast-position.mdx'; import ToastConfigJavaScriptApi from '@site/docs/autogenerated/utils/toast-config.mdx'; import ToastFunctions from '@site/docs/autogenerated/utils/toast-utils.mdx'; import ToastServiceAngularApi from '@site/docs/autogenerated/utils/toast.service.mdx'; # Toast - Code ## Basic ## Custom toast message ## Position ## API for toast utils (JavaScript, React, Vue) ### Functions ## API for ToastService (Angular) ### Functions --- ## Toast - Usage Toasts are UI elements where an event causes a small text field to appear on screen. Toasts are informative, last for a few seconds only, and take up a very small part of the screen to avoid interrupting the workflow. They usually follow an action performed by the user and provide information about the success or failure of that action. We typically use toasts for immediate feedback or tips on actions that a user performs, e.g. successful deletion. ![Overview](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?node-id=2550-58743&t=LITgbzwcgm87dQXa-4) 1. Icon 2. Button 3. Progress bar 4. Header 5. Message 6. Close action ## Options - **Toast types:** There are four preset toast types and one custom type: - Info: Provides users with additional information about the performed action. - Success: Informs users of a successfully performed action. - Warning: Warns users of potential problems that could occur due to the action. - Error: Notifies users that the action cannot be performed due to a specific problem. - Custom: Adjust the icon and its color to customize your own toast messages. - **Header:** Add a header for the toast. Use short and concise words. We typically use 1 to 3 keywords, such as "Error occurred" or "Action completed". - **Message:** Add a clear and concise message providing more detailed information about the toast event. We typically provide additional context or instructions related to the event, e.g. "Please check your email for further instructions" or "Your changes have been saved successfully". - **Button:** Include a button to provide users with an option to take further action. We typically use a button to give the user an option to undo the action or to provide a link for further information. - **Position:** Toasts are positioned either at the bottom or top right. The default position is bottom right. This position is configured globally, which means all toasts appear from the same position. We typically change the default position if the toast covers important workflow elements. ![Toast types](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?node-id=2552-64766&t=VfiuoHWd1VYl1GYb-4) ## Behavior in context - **Auto closure:** Toasts should only be displayed on the screen for a few seconds. A progress bar is displayed to visualize the time left until the toast disappears. We typically leave the toast on the screen from 3 to 8 seconds. - **Manual closure:** Toasts can be closed manually at any time. It's also possible to suppress the automatic closing so that the user has to actively close the toast. We normally use a purely manual closure of the toast if the workflow is continued by using the toast, e.g. downloading files. - **Multiple toasts:** Toasts are stacked on top of each other with the newest at the bottom. - **Modal vs. toast:** When both the modal and the toast are triggered simultaneously, the toast appears below the modal. The toast is visible but blurred due to the transparent layer, and it eventually closes if not prevented by the auto-closing option. ![Toast in Context](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?node-id=2589-2697&t=Ysb6WohsxOfZv2ls-4) ## Dos and Don’ts Do use toasts to provide contextual tips and shortcuts for users Do use toasts to instantly inform a user about the outcome of an action Do include shortcuts to undo an action immediately after it’s taken Do stick with a consistent position for toasts within the same app and avoid interchanging their positions Don’t use toasts for high-priority or critical alerts that prevent the user from continuing their work (use a [modal](../messagebar) instead) Don’t edit or reuse icons or icon colors from the four predefined toast types when creating custom toasts ## Related - [Message modal](../message-modal) - [Message bar](../messagebar) - [Modal](../modal) - [Accessibility](../../guidelines/accessibility) --- ## Toast - Language import ToastMessagesContent from '@site/docs/guidelines/language/messaging/toast-messages.mdx'; # Toast - Language --- ## Toggle - Code import PropsApi from '@site/docs/autogenerated/api/ix-toggle/api.mdx'; import TogglePlayground from '@site/docs/autogenerated/playground/toggle.mdx'; import ToggleCustomLabelPlayground from '@site/docs/autogenerated/playground/toggle-custom-label.mdx'; import ToggleDisabledPlayground from '@site/docs/autogenerated/playground/toggle-disabled.mdx'; import ToggleCheckedPlayground from '@site/docs/autogenerated/playground/toggle-checked.mdx'; import ToggleIndeterminatePlayground from '@site/docs/autogenerated/playground/toggle-indeterminate.mdx'; # Toggle - Code ## Basic ## Custom label ## Disabled ## Checked ## Indeterminate --- ## Toggle - Usage A toggle is a user interface element that enables users to switch between two states, such as on/off or enable/disable. It consists of a switch that can be slid or clicked to change its state. They offer a visually clear representation of the current state and allow users to easily toggle between different settings. We typically use toggles in settings, preferences, and other areas where users need to switch between two states quickly and easily. ![Anatomy toggle](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=7147-451930&t=DrLi4Tgyh22TBGiT-4) 1. Label 2. Required indicator 3. Toggle 4. Toggle label 5. Helper or feedback text ## Options - **Label:** See [form field](../forms-field). - **Helper text**: See [form field](../forms-field). - **Feedback text**: See [form field](../forms-field). ## Behavior in context - **Validation**: See [validation](../forms-validation). - **Interaction**: Clicking on the toggle switch changes its state from on to off or vice versa. The toggle visually reflects the current state. ## States ![Toggle states](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?node-id=3389-9845&t=VCAAFzKIYCDb7nIX-4) ## Dos and Don’ts Do use toggles for single features or options that need to be switched quickly and easily Do provide clear labels for toggles to indicate what they control Do use toggles consistently throughout the interface for similar actions or settings Don’t use toggles for complex multi-state options or settings Don’t use toggles for actions that require a confirmation or additional input Don’t use toggles for actions that are irreversible or have serious consequences ## Related - [Form field](../forms-field) - [Validation](../forms-validation) - [Layout](../forms-layout) - [Checkbox](../checkbox) - [Radio](../radio) --- ## Toggle button - Code import { SinceTag } from '@site/src/components/UI/Tags'; import PropsIconToggleButtonApi from '@site/docs/autogenerated/api/ix-icon-toggle-button/api.mdx'; import PropsToggleButtonApi from '@site/docs/autogenerated/api/ix-toggle-button/api.mdx'; import ToggleButtonSecondaryPlayground from '@site/docs/autogenerated/playground/toggle-button-secondary.mdx'; import ToggleButtonTertiaryPlayground from '@site/docs/autogenerated/playground/toggle-button-tertiary.mdx'; import ToggleButtonSubtleSecondaryPlayground from '@site/docs/autogenerated/playground/toggle-button-subtle-secondary.mdx'; import ToggleButtonSubtleTertiaryPlayground from '@site/docs/autogenerated/playground/toggle-button-subtle-tertiary.mdx'; import IconToggleButtonSecondaryPlayground from '@site/docs/autogenerated/playground/icon-toggle-button-secondary.mdx'; import IconToggleButtonTertiaryPlayground from '@site/docs/autogenerated/playground/icon-toggle-button-tertiary.mdx'; import IconToggleButtonSubtleSecondaryPlayground from '@site/docs/autogenerated/playground/icon-toggle-button-subtle-secondary.mdx'; import IconToggleButtonSubtleTertiaryPlayground from '@site/docs/autogenerated/playground/icon-toggle-button-subtle-tertiary.mdx'; # Toggle button - Code ## Secondary ## Tertiary ## Subtle secondary ## Subtle tertiary ## Icon secondary ## Icon tertiary ## Icon subtle secondary ## Icon subtle tertiary --- ## Toggle button - Usage Toggle buttons with and without text labels are available. We typically use toggle buttons to switch between states or modes. They are ideal for scenarios where a setting can be turned on or off, or where a selection can be toggled independently of others. ![Overview](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=5890-9247&t=p3alxGH4u4utYcc1-4) Variants, options and states of the [button](../button/index.mdx) and the [icon button](../icon-button/index.mdx) components apply. Only additional, deviating or detailing specifications are listed here. ## Options - **Pressed:** Toggle buttons can take a pressed (active) state. To improve accessibility, this state is set via the pressed option so it can be read by screen readers. - The options **type** and **color** are not available for toggle buttons. - For the default variant, one of the options **secondary** or **tertiary** has to be set. - **Oval:** The shape of icon toggle buttons can be adjusted from square to oval. ## Behavior in context - **Independent toggling:** Toggle buttons are typically used on their own or in layouts where each button represents an independent setting or mode. For example, toggling bold, italic or underline in a text editor. ## States Toggle buttons have five states: Default, hover, active, disabled, loading and focused. All states are also available for pressed toggled buttons. ## Dos and Don’ts Do use toggle buttons when users can switch a setting on or off independently Do use toggle buttons when two opposing options don’t follow the on/off metaphor Don’t use toggle buttons in button groups where only one option can be selected (use normal [buttons](../button/index.mdx) or [icon buttons](../icon-button/index.mdx) instead) ## Related - [Button](../button) - [Icon button](../icon-button) - [Toggle](../toggle) --- ## Tooltip - Code import PropsApi from '@site/docs/autogenerated/api/ix-tooltip/api.mdx'; import TooltipPlayground from '@site/docs/autogenerated/playground/tooltip.mdx'; # Tooltip - Code ## Basic ## A11y Set the `aria-describedby` attribute on the trigger element to the tooltip `id` attribute. This allows assistive technologies to establish a logical connection between the trigger and the tooltip. See examples [above](#basic). [More information](https://www.w3.org/WAI/ARIA/apg/patterns/tooltip/) --- ## Tooltip - Usage Use tooltips to clarify the function of familiar icon-only controls or add brief context without cluttering the interface. We recommend them only for non-essential information that users can understand without interacting with the overlay. Use tooltips sparingly and prefer visible labels for unfamiliar icons or important information. ![Tooltip anatomy](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=8177-86) 1. Tooltip container 2. Spike 3. Icon and title 4. Content ## Options - **Title:** Add a short title when users need a topic before reading the content. Omit it when a single line explains the trigger clearly. - **Icon:** Add an icon only when it helps users identify the message type or subject faster. - **Content:** Keep content brief and specific. Follow the [tooltip language guidance](uxwriting.mdx) for labels, sentence structure and punctuation. - **Interactive:** Enable this option when users need to move the pointer onto the tooltip, for example to select or copy its content. - **Spike direction:** Point the spike toward the trigger. Choose top, right, bottom or left based on the available space, or omit the spike when the relationship to the trigger is clear. ## Behavior in context ![Tooltip behavior](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=8196-111&t=PY7WtvFZYEs3ukFT-4) - **Interaction:** Tooltips appear when users hover over or focus the trigger and disappear when the pointer or focus moves away. The component controls the delay for showing and hiding tooltips. - **Overflow:** Tooltips wrap content within their predefined maximum width of 292 px. Their height adapts to the content and has no predefined maximum. - **Placement:** The position depends on the trigger element, e.g. a button. By default, tooltips appear above the trigger. When there isn’t enough space for the selected placement, the position is corrected automatically. - **Responsiveness:** Touch devices don’t provide a persistent hover state. Tapping a trigger can open its tooltip and activate the trigger’s primary action at the same time. - **Accessibility:** The `aria-describedby` attribute connects tooltips to their triggers as supplementary descriptions. Accessible names remain separate. Disabled elements don’t receive keyboard focus, so their tooltips don’t appear through focus. ## States Tooltips don’t have visual interaction states. They are hidden by default and appear when users hover over or focus the trigger. ## Dos and Don’ts - Do use tooltips to name familiar icon-only controls or provide supplementary context - Do keep tooltip content concise and useful without further interaction - Do use tooltips only with familiar icons and provide unfamiliar icons with visible labels that communicate their meaning without hover or focus - Don’t place essential instructions or critical feedback only in a tooltip, use persistent content or [message modals](../message-modal) instead - Don’t add links, buttons or form controls to tooltips, use [popovers](../popover) instead - Don’t repeat a visible label when the tooltip adds no new information - Don’t attach tooltips to disabled elements - Don’t use native browser tooltips, use the tooltip component for consistent behavior and accessibility ## Related - [Popover](../popover) - [Icon button](../icon-button) - [Tooltip language guidance](../../guidelines/language/messaging/tooltips) - [Accessibility](../../guidelines/accessibility) --- ## Tooltip - Language import TooltipContent from '@site/docs/guidelines/language/messaging/tooltips.mdx'; # Tooltip - Language --- ## Tree - Code import PropsApi from '@site/docs/autogenerated/api/ix-tree/api.mdx'; import TreeItemPropsApi from '@site/docs/autogenerated/api/ix-tree-item/api.mdx'; import TreePlayground from '@site/docs/autogenerated/playground/tree.mdx'; import TreeCustomPlayground from '@site/docs/autogenerated/playground/tree-custom.mdx'; # Tree - Code ## Basic ## Custom tree node --- ## Upload - Code import PropsApi from '@site/docs/autogenerated/api/ix-upload/api.mdx'; import UploadPlayground from '@site/docs/autogenerated/playground/upload.mdx'; # Upload - Code ## Basic --- ## User message - Code import ChatUserMessagePlayground from '@site/docs/autogenerated/playground/chat-user-message.mdx'; import PropsApi from '@site/docs/autogenerated/api/ix-chat-user-message/api.mdx'; # User message - Code ## Basic --- ## User message - Usage User messages display a single prompt submitted by users in a conversational thread. We recommend using them to preserve what users asked, attached or edited so follow-up answers maintain context. ![User message anatomy](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=7959-1370&t=8Rj3ErabF16Vm3lH-4) 1. Attachments 2. Message 3. Actions ## Options - **Attachments:** When users attach files with their prompts, show those [attachments](../chat-attachment) with the message to maintain context even after multiple turns in the conversation. - **Message:** Show the original user input as the main message content without alterations. - **Actions:** Add only the few actions users need for their own prompt, e.g. copy, edit or open a compact overflow menu. We recommend using subtle tertiary [icon buttons](../icon-button) so actions stay secondary to the message. ## Behavior in context - **Interaction:** User messages keep the sent prompts visible as a chat history of user input. - **Actions:** Message actions are only shown when users hover over the message with a mouse, tap the message on touch devices or reach the message with the `Tab` key (for Siemens AG see the [AI UX terminology guide](https://www.figma.com/design/lqjt9c5IzzwQ4eJ4nqG7Kv/AI-Terminology?node-id=1-9&t=8g9VIGSar5B6wwtC-1) on labelling actions). - **Placement:** User messages are always placed on the right side of the [chat](../chat/) to visually distinguish them from [AI messages](../ai-message) on the left side. - **Responsiveness:** User messages take from 45 to 80% of the chat's container width, depending on the viewport width. ## Dos and Don’ts - Do offer only the few actions users need after sending, e.g. copy or edit - Do keep the messages and attachments visible as a continuous chat ## Related - [Chat](../chat) - [AI message](../ai-message) - [Chat input](../chat-input) --- ## Workflow - Code import WorkflowStepPropsApi from '@site/docs/autogenerated/api/ix-workflow-step/api.mdx'; import WorkflowStepsPropsApi from '@site/docs/autogenerated/api/ix-workflow-steps/api.mdx'; import WorkflowPlayground from '@site/docs/autogenerated/playground/workflow.mdx'; import WorkflowVerticalPlayground from '@site/docs/autogenerated/playground/workflow-vertical.mdx'; # Workflow - Code ## Basic ## Vertical --- ## Code(Accessibility) import Playground from '@site/src/components/Playground' import AriaLabelProperties_html_html from '@site/docs/autogenerated/usage/html/aria-label-properties.html.md'; import InputLabelPlayground from '@site/docs/autogenerated/playground/input-label.mdx'; import EventListPlayground from '@site/docs/autogenerated/playground/event-list.mdx'; import CardListPlayground from '@site/docs/autogenerated/playground/card-list.mdx'; ## Accessibility in HTML and JavaScript This chapter describes best practices for designing HTML/JavaScript applications that work well for all users, including those who rely on assistive technologies. We covered most common use cases in our components with built-in accessibility features. For a detailed introduction to basic concepts and general techniques for designing accessible applications, see the [accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility) section of the [MDN Web Docs](https://developer.mozilla.org/en-US/). ### Accessibility attributes Building accessible web experiences often involves setting [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) to provide semantic meaning where it might otherwise be missing. Use JavaScript to dynamically control the values of accessibility-related attributes. When you work with ARIA attributes in JavaScript, use the `setAttribute()` method or direct property assignment: ```javascript // Use setAttribute for ARIA attributes const button = document.querySelector('button'); button.setAttribute('aria-label', 'Save document'); // Or use direct property assignment button.ariaLabel = 'Save document'; ``` Static ARIA attributes can be set directly in HTML: ```html ``` For iX components, use the dedicated `ariaLabel` attribute for elements contained inside components. **Example**: Setting the `aria-label` for the icon buttons contained in ix-date-picker component. ### Keyboard only and no keyboard trap We recommend that all functions are usable with a keyboard and don’t depend on timed key presses, e.g. pressing enter within 3 seconds to confirm. The only exception is functionality that relies on the path of a movement, not just its start and end points, e.g. freehand drawing or signing a signature. For components that use a simple, linear structure, stick to the default tab-based navigation. Make sure every clickable surface is both reachable and clickable by keyboard. You can also set the [tabindex](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/tabindex) attribute to manipulate the default tab-navigation. For components that use a more complex, two-dimensional structure, consider implementing keyboard interaction using the arrow keys: ```javascript // Arrow key navigation for complex components function handleArrowNavigation(event, container) { const items = Array.from( container.querySelectorAll('[role="gridcell"], [role="option"]'), ); const currentIndex = items.indexOf(event.target); switch (event.key) { case 'ArrowRight': focusItem(items[currentIndex + 1] || items[0]); break; case 'ArrowLeft': focusItem(items[currentIndex - 1] || items[items.length - 1]); break; case 'ArrowDown': // Implement based on your layout break; case 'ArrowUp': // Implement based on your layout break; } } function focusItem(item) { if (item) { item.focus(); } } ``` Always attempt to keep the focus on changes to prevent the user from manually having to navigate back to the previous location. #### Focus management Implement focus trapping for modal dialogs and other overlay components: ```javascript function trapFocus(container) { const focusableElements = container.querySelectorAll( 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])', ); const firstFocusable = focusableElements[0]; const lastFocusable = focusableElements[focusableElements.length - 1]; container.addEventListener('keydown', function (event) { if (event.key === 'Tab') { if (event.shiftKey) { if (document.activeElement === firstFocusable) { lastFocusable.focus(); event.preventDefault(); } } else { if (document.activeElement === lastFocusable) { firstFocusable.focus(); event.preventDefault(); } } } }); } ``` #### How to test Disconnect your mouse and try to operate your service using only the keyboard. ### Text alternatives and labels Label any non-text content, e.g. images, buttons, links or inputs, to comply with [WCAG guideline 2.1](https://www.w3.org/WAI/WCAG22/quickref/?showtechniques=141%2C131#keyboard-accessible). The general rule to follow is: 1. Use `aria-labelledby` 2. Otherwise use `aria-label` 3. Otherwise use `alt` attribute 4. Otherwise use `title` attribute 5. If none of the above yield a usable text string, there is no accessible name When you are using iX components, the relevant attribute will be set when you set the component's labelling attribute: #### ARIA-labelledby Use when there is already a text which describes the element. An example are forms where there is a field description followed by the input. ```html This is the input label ``` #### ARIA-label The `aria-label` describes elements that have no text, like images, buttons or links. The interaction result or impact of clicking / activating a button or link shall be explained by the `aria-label`. ```html ``` You can also set these dynamically with JavaScript: ```javascript const button = document.querySelector('#save-button'); button.setAttribute('aria-label', 'Save document'); ``` #### Alt attribute Use `alt` attributes some elements offer to add an additional description to an element. Depending on the screen reader it might not get picked up. ```html ``` #### Title attribute Similar to the `alt` attribute, the `title` allows adding additional information about an element. Again, it might not be caught up by screen readers. ```html ``` #### Visually hidden text When e.g. `aria-label` isn’t allowed or doesn't make sense to use, use hidden text to make specific description text that is read by a screen reader but isn’t visible in the UI. ```html physical input ``` ```css .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; } ``` #### How to test If you are using chrome dev tools you have some options that make your life easier here. You can either use the [audit](https://developer.chrome.com/docs/devtools/accessibility/reference#audits) functionality to generate a report or use the [accesibility tree](https://developer.chrome.com/blog/full-accessibility-tree). Alternatively, you can use browser extensions or playwright in conjunction with [@axe-core/playwright](https://www.npmjs.com/package/@axe-core/playwright) within the CI/CD Pipeline. Additionally, using a screen reader to test it is beneficial. ### Navigation and landmarks Navigation provides a means for users to get around in applications. Most of the HTML sectioning elements provide default ARIA landmarks. The `aria-label` attribute enables the logical navigation definition and separation of elements, which have the same type. For example, if multiple `