Input

Several basic Inputs are bundled in a single NPM package npm install @tis-cca/form-grid.

The following inputs are included in the form-grid package:

  • Input
  • Select
  • Textarea
  • Date Input

The following inputs are distributed as individual packages:

  • Checkboxes - npm install @tis-cca/checkbox
  • Radiobuttons - npm install @tis-cca/radiobuttons

Input static (readonly lookalike)

An input that is in a readonly state. Readonly inputs should be used if content should look like an input but use of a "real" input is not desireable or feasible. An alternative is simple setting the input in a "disabled" state.

Input-value
<div class="inventory-cell__element">
   <label class="inventory-cell__label">Input-Label</label>
   <span class="inventory-cell__static">Input-value</span>
</div>

Input disabled

A regular Input that the user (currently) can't edit.

<div class="inventory-cell__element">
   <label class="inventory-cell__label">Input-Label</label>
   <input class="inventory-cell__input" disabled="">
</div>

Input readonly

An Input that the user (currently) can't edit, but is allowed to copy text from.

<div class="inventory-cell__element">
   <label class="inventory-cell__label">Input-Label</label>
   <input class="inventory-cell__input" value="this text can be copied" readonly>
</div>

Input edit

A regular text input that the user (currently) can edit.

<div class="inventory-cell__element">
   <label class="inventory-cell__label">Input-Label</label>
   <input class="inventory-cell__input">
</div>

Input edit (state required)

To mark an input as required, the class inventory-cell__element--required needs to be set on the wrapping inventory-cell__element.

<div class="inventory-cell__element inventory-cell__element--required">
   <label class="inventory-cell__label">Input-Label</label>
   <input class="inventory-cell__input">
</div>

Input edit (state error)

To warn the user that there is a problem with the data in the input field, the class inventory-cell__element--error needs to be set on the wrapping inventory-cell__element. Common use-cases for this are:

  • The input is required but was not filled in by the user prior to saving.
  • The format of the inputted data is not allowed for this specific input field.
  • Server-side validation respond that the data inputted is somehow invalid.

The optional inventory-cell__error element should be used to give the user instructions what triggered the error state and what he/she can do to remedy that.

Error text to let the user know what he has done wrong.
<div class="inventory-cell__element inventory-cell__element--error">
   <label class="inventory-cell__label">Input-Label</label>
   <input class="inventory-cell__input">
   <div class="inventory-cell__error">
       <span>Error text to let the user know what he has done wrong.</span>
   </div>
</div>

Input edit (states required + error)

Error text to let the user know what he has done wrong.
<div class="inventory-cell__element inventory-cell__element--required inventory-cell__element--error">
   <label class="inventory-cell__label">Input-Label</label>
   <input class="inventory-cell__input">
   <div class="inventory-cell__error">
       <span>Error text to let the user know what he has done wrong.</span>
   </div>
</div>

Input with right alignment (for numbers)

  • Use inventory-cell__input--align-right modifier if you have multiple inputs or static fields that are aligned vertically and contain numbers.
  • The --align-right modifier can only be used on the following types of form-fields:
    • inventory-cell__input => inventory-cell__input--align-right
    • inventory-cell__static(readonly input) => inventory-cell__static--align-right
Die Jahresnettoprämie (JNP) darf keinen negativen Wert aufweisen.
% = 0,00
% = 50,00
% = 137,50
<div class="mdc-layout-grid inventory-grid">
  <div class="mdc-layout-grid__inner inventory-grid__inner">
     <div class="inventory-cell mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet">
         <div class="inventory-cell__element inventory-cell__element--required">
            <label class="inventory-cell__label">VSU</label>
            <input class="inventory-cell__input inventory-cell__input--align-right" value="20.000.000,00">
         </div>
         <div class="inventory-cell__element inventory-cell__element--required inventory-cell__element--error">
            <label class="inventory-cell__label">JNP</label>
            <input class="inventory-cell__input inventory-cell__input--align-right" value="-1.250,00">
            <div class="inventory-cell__error">
                  <span>Die Jahresnettoprämie (JNP) darf keinen negativen Wert aufweisen.</span>
            </div>
         </div>
         <div class="inventory-cell__element">
            <label class="inventory-cell__label">UJZ</label>
            <div class="inventory-cell__element-group">
                <input class="inventory-cell__input inventory-cell__input--align-right" value="0,00">
                <span class="inventory-cell__element-group-sublabel">% =</span>
            <span class="inventory-cell__static inventory-cell__static--align-right">0,00</span>
            </div>  
         </div>
         <div class="inventory-cell__element">
            <label class="inventory-cell__label">Feuerschutzsteuer (FSt.)</label>
            <div class="inventory-cell__element-group">
                <input class="inventory-cell__input inventory-cell__input--align-right" value="4,00">
                <span class="inventory-cell__element-group-sublabel">% =</span>
            <span class="inventory-cell__static inventory-cell__static--align-right">50,00</span>
            </div>  
         </div>
         <div class="inventory-cell__element">
            <label class="inventory-cell__label">Vers.St.</label>
            <div class="inventory-cell__element-group">
                <input class="inventory-cell__input inventory-cell__input--align-right" value="11,00">
                <span class="inventory-cell__element-group-sublabel">% =</span>
            <span class="inventory-cell__static inventory-cell__static--align-right">137,50</span>
            </div>  
         </div>
     </div>
  </div>
</div>

Input Group

All basic input elements (input, select) can be put in groups. This should be done if it is desired that multiple inputs appear as a single row in the form-grid layout.

Input Group readonly

In it's most basic form, both inputs share a single label.

Input-value Input-value
<div class="mdc-layout-grid inventory-grid inventory-grid--readonly">
   <div class="mdc-layout-grid__inner inventory-grid__inner">
      <div class="inventory-cell mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet">
         <div class="inventory-cell__element">
            <label class="inventory-cell__label">Input-Label</label>
            <div class="inventory-cell__element-group">
                <span class="inventory-cell__static">Input-value</span>
                <span class="inventory-cell__static">Input-value</span>
            </div>
         </div>
	</div>
   </div>
</div>

Input Group edit

In it's most basic form, both inputs share a single label.

<div class="mdc-layout-grid inventory-grid">
   <div class="mdc-layout-grid__inner inventory-grid__inner">
      <div class="inventory-cell mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet">
         <div class="inventory-cell__element">
            <label class="inventory-cell__label">Input-Label</label>
            <div class="inventory-cell__element-group">
                <input class="inventory-cell__input">
                <input class="inventory-cell__input">
            </div>
         </div>
	</div>
   </div>
</div>

Input Group mit checkbox und input

  • Eine Input Group wo das Input Feld mit einer vorgelagerten Checkbox aktiviert werden kann.
  • Achtung: Wenn die Checkbox auf "Nein" gestellt ist, soll das folgende Input "disabled" sein.
<div class="mdc-layout-grid inventory-grid">
   <div class="mdc-layout-grid__inner inventory-grid__inner">
      <div class="inventory-cell mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet">
         <div class="inventory-cell__element">
            <label class="inventory-cell__label">label</label>
            <div class="inventory-cell__element-group">
                <div class="mdc-checkbox">
                 <input type="checkbox" id="kundenstatus" class="mdc-checkbox__native-control"/>
                 <div class="mdc-checkbox__background">
                    <svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24">
                       <path class="mdc-checkbox__checkmark-path" fill="none" stroke="white" d="M1.73,12.91 8.1,19.28 22.79,4.59"></path>
                    </svg>
                   <div class="mdc-checkbox__mixedmark"></div>
                 </div>
              </div>
              <label class="inventory-cell__checkbox-label" for="kundenstatus">checklabel</label>
                <input class="inventory-cell__input">
            </div>
         </div>
	</div>
   </div>
</div>

Input Group readonly with a sublabel

Sometimes it is desired, that each input field has its own additional label. The most common usecases for these sublabels are to explain:

  • Currencies
  • Units
    • horsepower (PS)
    • squaremeter (m²)
  • day/month (T, M)
Input-value A Input-value B
<div class="mdc-layout-grid inventory-grid inventory-grid--readonly">
   <div class="mdc-layout-grid__inner inventory-grid__inner">
      <div class="inventory-cell mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet">
         <div class="inventory-cell__element">
            <label class="inventory-cell__label">Input-Label</label>
            <div class="inventory-cell__element-group">
                <span class="inventory-cell__static">Input-value</span>
                <span class="inventory-cell__element-group-sublabel">A</span>
                <span class="inventory-cell__static">Input-value</span>
                <span class="inventory-cell__element-group-sublabel">B</span>
            </div>
         </div>
	</div>
   </div>
</div>

Input Group edit with sublabel

A B
<div class="mdc-layout-grid inventory-grid">
   <div class="mdc-layout-grid__inner inventory-grid__inner">
      <div class="inventory-cell mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet">
         <div class="inventory-cell__element">
            <label class="inventory-cell__label">Input-Label</label>
            <div class="inventory-cell__element-group">
                <input class="inventory-cell__input">
                <span class="inventory-cell__element-group-sublabel">A</span>
                <input class="inventory-cell__input">
                <span class="inventory-cell__element-group-sublabel">B</span>
            </div>
         </div>
	</div>
   </div>
</div>

Input Group with two Labels

Use this option if both input fields should be labeled individually.

Input Group with two Labels - readonly

Input-value #1
Input-value #2
<div class="mdc-layout-grid inventory-grid inventory-grid--readonly">
   <div class="mdc-layout-grid__inner inventory-grid__inner">
      <div class="inventory-cell mdc-layout-grid__cell mdc-layout-grid__cell--span-12 mdc-layout-grid__cell--span-4-tablet">
         <div class="inventory-cell__element">
            <div class="mdc-layout-grid__inner inventory-grid__inner">
               <div class="inventory-cell mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-4-phone">
                  <div class="inventory-cell__element">
                     <label class="inventory-cell__label">Input-Label #1</label>
                     <span class="inventory-cell__static">Input-value #1</span>
                  </div>
               </div>
               <div class="inventory-cell mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-4-phone">
                  <div class="inventory-cell__element">
                     <label class="inventory-cell__label">Input-Label #2</label>
                     <span class="inventory-cell__static">Input-value #2</span>
                  </div>
               </div>
            </div>
         </div>
      </div>
   </div>
</div>

Input Group with two Labels - edit

<div class="mdc-layout-grid inventory-grid">
   <div class="mdc-layout-grid__inner inventory-grid__inner">
      <div class="inventory-cell mdc-layout-grid__cell mdc-layout-grid__cell--span-12 mdc-layout-grid__cell--span-4-tablet">
         <div class="inventory-cell__element">
            <div class="mdc-layout-grid__inner inventory-grid__inner">
               <div class="inventory-cell mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-4-phone">
                  <div class="inventory-cell__element">
                     <label class="inventory-cell__label">Input-Label #1</label>
                     <input class="inventory-cell__input">
                  </div>
               </div>
               <div class="inventory-cell mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-4-phone">
                  <div class="inventory-cell__element">
                     <label class="inventory-cell__label">Input-Label #2</label>
                     <input class="inventory-cell__input">
                  </div>
               </div>
            </div>
         </div>
      </div>
   </div>
</div>

Input Group with two Labels and two append elements - edit

In this layout, it is still possible to set a "required" or "error" state on each of the form elements individually.

Input Append #1
Input Append #2
<div class="mdc-layout-grid inventory-grid">
   <div class="mdc-layout-grid__inner inventory-grid__inner">
      <div class="inventory-cell mdc-layout-grid__cell mdc-layout-grid__cell--span-12 mdc-layout-grid__cell--span-4-tablet">
         <div class="inventory-cell__element">
            <div class="mdc-layout-grid__inner inventory-grid__inner">
               <div class="inventory-cell mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-4-phone">
                  <div class="inventory-cell__element">
                     <label class="inventory-cell__label">Input-Label #1</label>
                     <div class="inventory-cell__split-element-group">
                        <input class="inventory-cell__input">
                        <span class="inventory-cell__append">Input Append #1</span>
                     </div>
                  </div>
               </div>
               <div class="inventory-cell mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-4-phone">
                  <div class="inventory-cell__element">
                     <label class="inventory-cell__label">Input-Label #2</label>
                     <div class="inventory-cell__split-element-group">
                        <input class="inventory-cell__input">
                        <span class="inventory-cell__append">Input Append #2</span>
                     </div>
                  </div>
               </div>
            </div>
         </div>
      </div>
   </div>
</div>

Append

Append elements can be used similar to sublabels to categorize the content of the input field. Because the also limit the space available in the input field, these are especially suited for short numbers.

Input + Append edit

Append description
<div class="mdc-layout-grid inventory-grid">
   <div class="mdc-layout-grid__inner inventory-grid__inner">
      <div class="inventory-cell mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet">
         <div class="inventory-cell__element">
            <label class="inventory-cell__label">Input-Label</label>
            <div class="inventory-cell__split-element-group">
                <input class="inventory-cell__input">
                <span class="inventory-cell__append">Append description</span>
            </div>
         </div>
	</div>
   </div>
</div>

Input + Append readonly

If you use the static/readonly variant, make sure to include both the Input-value as well as the Apend description.

Input-value + Apend description
<div class="mdc-layout-grid inventory-grid inventory-grid--readonly">
   <div class="mdc-layout-grid__inner inventory-grid__inner">
      <div class="inventory-cell mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet">
         <div class="inventory-cell__element">
            <label class="inventory-cell__label">Input-Label</label>
            <span class="inventory-cell__static">
                <span>Input-value</span>
                <span> + Apend description</span>
            </span>
         </div>
	</div>
   </div>
</div>

Input + Append edit (states)

Inputs that are combined with append elements can have the following states:

  • required - use inventory-cell__element--required on the wrapping inventory-cell__element.
  • error - use inventory-cell__element--error on the wrapping inventory-cell__element.
  • disabled - use the html disabled="" attribute.
Input Append
<div class="mdc-layout-grid inventory-grid">
   <div class="mdc-layout-grid__inner inventory-grid__inner">
      <div class="inventory-cell mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet">
         <div class="inventory-cell__element inventory-cell__element--required">
            <label class="inventory-cell__label">Input-Label</label>
            <div class="inventory-cell__split-element-group">
                <input class="inventory-cell__input">
                <span class="inventory-cell__append">Input Append</span>
            </div>
         </div>
	</div>
   </div>
</div>

Date Input

npm install @tis-cca/form-grid

General

Use a date input to help users entering dates as well as prevent them from entering invalid dates.

Component structure

At it's core, the date-input does consist of two inputs:
  • a date input field inventory-cell__input-date-field
  • a date picker (that opens a picker popup) inventory-cell__input-date-datepicker
Attention It is important to keep these two separate input fields in sync. Entering a date in one of them should always apply the same date to the other input.

Focus

The datepicker (inventory-cell__input-date-datepicker) should not receive focus when the users navigates the form by pressing the [TAB] key.

Supported date formats

  • Supported characters in the date input field:
    • All numbers
    • . (period)
  • Valid date input formats:
    • TT.MM.JJJJ
      • Example: 07.05.2021
    • TTMMJJJJ
      • Example: 07052021
    • TTMMJJ
      • Example: 070521
    • TT => will be autocompleted
    • TT.MM => will be autocompleted
    • TTMM => will be autocompleted

Autocompleting dates

  • If dates are only entered partially, they should be autocompleted once the input field loses focus or the users presses [ENTER]:
    • TTMMJJJJ => TT.MM.JJJJ
      • Example: 07052021 => 07.05.2021
    • TT.XX.XXXX => TT.{current month}.{current year}
      • Example: 07.XX.XXXX => 07.05.2021
    • TT.MM.XXXX => TT.MM.{current year}
      • Example: 07.05.XXXX => 07.05.2021

Keyboard shortcuts

  • The following keyboard shortcuts should be supported:
    • [CTRL] + [.] => sets the date to the current date (current day + month + year).
    • [TAB] focuses the next input field (should ignore the date-picker element!)
    • [SHIFT] + [TAB] focuses the previous input field
    • [SPACE] opens the datepicker popup
    • [ESC] closes the datepicker popup
    • [ENTER] when datepicker popup is open: accepts the currently selected date and closes the popup
    • [ENTER] when the input field is focused and a partial date is already entered: autocompletes the date according to the previous section.

Date Input default

<div class="mdc-layout-grid inventory-grid">
   <div class="mdc-layout-grid__inner inventory-grid__inner">
       <div class="inventory-cell mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet">
           <div class="inventory-cell__element">
              <label class="inventory-cell__label">Input-Label</label>
              <custom-angular-element>
                 <div class="inventory-cell__input-date">
                    <input class="inventory-cell__input-date-field" type="text" placeholder="TT.MM.JJJJ" inputmode="numeric" maxlength="10">
                    <input class="inventory-cell__input-date-datepicker" type="date" tabindex="-1">
                 </div>
              </custom-angular-element>
           </div>
       </div>
   </div>
</div>

<script>
const textInput = document.querySelector('.inventory-cell__input-date-field');
const dateInput = document.querySelector('.inventory-cell__input-date-datepicker');
 dateInput.addEventListener('change', event => {
   textInput.value = event.target.value;
 });
 textInput.addEventListener('input', event => {
   const value = textInput.value.trim();
   dateInput.value = value.match(/^\d{4}-\d{2}-\d{2}$/) ? value : '';
 });
</script>

Date Input required

<div class="mdc-layout-grid inventory-grid">
   <div class="mdc-layout-grid__inner inventory-grid__inner">
       <div class="inventory-cell mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet">
           <div class="inventory-cell__element inventory-cell__element--required">
              <label class="inventory-cell__label">Input-Label</label>
              <custom-angular-element>
                 <div class="inventory-cell__input-date">
                    <input class="inventory-cell__input-date-field" type="text" placeholder="TT.MM.JJJJ" inputmode="numeric" maxlength="10">
                    <input class="inventory-cell__input-date-datepicker" type="date" tabindex="-1">
                 </div>
              </custom-angular-element>
           </div>
       </div>
   </div>
</div>

Date Input required and error

Das Schadendatum kann nicht vor dem Vertragsbeginn liegen.
<div class="mdc-layout-grid inventory-grid">
   <div class="mdc-layout-grid__inner inventory-grid__inner">
       <div class="inventory-cell mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet">
           <div class="inventory-cell__element inventory-cell__element--required inventory-cell__element--error">
              <label class="inventory-cell__label">Input-Label</label>
              <custom-angular-element>
                 <div class="inventory-cell__input-date">
                    <input class="inventory-cell__input-date-field" type="text" placeholder="TT.MM.JJJJ" inputmode="numeric" maxlength="10">
                    <input class="inventory-cell__input-date-datepicker" type="date" tabindex="-1">
                 </div>
              </custom-angular-element>
              <div class="inventory-cell__error">
                  <span>Das Schadendatum kann nicht vor dem Vertragsbeginn liegen.</span>
              </div>
           </div>
       </div>
   </div>
</div>

Date Input readonly

<div class="mdc-layout-grid inventory-grid">
   <div class="mdc-layout-grid__inner inventory-grid__inner">
       <div class="inventory-cell mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet">
           <div class="inventory-cell__element">
              <label class="inventory-cell__label">Input-Label</label>
              <custom-angular-element>
                 <div class="inventory-cell__input-date">
                    <input class="inventory-cell__input-date-field" type="text" placeholder="TT.MM.JJJJ" inputmode="numeric" maxlength="10" value="15.05.2018" readonly>
                    <input class="inventory-cell__input-date-datepicker" type="date" tabindex="-1" readonly>
                 </div>
              </custom-angular-element>
           </div>
       </div>
   </div>
</div>

Date Input icon-only

<button class="tca-datepicker-icon-only">
     <span class="icon-datepicker"></span>
     <input type="date" tabindex="-1">
</button>

Time Input

npm install @tis-cca/form-grid

General

Use a time input to help users entering times as well as prevent them from entering invalid times.

Usage

The following properties of the native html input are not well supported by all browsers and should not be used:
  • min
  • max
  • datalist to show suggested times

Time Input

<div class="tca-button-group">
  <button class="tca-button" onclick="ToggleTimeInputDisabled()">Toggle disabled</button>
  <button class="tca-button" onclick="ToggleTimeInputRequired()">Toggle required</button>
  <button class="tca-button" onclick="ToggleTimeInputError()">Toggle error</button>
  <button class="tca-button" onclick="ToggleTimeInputReadonly()">Toggle readonly</button>
</div>

<div class="mdc-layout-grid inventory-grid">
   <div class="mdc-layout-grid__inner inventory-grid__inner">
       <div class="inventory-cell mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet">
           <div class="inventory-cell__element" id="time-input-validation-example">
              <label class="inventory-cell__label">Input-Label</label>
              <input class="inventory-cell__input-time" type="time" id="time-input-disabled-example">
           </div>
       </div>
   </div>
</div>


<script>

function ToggleTimeInputDisabled() {
var x = document.getElementById('time-input-disabled-example');
x.toggleAttribute("disabled");}

function ToggleTimeInputRequired() {
var x = document.getElementById('time-input-validation-example');
x.classList.toggle("inventory-cell__element--required");}

function ToggleTimeInputError() {
var x = document.getElementById('time-input-validation-example');
x.classList.toggle("inventory-cell__element--error");}

function ToggleTimeInputReadonly() {
var x = document.getElementById('time-input-disabled-example');
x.toggleAttribute("readonly");}

</script>

Select

Select inputs offer predefined values for the user to choose from.

  • Selects are distributed as part of the npm install @tis-cca/form-grid package
  • If a user should be able to input their own data as well as choose from suggestions, use a combobox element instead.

Select readonly

A select element that is in a readonly state. Readonly inputs should be used if content should look like an input but use of a "real" input is not desireable or feasible. An alternative is simple setting the input in a "disabled" state.

Selected Option
<div class="inventory-cell__element">
   <label class="inventory-cell__label">Select-Label</label>
   <span class="inventory-cell__static">Selected Option</span>
</div>

Select - edit

  • All input modifiers like inventory-cell__element--required inventory-cell__element--error are also possible on selects.
  • Selects can also be used in Input Groups
<div class="inventory-cell__element">
   <label class="inventory-cell__label">Select-Label</label>
   <select class="inventory-cell__select">
     <option value="1">Select Option 1</option>
     <option value="2">Select Option 2</option>
   </select>
</div>

Select - disabled state

<div class="inventory-cell__element">
   <label class="inventory-cell__label">Select-Label</label>
   <select class="inventory-cell__select" disabled="">
     <option value="1">Select Option 1</option>
     <option value="2">Select Option 2</option>
   </select>
</div>

Multiselect

npm install @tis-cca/multiselect

Supported Variants

The following variants of multiselects are supported:
  • Basic (use this if there are few options that rarely change)
  • Advanced with search (use this if users have many options to choose from)

Display active selection

Once a selection is made in the popup, this should be reflected visually in the input:
  • Display a tca-chip containing the name of the selected element.
  • Display a tca-chip containing the number that implies, how many additional selections are set besides the first one.

Validation and states

Since multiselects are inputs, they support the following states:
  • Required: Use inventory-cell__element--required
  • Error: Use inventory-cell__element--error
  • Disabled: Use tca-multiselect-input--disabled

Popup behavior

  • A tca-multiselect-popup should open when the user clicks anywhere on the tca-multiselect-input.
  • A tca-multiselect-popup should close when one of the following things happens:
    • the user clicks on the apply button "Schließen".
    • the user clicks anywhere outside of the popup.

[Optional] Provide a search within the popup

If you expect there to be many selections, you can provide a search-field to the user:
  • To do so, simply add a search-container within the tca-multiselect-popup__top-area.

Multiselect basic (no search, few options)

Generali Versicherung AG +2
<div class="tca-button-group">
  <button class="tca-button" onclick="ToggleDisabled()">Toggle disabled</button>
  <button class="tca-button" onclick="ToggleRequired()">Toggle required</button>
  <button class="tca-button" onclick="ToggleError()">Toggle error</button>
</div>

 <div class="inventory-cell__element" id="multiselect-validation-example" style="max-width: 20em;">
    <label class="inventory-cell__label">Auswahl VU</label>
    <div class="tca-multiselect-wrapper">
    <div class="tca-multiselect-input" tabindex="0" id="multiselect-disabled-example" onclick="TogglePopup(1)">
      <span class="tca-multiselect-input__selected-items">
          <span class="tca-chip tca-chip--text-input-element">
             <span class="tca-chip__text-container">Generali Versicherung AG</span>
          </span>
          <span class="tca-chip tca-chip--text-input-element">
             <span class="tca-chip__text-container">+2</span>
          </span>
      </span>
    </div>
 <div class="tca-multiselect-popup" id="test-popup-1" style="position:absolute; display:none;">
   <div class="tca-multiselect-popup__top-area">
   </div>
   <div class="tca-list tca-list--dense tca-list--multiline" role="listbox" aria-hidden="true" aria-orientation="vertical">
     <span class="tca-list-item" role="checkbox">
        <div class="mdc-checkbox">
           <input type="checkbox" id="selection1" class="mdc-checkbox__native-control"/>
           <div class="mdc-checkbox__background">
              <svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24">
                 <path class="mdc-checkbox__checkmark-path" fill="none" stroke="white" d="M1.73,12.91 8.1,19.28 22.79,4.59"></path>
              </svg>
              <div class="mdc-checkbox__mixedmark"></div>
           </div>
        </div>
        <label class="inventory-cell__checkbox-label" for="selection1">Generali Versicherung AG</label>
     </span>
     <span class="tca-list-item" role="checkbox">
        <div class="mdc-checkbox">
           <input type="checkbox" id="selection2" class="mdc-checkbox__native-control"/>
           <div class="mdc-checkbox__background">
              <svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24">
                 <path class="mdc-checkbox__checkmark-path" fill="none" stroke="white" d="M1.73,12.91 8.1,19.28 22.79,4.59"></path>
              </svg>
              <div class="mdc-checkbox__mixedmark"></div>
           </div>
        </div>
        <label class="inventory-cell__checkbox-label" for="selection2">Wiener Städtische Versicherung AG</label>
     </span>
     <span class="tca-list-item" role="checkbox">
        <div class="mdc-checkbox">
           <input type="checkbox" id="selection3" class="mdc-checkbox__native-control"/>
           <div class="mdc-checkbox__background">
              <svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24">
                 <path class="mdc-checkbox__checkmark-path" fill="none" stroke="white" d="M1.73,12.91 8.1,19.28 22.79,4.59"></path>
              </svg>
              <div class="mdc-checkbox__mixedmark"></div>
           </div>
        </div>
        <label class="inventory-cell__checkbox-label" for="selection3">Donau Versicherung AG</label>
     </span>
     <span class="tca-list-item" role="checkbox">
        <div class="mdc-checkbox">
           <input type="checkbox" id="selection4" class="mdc-checkbox__native-control"/>
           <div class="mdc-checkbox__background">
              <svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24">
                 <path class="mdc-checkbox__checkmark-path" fill="none" stroke="white" d="M1.73,12.91 8.1,19.28 22.79,4.59"></path>
              </svg>
              <div class="mdc-checkbox__mixedmark"></div>
           </div>
        </div>
        <label class="inventory-cell__checkbox-label" for="selection4">UNIQA Österreich Versicherungen AG</label>
     </span>
   </div>
   <div class="tca-multiselect-popup__button-area">
       <button class="tca-button-outline">Schließen</button>
   </div>
  </div>
  </div>
 </div>

<script>

function ToggleDisabled() {
var x = document.getElementById('multiselect-disabled-example');
x.classList.toggle("tca-multiselect-input--disabled");}

function ToggleRequired() {
var x = document.getElementById('multiselect-validation-example');
x.classList.toggle("inventory-cell__element--required");}

function ToggleError() {
var x = document.getElementById('multiselect-validation-example');
x.classList.toggle("inventory-cell__element--error");}

function TogglePopup(id) {
var x = document.getElementById("test-popup-"+id);
if (window.getComputedStyle(x).display === "none") {
x.style.display = "flex";} else {
x.style.display = "none";}}

</script>

Multiselect advanced (search, select/de-select all buttons)

Generali Versicherung AG +2
<div class="inventory-cell__element" style="max-width: 20em;">
    <label class="inventory-cell__label">Auswahl VU</label>
    <div class="tca-multiselect-wrapper">
    <div class="tca-multiselect-input" tabindex="0">
      <span class="tca-multiselect-input__selected-items" onclick="TogglePopup(2)">
          <span class="tca-chip tca-chip--text-input-element">
             <span class="tca-chip__text-container">Generali Versicherung AG</span>
          </span>
          <span class="tca-chip tca-chip--text-input-element">
             <span class="tca-chip__text-container">+2</span>
          </span>
      </span>
    </div>
 <div class="tca-multiselect-popup" id="test-popup-2" style="position:absolute; display:none;">
   <div class="tca-multiselect-popup__top-area">
       <div class="search-container">
            <input type="search" placeholder="Durchsuchen.." id="searchinput" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false">
            <label class="search-container__search-icon" for="searchinput"></label>
            <div class="tca-spinner"></div>
       </div> 
   </div>
   <div class="tca-list tca-list--dense tca-list--multiline" role="listbox" aria-hidden="true" aria-orientation="vertical">
     <span class="tca-list-item" role="checkbox">
        <div class="mdc-checkbox">
           <input type="checkbox" id="selection1" class="mdc-checkbox__native-control"/>
           <div class="mdc-checkbox__background">
              <svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24">
                 <path class="mdc-checkbox__checkmark-path" fill="none" stroke="white" d="M1.73,12.91 8.1,19.28 22.79,4.59"></path>
              </svg>
              <div class="mdc-checkbox__mixedmark"></div>
           </div>
        </div>
        <label class="inventory-cell__checkbox-label" for="selection1">Generali Versicherung AG</label>
     </span>
     <span class="tca-list-item" role="checkbox">
        <div class="mdc-checkbox">
           <input type="checkbox" id="selection2" class="mdc-checkbox__native-control"/>
           <div class="mdc-checkbox__background">
              <svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24">
                 <path class="mdc-checkbox__checkmark-path" fill="none" stroke="white" d="M1.73,12.91 8.1,19.28 22.79,4.59"></path>
              </svg>
              <div class="mdc-checkbox__mixedmark"></div>
           </div>
        </div>
        <label class="inventory-cell__checkbox-label" for="selection2">Wiener Städtische Versicherung AG</label>
     </span>
     <span class="tca-list-item" role="checkbox">
        <div class="mdc-checkbox">
           <input type="checkbox" id="selection3" class="mdc-checkbox__native-control"/>
           <div class="mdc-checkbox__background">
              <svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24">
                 <path class="mdc-checkbox__checkmark-path" fill="none" stroke="white" d="M1.73,12.91 8.1,19.28 22.79,4.59"></path>
              </svg>
              <div class="mdc-checkbox__mixedmark"></div>
           </div>
        </div>
        <label class="inventory-cell__checkbox-label" for="selection3">Donau Versicherung AG</label>
     </span>
     <span class="tca-list-item" role="checkbox">
        <div class="mdc-checkbox">
           <input type="checkbox" id="selection4" class="mdc-checkbox__native-control"/>
           <div class="mdc-checkbox__background">
              <svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24">
                 <path class="mdc-checkbox__checkmark-path" fill="none" stroke="white" d="M1.73,12.91 8.1,19.28 22.79,4.59"></path>
              </svg>
              <div class="mdc-checkbox__mixedmark"></div>
           </div>
        </div>
        <label class="inventory-cell__checkbox-label" for="selection4">UNIQA Österreich Versicherungen AG</label>
     </span>
     <span class="tca-list-item" role="checkbox">
        <div class="mdc-checkbox">
           <input type="checkbox" id="selection5" class="mdc-checkbox__native-control"/>
           <div class="mdc-checkbox__background">
              <svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24">
                 <path class="mdc-checkbox__checkmark-path" fill="none" stroke="white" d="M1.73,12.91 8.1,19.28 22.79,4.59"></path>
              </svg>
              <div class="mdc-checkbox__mixedmark"></div>
           </div>
        </div>
        <label class="inventory-cell__checkbox-label" for="selection5">MuKi Vers.Verein auf Gegenseitigkeit</label>
     </span>
     <span class="tca-list-item" role="checkbox">
        <div class="mdc-checkbox">
           <input type="checkbox" id="selection6" class="mdc-checkbox__native-control"/>
           <div class="mdc-checkbox__background">
              <svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24">
                 <path class="mdc-checkbox__checkmark-path" fill="none" stroke="white" d="M1.73,12.91 8.1,19.28 22.79,4.59"></path>
              </svg>
              <div class="mdc-checkbox__mixedmark"></div>
           </div>
        </div>
        <label class="inventory-cell__checkbox-label" for="selection6">Grazer Wechselseitige Versicherung AG</label>
     </span>
     <span class="tca-list-item" role="checkbox">
        <div class="mdc-checkbox">
           <input type="checkbox" id="selection7" class="mdc-checkbox__native-control"/>
           <div class="mdc-checkbox__background">
              <svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24">
                 <path class="mdc-checkbox__checkmark-path" fill="none" stroke="white" d="M1.73,12.91 8.1,19.28 22.79,4.59"></path>
              </svg>
              <div class="mdc-checkbox__mixedmark"></div>
           </div>
        </div>
        <label class="inventory-cell__checkbox-label" for="selection7">Kärntner Landesversicherung a.G.</label>
     </span>
     <span class="tca-list-item" role="checkbox">
        <div class="mdc-checkbox">
           <input type="checkbox" id="selection8" class="mdc-checkbox__native-control"/>
           <div class="mdc-checkbox__background">
              <svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24">
                 <path class="mdc-checkbox__checkmark-path" fill="none" stroke="white" d="M1.73,12.91 8.1,19.28 22.79,4.59"></path>
              </svg>
              <div class="mdc-checkbox__mixedmark"></div>
           </div>
        </div>
        <label class="inventory-cell__checkbox-label" for="selection8">Merkur Versicherung AG</label>
     </span>
   </div>
   <div class="tca-multiselect-popup__button-area">
       <button class="tca-button-text"><i class="icon-option-yes tca-button__icon"></i>Alle</button>
       <button class="tca-button-text"><i class="icon-option-no tca-button__icon"></i>Keine</button>
       <button class="tca-button-outline">Schließen</button>
   </div>
  </div>
  </div>
 </div>

Checkbox

Checkboxes allow the user to declare choices between options Checkboxes can have the following states:

  • checked
  • unchecked
  • disabled
  • indeterminate
    • This is a state in which it's impossible to say whether the item is toggled on or off.
    • The usecase for this is when a checkbox is available that "owns" a number of sub-options (which are also checkboxes). If all of the sub-options are checked, the owning checkbox is also checked, and if they're all unchecked, the owning checkbox is unchecked. If any one or more of the sub-options have a different state than the others, the owning checkbox is in the indeterminate state.

Usage in Angular projects

If you are using checkboxes in an Angular project, there is an NPM package available that contains bindings and logic. This also allows you to use a simplified DOM structure.
@tis-cca/ui-angular
<div class="tca-button-group">
   <button class="tca-button" onclick="toggleindeterminate1()">Set checkbox indeterminate</button>
   <button class="tca-button" onclick="togglecheckboxdisabled()">Toggle disabled</button>
   <button class="tca-button" onclick="togglecheckboxrequired()">Toggle required</button>
   <button class="tca-button" onclick="togglecheckboxerror()">Toggle error</button>
</div>

<div class="inventory-cell__element" id="checkbox-inventory-cell__element">
   <div class="inventory-cell__element-group inventory-cell__element-group--without-label">
       <div class="mdc-checkbox" id="basic-mdc-checkbox">
           <input type="checkbox" id="native-html-checkbox" class="mdc-checkbox__native-control"/>
           <div class="mdc-checkbox__background">
               <svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24">
                   <path class="mdc-checkbox__checkmark-path" fill="none" stroke="white" d="M1.73,12.91 8.1,19.28 22.79,4.59"></path>
               </svg>
               <div class="mdc-checkbox__mixedmark"></div>
           </div>
       </div>
       <label class="inventory-cell__checkbox-label" for="native-html-checkbox">Checkbox-Label</label>
   </div>
</div>

<script type="text/javascript">
   function toggleindeterminate1() {
       var checkbox = document.getElementById("native-html-checkbox");
   checkbox.indeterminate = true;}
   function togglecheckboxdisabled() {
       var x = document.getElementById("basic-mdc-checkbox");
       x.classList.toggle("mdc-checkbox--disabled");
       var y = document.getElementById("native-html-checkbox");
       y.toggleAttribute("disabled");}
   function togglecheckboxrequired() {
       var x = document.getElementById("checkbox-inventory-cell__element");
       x.classList.toggle("inventory-cell__element--required");}
   function togglecheckboxerror() {
       var x = document.getElementById("checkbox-inventory-cell__element");
       x.classList.toggle("inventory-cell__element--error");}
</script>

Checkbox readonly

A checkbox-like element that is in a readonly state. Readonly checkboxes should be used if content should look like an input but use of a "real" input is not desireable or feasible. An alternative is simple setting the input in a "disabled" state.

<div class="mdc-layout-grid inventory-grid inventory-grid--readonly">
   <div class="mdc-layout-grid__inner inventory-grid__inner">
      <div class="inventory-cell mdc-layout-grid__cell mdc-layout-grid__cell--span-12-desktop mdc-layout-grid__cell--span-8-tablet">
         <div class="inventory-cell__element">
             <div class="inventory-cell__element-group inventory-cell__element-group--without-label">
                 <span class="inventory-cell__static-checkbox inventory-cell__static-checkbox--yes"></span>
                 <label class="inventory-cell__static-checkbox-label">Checkbox-Label Yes</label>
             </div>
         </div>
	</div>
   </div>
</div>

<div class="mdc-layout-grid inventory-grid inventory-grid--readonly">
   <div class="mdc-layout-grid__inner inventory-grid__inner">
      <div class="inventory-cell mdc-layout-grid__cell mdc-layout-grid__cell--span-12-desktop mdc-layout-grid__cell--span-8-tablet">
         <div class="inventory-cell__element">
             <div class="inventory-cell__element-group inventory-cell__element-group--without-label">
                 <span class="inventory-cell__static-checkbox inventory-cell__static-checkbox--no"></span>
                 <label class="inventory-cell__static-checkbox-label">Checkbox-Label No</label>
             </div>
         </div>
	</div>
   </div>
</div>

<div class="mdc-layout-grid inventory-grid inventory-grid--readonly">
   <div class="mdc-layout-grid__inner inventory-grid__inner">
      <div class="inventory-cell mdc-layout-grid__cell mdc-layout-grid__cell--span-12-desktop mdc-layout-grid__cell--span-8-tablet">
         <div class="inventory-cell__element">
             <div class="inventory-cell__element-group inventory-cell__element-group--without-label">
                 <span class="inventory-cell__static-checkbox inventory-cell__static-checkbox--undefined"></span>
                 <label class="inventory-cell__static-checkbox-label">Checkbox-Label Undefined/Indetermined</label>
             </div>
         </div>
	</div>
   </div>
</div>

Checkbox edit mit ui.checkbox.angularjs

<div class="mdc-layout-grid inventory-grid">
   <div class="mdc-layout-grid__inner inventory-grid__inner">
      <div class="inventory-cell mdc-layout-grid__cell mdc-layout-grid__cell--span-12-desktop mdc-layout-grid__cell--span-8-tablet">
          <div class="inventory-cell__element">
           <div class="inventory-cell__element-group inventory-cell__element-group--without-label">
              <ui-checkbox>
              </ui-checkbox>
              <label class="inventory-cell__checkbox-label" for="checkbox1">Checkbox edit label</label>
           </div>
        </div>
	</div>
   </div>
</div>

Checkbox with subtext

Lorem ipsum dolor sit amet

<div class="inventory-cell__element" id="checkbox-inventory-cell__element">
   <div class="inventory-cell__element-group inventory-cell__element-group--without-label">
       <div class="mdc-checkbox" id="basic-mdc-checkbox">
           <input type="checkbox" id="native-html-checkbox-1" class="mdc-checkbox__native-control"/>
           <div class="mdc-checkbox__background">
               <svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24">
                   <path class="mdc-checkbox__checkmark-path" fill="none" stroke="white" d="M1.73,12.91 8.1,19.28 22.79,4.59"></path>
               </svg>
               <div class="mdc-checkbox__mixedmark"></div>
           </div>
       </div>
       <label class="inventory-cell__checkbox-label inventory-cell__checkbox-label--bold" for="native-html-checkbox-1">Checkbox-Label</label>
   </div>
   <p class="inventory-cell__checkbox-subtext">Lorem ipsum dolor sit amet</p>
</div>

Textarea

textareas are multi-line plain-text editing controls, useful when you want to allow users to enter a sizeable amount of free-form text.

Textarea readonly

A textarea element that is in a readonly state. Readonly textareas should be used if content should look like an input but use of a "real" textarea is not desireable or feasible. An alternative is simple setting the input in a "disabled" state.

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
<div class="inventory-cell__element">
   <label class="inventory-cell__label">Textarea-Label</label>
   <span class="inventory-cell__static inventory-cell__static-textbox">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</span>
</div>

Textarea - edit

Textareas can have the following states:

  • required - use inventory-cell__element--required on the wrapping inventory-cell__element.
  • error - use inventory-cell__element--error on the wrapping inventory-cell__element.
  • disabled - use the html disabled="" attribute.
  • readonly - use the html readonly attribute. The textarea can then sill receive focus.
<div class="inventory-cell__element">
   <label class="inventory-cell__label">Textarea-Label</label>
   <textarea class="inventory-cell__textarea"></textarea>
</div>

Textarea - disabled state

<div class="inventory-cell__element">
   <label class="inventory-cell__label">Textarea-Label</label>
   <textarea class="inventory-cell__textarea" disabled=""></textarea>
</div>

Textarea - readonly

<div class="inventory-cell__element">
   <label class="inventory-cell__label">Textarea-Label</label>
   <textarea class="inventory-cell__textarea" readonly></textarea>
</div>

Combobox

A combobox allows the user to type in data freely as well as choose a value from pre-populated data.

  • Comboboxes are distributed in the npm install @tis-cca/combobox package

Combobox - edit

Comboboxes can be used just like text-inputs and support the same states:

  • Required
  • Error
  • Disabled
Suggestions should be shown:
  • search-fields: after 3 characters have been typed in by the user
  • general suggestions like tagging: immediately
Combobox suggestion-item #1
Combobox suggestion-item #1
<div class="inventory-cell__element">
   <label class="inventory-cell__label">Combobox-Label</label>
   <div class="tca-combobox">
       <input class="inventory-cell__input" value="content typed in by the user">
       <div class="tca-combobox__popup" style="position: absolute; z-index: 10;">
          <div class="tca-combobox__popup-item">Combobox suggestion-item #1</div>
          <div class="tca-combobox__popup-item">Combobox suggestion-item #1</div>
       </div>
   </div>
</div>

Radiobuttons

Characteristics of Radiobuttons:

  • Radiobuttons are distributed as part of the npm install @tis-cca/radiobuttons package
  • Radio buttons are designed for selecting one value out of a set, whereas checkboxes let you turn individual values on and off. Where multiple controls exist, radio buttons allow one to be selected out of them all, whereas checkboxes allow multiple values to be selected.

Radiobuttons default

<div class="tca-radio-group">
   <span class="tca-radio">
      <input type="radio" class="tca-radio__button" id="radio-group-default-button-1" name="radio-group-default"/>
      <label class="tca-radio__label" for="radio-group-default-button-1">Label Radio 1</label>
   </span>

   <span class="tca-radio">
      <input type="radio" class="tca-radio__button" id="radio-group-default-button-2" name="radio-group-default"/>
      <label class="tca-radio__label" for="radio-group-default-button-2">Label Radio 2</label>
   </span>

   <span class="tca-radio tca-radio--disabled">
      <input type="radio" class="tca-radio__button" id="radio-group-default-button-3" name="radio-group-default" disabled/>
      <label class="tca-radio__label" for="radio-group-default-button-3">Label Radio 3 (disabled)</label>
   </span>
</div>

Radiobuttons horizontal alignment

  • To align the radiobuttons in a horizontal direction, use the tca-radio-group--horizontal modifier on the tca-radio-group element.
<div class="tca-radio-group tca-radio-group--horizontal">
   <span class="tca-radio">
      <input type="radio" class="tca-radio__button" id="radio-group-horizontal-button-1" name="radio-group-horizontal"/>
      <label class="tca-radio__label" for="radio-group-horizontal-button-1">Label Radio 1</label>
   </span>

   <span class="tca-radio">
      <input type="radio" class="tca-radio__button" id="radio-group-horizontal-button-2" name="radio-group-horizontal"/>
      <label class="tca-radio__label" for="radio-group-horizontal-button-2">Label Radio 2</label>
   </span>

   <span class="tca-radio tca-radio--disabled">
      <input type="radio" class="tca-radio__button" id="radio-group-horizontal-button-3" name="radio-group-horizontal" disabled/>
      <label class="tca-radio__label" for="radio-group-horizontal-button-3">Label Radio 3 (disabled)</label>
   </span>

   <span class="tca-radio">
      <input type="radio" class="tca-radio__button" id="radio-group-horizontal-button-4" name="radio-group-horizontal"/>
      <label class="tca-radio__label" for="radio-group-horizontal-button-4">Label Radio 4</label>
   </span>

   <span class="tca-radio">
      <input type="radio" class="tca-radio__button" id="radio-group-horizontal-button-5" name="radio-group-horizontal"/>
      <label class="tca-radio__label" for="radio-group-horizontal-button-5">Label Radio 5</label>
   </span>

   <span class="tca-radio">
      <input type="radio" class="tca-radio__button" id="radio-group-horizontal-button-6" name="radio-group-horizontal"/>
      <label class="tca-radio__label" for="radio-group-horizontal-button-6">Label Radio 6</label>
   </span>
</div>

Toggles

Standard Toggle

  • Ein einfacher Toggle Schalter. Er wird dann eingesetzt, wenn Nutzer eine Funktion aktivieren oder deaktivieren können.
  • Im Unterschied zu Radiobuttons gibt es also keine Auswahl zwischen zwei Optionen, es verändert sich lediglich der Status einer Option (An/Aus)
  • Ein Toggle besitzt immer auch ein Label welches die Option beschreibt dessen Status sich verändern soll
  • Hat das Deaktiviert sein der Option negative Auswirkungen (z.B.: Login mit Passwort: Ja/Nein), soll auf das Label der Modifier --warning angewandt werden.
<div style="margin:1em;display:flex; align-items:center;">
   <input class="toggle" id="toggle1" type="checkbox"/>
   <label class="toggle__switch" for="toggle1"></label>
   <label for="toggle1">Toggle default</label>
</div>
<div style="margin:1em;display:flex; align-items:center;">
   <input class="toggle" id="toggle2" type="checkbox"/>
   <label class="toggle__switch--warning" for="toggle2"></label>
   <label class="toggle__label" for="toggle2">Toggle that has negative consequences when unchecked</label>
</div>
<div style="margin:1em;display:flex; align-items:center;">
   <input class="toggle" id="toggle3" type="checkbox"/>
   <label class="toggle__switch--primary" for="toggle3"></label>
   <label class="toggle__label" for="toggle3">Toggle in theme branding colors</label>
</div>
<div style="margin:1em;display:flex; align-items:center;">
   <input class="toggle" id="toggle4" type="checkbox" disabled/>
   <label class="toggle__switch--disabled" for="toggle4"></label>
   <label class="toggle__label" for="toggle4">Toggle disabled</label>
</div>

<div style="margin:1em;display:flex; align-items:center;">
   <input class="toggle" id="toggle5" type="checkbox" disabled checked/>
   <label class="toggle__switch--disabled" for="toggle5"></label>
   <label class="toggle__label" for="toggle4"> Toggle that is checked and cant be unchecked (required)</label>
</div>

Buttons

npm install @tis-cca/buttons

Button für Schlüsselinteraktionen

  • Dieser Button ist für wesentliche Interaktionen des Nutzers gedacht.
  • Die Farbe des Buttons entspricht der im @tis-cca/theme Modul definierten primary-color d.H. orange für TIS und blau für CCA
  • Die Breite des Buttons richtet sich nach dem Inhalt (Textlänge)
  • Buttons können auch Icons enthalten siehe Abschnitt Buttons mit Icons
<button class="tca-button">Default button</button>

Modifier for the default button

  • All button variants can be modified by using modifier classes or attributes. This should be done, to give users an early hint what type of actions follows clicking the button.
  • This follows the scheme: .{button-basis-class} + .{button-modifier-class}
  • The .tca-button--disabled modifier can be used togehter with each other modifier.
  • Alternatively, the [disabled] attribute can be used if usage of a class is not desired/possible.
Modifier Description Examples
.tca-button--danger Should be used, when clicking the button has severe, maybe unwanted/unexpected consequences. Deleting content/files; Dismissing a call; Canceling of an update
.tca-button--create Signals the user, that something will be created. Creating new content/files
.tca-button--disabled Shows the user that the button can't be interacted with. User has not yet filled out all required fields in a form; All filters have been removed.
[disabled] Shows the user that the button can't be interacted with. Can be used as an alternativ to the class method mentioned above. User has not yet filled out all required fields in a form; All filters have been removed.
<button class="tca-button tca-button--danger">Button danger</button>
<button class="tca-button tca-button--create">Button create</button>
<button class="tca-button tca-button--disabled">Button disabled class</button>
<button class="tca-button" disabled>Button disabled attribute</button>
<button class="tca-button-outline" disabled>Button Outline disabled attribute</button>
<button class="tca-button-text" disabled>Button Text disabled attribute</button>
<button class="tca-button tca-button--danger tca-button--disabled">Button danger + disabled</button>
<button class="tca-button tca-button--danger" disabled>Button danger + disabled attribute</button>

Button Group

General

  • Multiple buttons should be wrapped in a tca-button-group element
  • Attention On mobile devices, all buttons within a group will grow to 100% of the width of the button-goup.

Modifiers

<button class="tca-button-outline" onclick="ToggleButtonGroupDialogActions()">Dialog Actions Modifier</button>

<div class="tca-button-group" id="button-group-demo">
   <button class="tca-button">Button in Group #1</button>
   <button class="tca-button">Button with longer text in Group #2</button>
   <button class="tca-button">Button #3</button>
   <button class="tca-button">Button in Group #4</button>
   <button class="tca-button">Button in Group #5</button>
   <button class="tca-button">Button with longer text in Group #6</button>
</div>

<script>
function ToggleButtonGroupDialogActions() {
var x = document.getElementById('button-group-demo');
x.classList.toggle("tca-button-group--dialog-actions");}
</script>

Example: Buttons in a guided process

The button that allows the user to advance in the guide process should be on the outer right (or last on mobile devices).

Example: Decision where the user's attention should be directed towards one of the options.

Welches Paket möchten Sie buchen?

Example: Choice between multiple equally weighted options.

Wann soll der Termin stattfinden?

Button für weniger wichtige Aktionen

Dieser Button ist für weniger wichtige Interaktionen des Nutzers gedacht.

<div class="tca-button-group">
   <button class="tca-button-outline">Button outline default</button>
   <button class="tca-button-outline tca-button--danger">Button outline danger</button>
   <button class="tca-button-outline tca-button--create">Button outline create</button>
   <button class="tca-button-outline tca-button--disabled">Button outline error</button>
   <button class="tca-button-outline tca-button--danger tca-button--disabled">Button outline danger + disabled</button>
   <button class="tca-button-outline tca-button-outline--nocolor">Button outline nocolor</button>
</div>

Textbutton

<div class="tca-button-group">
   <button class="tca-button-text">Textbutton primary</button>
   <button class="tca-button-text tca-button--danger">Textbutton secondary</button>
   <button class="tca-button-text tca-button--create">Textbutton create</button>
   <button class="tca-button-text tca-button--disabled">Textbutton disabled</button>
   <button class="tca-button-text tca-button-text--nocolor">Textbutton nocolor</button>
</div>

Textbutton mit Icons

<div class="tca-button-group">
   <button class="tca-button-text"><i class="icon-erstellen tca-button__icon"></i>Hinzufügen</button>
   <button class="tca-button-text tca-button--danger"><i class="icon-loeschen tca-button__icon"></i>Löschen</button>
   <button class="tca-button-text tca-button--disabled"><i class="icon-erstellen tca-button__icon button__icon--right"></i>Button + icon--right modifier</button>
</div>

Button die über anderen Elementen schweben

<div class="tca-button-group">
   <button class="tca-button tca-button--floating">Default button floating</button>
   <button class="tca-button tca-button--floating tca-button--create">Button create floating</button>
   <button class="tca-button tca-button--floating tca-button--danger">Button danger floating</button>
   <button class="tca-button tca-button--floating tca-button--disabled">Button disabled floating</button>
</div>

Full Width Button

Buttons that should use the full width of its container, should use the modifier class tca-button--full-width.

<div class="tca-button-group">
   <button class="tca-button tca-button--full-width">Button full width</button>
   <button class="tca-button-outline tca-button--full-width">Button outline full width</button>
   <button class="tca-button-text tca-button--full-width">Button text full width</button>
</div>

Button mit Icon nach dem Text

Dieser Button ist für wesentliche Interaktionen des Nutzers gedacht.

<div class="tca-button-group">
    <button class="tca-button">Weiter<i class="icon-arrow-right tca-button__icon tca-button__icon--right"></i></button>
    <button class="tca-button tca-button--disabled">Weiter<i class="icon-arrow-right tca-button__icon tca-button__icon--right"></i></button>
    <button class="tca-button tca-button--danger">Weiter<i class="icon-arrow-right tca-button__icon tca-button__icon--right"></i></button>
</div>

Button mit Icon vor dem Text

Dieser Button ist für wesentliche Interaktionen des Nutzers gedacht.

<div class="tca-button-group">
   <button class="tca-button"><i class="icon-antragVpp tca-button__icon"></i>Gefällt mir</button>
   <button class="tca-button tca-button--disabled"><i class="icon-antragVpp tca-button__icon"></i>Gefällt mir</button>
   <button class="tca-button tca-button--danger"><i class="icon-antragVpp tca-button__icon"></i>Gefällt mir</button>
</div>

Button that shows progress

General

Use a these buttons as soon as you can reasonably expect the action that the button triggers takes longer than 3 seconds and you don't display any other progress indicators (progress-bar, spinner with text etc.) to the user.

Usage in default buttons

  • Add the tca-button--spinner modifier to the button element.
  • Add a tca-spinner child element of the button.
  • Add the tca-button--spinner-in-progress modifier to the button element to display the spinner in progress.

Usage in buttons that contain icons

  • Add the tca-button--spinner modifier to the button element.
  • Add the markup of the icon like you would do with a regular button that contains an icon.
  • Add the tca-button--spinner-in-progress modifier to the button element to display the spinner in progress.
  • Replace the icon (e.g. icon-arrow) with the tca-spinner.
<div class="tca-button-group">
    <button class="tca-button tca-button--spinner" onclick="ToggleButtonInProgressWithoutIcon()" id="button-in-progress-demo-without-icon-1">Speichern
         <i class="tca-spinner"></i>
    </button>
    <button class="tca-button-outline tca-button--spinner tca-button--spinner-left" onclick="ToggleButtonInProgressWithIconLeft()" id="button-in-progress-demo-with-icon-left-1">Zurück
         <i class="icon-arrow-left tca-button__icon tca-button__icon--left" id="button-in-progress-demo-with-icon-left-2"></i>
    </button>
    <button class="tca-button tca-button--spinner" onclick="ToggleButtonInProgressWithIcon()" id="button-in-progress-demo-with-icon-1">Weiter
         <i class="icon-arrow-right tca-button__icon tca-button__icon--right" id="button-in-progress-demo-with-icon-2"></i>
    </button>
</div>

<script>

function ToggleButtonInProgressWithoutIcon() {
 var x = document.getElementById('button-in-progress-demo-without-icon-1');
 x.classList.toggle("tca-button--spinner-in-progress");
}

function ToggleButtonInProgressWithIconLeft() {
 var x = document.getElementById('button-in-progress-demo-with-icon-left-1');
 x.classList.toggle("tca-button--spinner-in-progress");
 var y = document.getElementById('button-in-progress-demo-with-icon-left-2');
 y.classList.toggle("tca-spinner");
 y.classList.toggle("icon-arrow-left");
}

function ToggleButtonInProgressWithIcon() {
 var x = document.getElementById('button-in-progress-demo-with-icon-1');
 x.classList.toggle("tca-button--spinner-in-progress");
 var y = document.getElementById('button-in-progress-demo-with-icon-2');
 y.classList.toggle("tca-spinner");
 y.classList.toggle("icon-arrow-right");
}

</script>

Floating Action Buttons (fab)

npm install @tis-cca/floating-action-buttons

Floating action buttons in forms

General

Use a floating action buttons (fabs) in forms when the form itself is larger than a typical users viewport to always display the most important form actions (e.g. saving, cancelling a form).

Usage

  • Attention Make sure to include some padding/margin at the bottom of your form if you use floating action buttons. This is to ensure, that users can always edit the form fields. Without this, you risk that form fields get overlapped by the fabs.
  • Recommendation Do not use more than 3 fabs next to each other. If you have a form that has more actions than 3, determine the 2 most important ones and put the rest in an overflow-menu.
  • If the default horizontal layout is not desired, you can use the tca-fab-wrapper--align-vertically modifier to align the fabs vertically.
  • Use tca-fab-button--in-progress modifier to show a spinner inside the button
<button class="tca-button" onclick="ToggleFabVisibility()">Show Fab Buttons</button>
<button class="tca-button" onclick="ToggleAlignment()">Toggle Alignment</button>
<button class="tca-button" onclick="inProgress()">Button in Progress</button>

<div class="tca-fab-wrapper" id="fab-demo-1" role="group" aria-label="Floating action buttons" style="display: none;">
  <button class="tca-fab-button tca-fab-button--small" title="Abbrechen" onclick="ToggleFabVisibility()">
    <span class="icon-cancel"></span>
  </button>
  <button class="tca-fab-button" title="Speichern (STRG+S)" id="savebutton">
    <div class="tca-spinner tca-spinner--in-progress"></div>
    <span class="icon-save"></span>
  </button>
</div>

<script>
function ToggleFabVisibility() {
 var togglefab = document.getElementById('fab-demo-1');
 togglefab.style.display = togglefab.style.display == "flex" ? "none": "flex";
}

function ToggleAlignment() {
 var togglealignment = document.getElementById('fab-demo-1');
 togglealignment.classList.toggle("tca-fab-wrapper--align-vertically");
}
function inProgress() {
 var toggleinprogress = document.getElementById('savebutton');
 toggleinprogress.classList.toggle("tca-fab-button--in-progress");
}
</script>

File upload

Drag and Dop Area

npm install @tis-cca/upload

  • Use the tca-multi-upload-drop-area--required modifier to display the drag and drop area as required.
  • Use the tca-multi-upload-drop-area--error modifier, if the users submits the form, without andy document chosen.
  • Use the tca-multi-upload--in-progress modifier, to show a spinner, while the file is uploading.
<div class="tca-multi-upload">
   <label class="tca-multi-upload-drop-area" for="file-upload-button_example1">
       <div class="tca-spinner tca-spinner--in-progress"></div>
       <span class="tca-multi-upload-drop-area__target-icon"></span>
       <span class="tca-multi-upload-drop-area__target-title">Dateien wählen oder hierher ziehen.</span>
   </label>
   <input type="file" id="file-upload-button_example1" multiple hidden />
</div>

<div class="tca-multi-upload">
   <label class="tca-multi-upload-drop-area tca-multi-upload-drop-area--required" for="file-upload-button_example2">
       <div class="tca-spinner tca-spinner--in-progress"></div>
       <span class="tca-multi-upload-drop-area__target-icon"></span>
       <span class="tca-multi-upload-drop-area__target-title">Dateien wählen oder hierher ziehen.</span>
   </label>
   <input type="file" id="file-upload-button_example2" multiple hidden />
</div>

<div class="tca-multi-upload">
   <label class="tca-multi-upload-drop-area tca-multi-upload-drop-area--error" for="file-upload-button_example3">
       <div class="tca-spinner tca-spinner--in-progress"></div>
       <span class="tca-multi-upload-drop-area__target-icon"></span>
       <span class="tca-multi-upload-drop-area__target-title">Dateien wählen oder hierher ziehen.</span>
   </label>
   <input type="file" id="file-upload-button_example3" multiple hidden />
</div>

Upload in Progress

<div class="tca-multi-upload tca-multi-upload--in-progress">
   <label class="tca-multi-upload-drop-area" for="file-upload-button_spinnerexample">
       <div class="tca-spinner tca-spinner--in-progress"></div>
       <span class="tca-multi-upload-drop-area__target-icon"></span>
       <span class="tca-multi-upload-drop-area__target-title">Dateien wählen oder hierher ziehen.</span>
   </label>
   <input type="file" id="file-upload-button_spinnerexample" multiple hidden disabled />
</div>

The file display area

  • Use the div with the class tca-multi-upload-file__button-wrapper for wrapping actionbuttons to a file
  • You can use input or drop down below the file, using the inventory-cell__element
  • If the file is not am image, use the modifier tca-multi-upload-file__preview--xls for xls, tca-multi-upload-file__preview--pdf for pdf or tca-multi-upload-file__preview--word for word
  • If the file is not a pdf, word or xls then use the modifier tca-multi-upload-file__preview--default
<div class="tca-multi-upload">
   <div class="tca-multi-upload-file-area">
     <div class="tca-multi-upload-file">
         <div class="tca-multi-upload-file__preview-wrapper">
             <div class="tca-multi-upload-file__preview">
                 <img class="tca-multi-upload-file__preview-img" src="https://source.unsplash.com/collection/862387/300x169" loading="lazy">
             </div>
             <div class="tca-multi-upload-file__button-wrapper">
                 <button class="tca-multi-upload-file__actionbutton icon-delete" tabindex="-1">
                 <button class="tca-multi-upload-file__actionbutton icon-details" tabindex="-1">
             </div>
         </div>
         <div class="inventory-cell__element inventory-cell__element--required">
             <label class="inventory-cell__label">Titel</label>
             <input class="inventory-cell__input">
         </div>
     </div>
     <div class="tca-multi-upload-file">
         <div class="tca-multi-upload-file__preview-wrapper">
             <div class="tca-multi-upload-file__preview">
                 <img class="tca-multi-upload-file__preview-img" src="https://source.unsplash.com/collection/862387/226x300" loading="lazy">
             </div>
         </div>
          <div class="inventory-cell__element inventory-cell__element--required inventory-cell__element--error">
             <label class="inventory-cell__label">Titel</label>
             <select class="inventory-cell__select"><option value="1">Select Option 1</option><option value="2">Select Option 2</option></select>
          </div>
      </div>
      <div class="tca-multi-upload-file">
          <div class="tca-multi-upload-file__preview-wrapper">
             <div class="tca-multi-upload-file__preview">
                 <img class="tca-multi-upload-file__preview-img" src="https://source.unsplash.com/collection/862388/300x169" loading="lazy">
             </div>
          </div>
          <div class="inventory-cell__element">
            <label class="inventory-cell__label">Titel</label>
            <div class="tca-combobox">
              <input class="inventory-cell__select">
           </div>
          </div>
      </div>
     <div class="tca-multi-upload-file">
         <div class="tca-multi-upload-file__preview-wrapper">
             <div class="tca-multi-upload-file__preview">
                 <img class="tca-multi-upload-file__preview-img" src="https://source.unsplash.com/collection/519119/226x300" loading="lazy">
             </div>
         </div>
     </div>
     <div class="tca-multi-upload-file">
         <div class="tca-multi-upload-file__preview-wrapper">
             <div class="tca-multi-upload-file__preview tca-multi-upload-file__preview--xls"></div>
         </div>
     </div>
    <div class="tca-multi-upload-file">
         <div class="tca-multi-upload-file__preview-wrapper">
             <div class="tca-multi-upload-file__preview tca-multi-upload-file__preview--pdf"></div>
         </div>
     </div>
    <div class="tca-multi-upload-file">
         <div class="tca-multi-upload-file__preview-wrapper">
             <div class="tca-multi-upload-file__preview tca-multi-upload-file__preview--word"></div>
         </div>
     </div>
    <div class="tca-multi-upload-file">
         <div class="tca-multi-upload-file__preview-wrapper">
             <div class="tca-multi-upload-file__preview tca-multi-upload-file__preview--default"></div>
         </div>
     </div>
   </div>
</div>

Error case

If a document is not allowed or an error occurs while uploading

<div class="tca-multi-upload">
    <label class="tca-multi-upload-drop-area" for="file-upload-button_example4">
         <div class="tca-spinner tca-spinner--in-progress"></div>
         <span class="tca-multi-upload-drop-area__target-icon"></span>
         <span class="tca-multi-upload-drop-area__target-title">Dateien wählen oder hierher ziehen.</span>
   </label>
   <input type="file" id="file-upload-button_example4" multiple hidden />
   <div class="tca-alert-container">
         <div class="tca-alert tca-alert--error" role="alert">
             <i class="tca-alert__icon"></i>
             <span class="tca-alert__text">Diese Datei ist leider nicht erlaubt.</span>
          </div>
   </div>
   <div class="tca-multi-upload-file-area">
     <div class="tca-multi-upload-file">
         <div class="tca-multi-upload-file__preview-wrapper">
             <div class="tca-multi-upload-file__preview">
                 <img class="tca-multi-upload-file__preview-img" src="https://source.unsplash.com/collection/862387/300x169" loading="lazy">
             </div>
             <div class="tca-multi-upload-file__button-wrapper">
                 <button class="tca-multi-upload-file__actionbutton icon-delete" tabindex="-1">
                 <button class="tca-multi-upload-file__actionbutton icon-details" tabindex="-1">
             </div>
         </div>
         <div class="inventory-cell__element inventory-cell__element--required">
             <label class="inventory-cell__label">Titel</label>
             <input class="inventory-cell__input">
         </div>
     </div>
     <div class="tca-multi-upload-file">
       <div class="tca-multi-upload-file__preview-wrapper">
             <div class="tca-multi-upload-file__preview tca-multi-upload-file__preview--xls"></div>
             <div class="tca-multi-upload-file__button-wrapper">
                 <button class="tca-multi-upload-file__actionbutton icon-delete" tabindex="-1">
             </div>
         </div>
         <div class="inventory-cell__element inventory-cell__element--required">
             <label class="inventory-cell__label">Titel</label>
             <input class="inventory-cell__input">
         </div>
     </div>
     <div class="tca-multi-upload-file">
       <div class="tca-multi-upload-file__preview-wrapper">
             <div class="tca-multi-upload-file__preview tca-multi-upload-file__preview--pdf"></div>
             <div class="tca-multi-upload-file__button-wrapper">
                 <button class="tca-multi-upload-file__actionbutton icon-delete" tabindex="-1">
             </div>
         </div>
         <div class="inventory-cell__element inventory-cell__element--required">
             <label class="inventory-cell__label">Titel</label>
             <input class="inventory-cell__input">
         </div>
     </div>
   </div>
</div>

All together Example

<div class="tca-multi-upload">
    <label class="tca-multi-upload-drop-area" for="file-upload-button_example5">
         <div class="tca-spinner tca-spinner--in-progress"></div>
         <span class="tca-multi-upload-drop-area__target-icon"></span>
         <span class="tca-multi-upload-drop-area__target-title">Dateien wählen oder hierher ziehen.</span>
   </label>
   <input type="file" id="file-upload-button_example5" multiple hidden />
   <div class="tca-multi-upload-file-area">
     <div class="tca-multi-upload-file">
         <div class="tca-multi-upload-file__preview-wrapper">
             <div class="tca-multi-upload-file__preview tca-multi-upload-file__preview--image" onclick="OpenGallery()">
                 <img class="tca-multi-upload-file__preview-img" src="https://source.unsplash.com/collection/862387/300x169" loading="lazy">
             </div>
             <div class="tca-multi-upload-file__button-wrapper">
                 <button class="tca-multi-upload-file__actionbutton icon-delete" tabindex="-1">
                 <button class="tca-multi-upload-file__actionbutton icon-details" tabindex="-1" onclick="OpenGallery()">
             </div>
         </div>
         <div class="inventory-cell__element inventory-cell__element--required">
             <label class="inventory-cell__label">Titel</label>
             <input class="inventory-cell__input">
         </div>
     </div>
     <div class="tca-multi-upload-file">
       <div class="tca-multi-upload-file__preview-wrapper">
             <div class="tca-multi-upload-file__preview tca-multi-upload-file__preview--xls"></div>
             <div class="tca-multi-upload-file__button-wrapper">
                 <button class="tca-multi-upload-file__actionbutton icon-delete" tabindex="-1">
             </div>
         </div>
         <div class="inventory-cell__element inventory-cell__element--required">
             <label class="inventory-cell__label">Titel</label>
             <input class="inventory-cell__input">
         </div>
     </div>
     <div class="tca-multi-upload-file">
       <div class="tca-multi-upload-file__preview-wrapper">
             <div class="tca-multi-upload-file__preview tca-multi-upload-file__preview--pdf"></div>
             <div class="tca-multi-upload-file__button-wrapper">
                 <button class="tca-multi-upload-file__actionbutton icon-delete" tabindex="-1">
             </div>
         </div>
         <div class="inventory-cell__element inventory-cell__element--required">
             <label class="inventory-cell__label">Titel</label>
             <input class="inventory-cell__input">
         </div>
     </div>
   </div>
</div>

<div class="tca-gallery" style="display: none;" id="gallery-demo-1">
  <div class="tca-gallery__backdrop"></div>
  <button class="tca-gallery__closebutton" onclick="CloseGallery()">
     <span class="icon-close"></span>
  </button>
  <div class="tca-gallery__display">
    <button class="tca-gallery__prevbutton">
        <span class="icon-left"></span>
    </button>
    <img src="https://source.unsplash.com/collection/862387/1920x1080">
    <button class="tca-gallery__nextbutton">
        <span class="icon-right"></span>
    </button>
  </div>
</div>

<script>
function OpenGallery() {
var x = document.getElementById('gallery-demo-1');
x.style.display = x.style.display == "block" ? "none": "block";}
function CloseGallery() {
var x = document.getElementById('gallery-demo-1');
x.style.display = x.style.display == "none" ? "block": "none";}
</script>

Picker

A picker is used to allow the user to pick a single item from a list of identifiers.

  • Pickers are distributed in the npm install @tis-cca/picker package

Betreuer picker

Max Mustermann
Filiale Wien Liesing
<div class="mdc-layout-grid inventory-grid" style="margin-bottom: 45vh;">
    <div class="mdc-layout-grid__inner inventory-grid__inner">
        <div
            class="inventory-cell mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-6-tablet">
            <div class="inventory-cell__element inventory-cell__element--required">
                <label class="inventory-cell__label">Betreuer Identifier</label>
                <div class="inventory-cell__identifier inventory-cell__identifier--edit" onclick="tcaPickerOpen()">
                   <betreuer-picker>
                       <span class="summary-identifier summary-identifier--betreuer">
                           <span class="summary-identifier__graphic-wrapper">
                               <i class="summary-identifier__graphic-area-icon"></i>
                           </span>
                           <span class="summary-identifier__textblock">
                               <div class="summary-identifier__textblock-title">
                                   <span class="summary-identifier__textblock-subtitle--bold" id="betreuer-identifier__name">Max Mustermann</span>
                               </div>
                               <div class="summary-identifier__textblock-subtitle" id="betreuer-identifier__filiale">Filiale Wien Liesing</div>
                           </span>
                       </span>
                   </betreuer-picker>
                   <button class="tca-picker-open-button"></button>
                </div>
                <div class="tca-picker-anchor">
                    <div class="tca-picker" id="tca-picker1" style="display: none;">
                        <div class="tca-picker__search-area">
                            <input class="tca-picker__search-input"
                                placeholder="Name, PLZ oder Personalnummer" autocomplete="off" autocorrect="off">
                            <span class="tca-chip-toggle">
                               <input type="checkbox" class="tca-chip-toggle__input" id="picker-prefilter-subsidiary" checked>
                               <label for="picker-prefilter-subsidiary" class="tca-chip-toggle__container">
                                   <i class="tca-chip-toggle__icon tca-chip-toggle__icon--checkmark"></i>
                                   <span class="tca-chip-toggle__text">Filiale: eigene</span>
                               </label>
                            </span>
                            <span class="tca-chip-toggle">
                               <input type="checkbox" class="tca-chip-toggle__input" id="picker-prefilter-active-contracts" checked>
                               <label for="picker-prefilter-active-contracts" class="tca-chip-toggle__container">
                                   <i class="tca-chip-toggle__icon tca-chip-toggle__icon--checkmark"></i>
                                   <span class="tca-chip-toggle__text">Verträge: aktive</span>
                               </label>
                            </span>
                        </div>
                        <div class="tca-picker__list">
                            <div class="identifier-list identifier-list--scrollbar-visible">
                                <span
                                    class="summary-identifier summary-identifier--selectable summary-identifier--betreuer">
                                    <span class="summary-identifier__graphic-wrapper">
                                        <i class="summary-identifier__graphic-area-icon"></i>
                                    </span>
                                    <span class="summary-identifier__textblock">
                                        <div class="summary-identifier__textblock-title">
                                            <span class="summary-identifier__textblock-subtitle--bold"
                                                id="betreuer-identifier__name">Herr Max Supermitarbeiter</span>
                                        </div>
                                        <div class="summary-identifier__textblock-subtitle"
                                            id="betreuer-identifier__filiale">Filiale Wien 22</div>
                                    </span>
                                </span>
                                <span
                                    class="summary-identifier summary-identifier--selectable summary-identifier--betreuer">
                                    <span class="summary-identifier__graphic-wrapper">
                                        <i class="summary-identifier__graphic-area-icon"></i>
                                    </span>
                                    <span class="summary-identifier__textblock">
                                        <div class="summary-identifier__textblock-title">
                                            <span class="summary-identifier__textblock-subtitle--bold"
                                                id="betreuer-identifier__name">Frau Maxina Musterbetreuerin</span>
                                        </div>
                                        <div class="summary-identifier__textblock-subtitle"
                                            id="betreuer-identifier__filiale">Filiale Lunz am See</div>
                                    </span>
                                </span>
                                <span
                                    class="summary-identifier summary-identifier--selectable summary-identifier--betreuer">
                                    <span class="summary-identifier__graphic-wrapper">
                                        <i class="summary-identifier__graphic-area-icon"></i>
                                    </span>
                                    <span class="summary-identifier__textblock">
                                        <div class="summary-identifier__textblock-title">
                                            <span class="summary-identifier__textblock-subtitle--bold"
                                                id="betreuer-identifier__name">Herr Maier Hans</span>
                                        </div>
                                        <div class="summary-identifier__textblock-subtitle"
                                            id="betreuer-identifier__filiale">Filiale Wien 22</div>
                                    </span>
                                </span>
                                <span
                                    class="summary-identifier summary-identifier--selectable summary-identifier--betreuer">
                                    <span class="summary-identifier__graphic-wrapper">
                                        <i class="summary-identifier__graphic-area-icon"></i>
                                    </span>
                                    <span class="summary-identifier__textblock">
                                        <div class="summary-identifier__textblock-title">
                                            <span class="summary-identifier__textblock-subtitle--bold"
                                                id="betreuer-identifier__name">Frau Hueber Marion</span>
                                        </div>
                                        <div class="summary-identifier__textblock-subtitle"
                                            id="betreuer-identifier__filiale">Filiale Wien 12</div>
                                    </span>
                                </span>
                                <span
                                    class="summary-identifier summary-identifier--selectable summary-identifier--betreuer">
                                    <span class="summary-identifier__graphic-wrapper">
                                        <i class="summary-identifier__graphic-area-icon"></i>
                                    </span>
                                    <span class="summary-identifier__textblock">
                                        <div class="summary-identifier__textblock-title">
                                            <span class="summary-identifier__textblock-subtitle--bold"
                                                id="betreuer-identifier__name">Frau Fuerst Elisabeth</span>
                                        </div>
                                        <div class="summary-identifier__textblock-subtitle"
                                            id="betreuer-identifier__filiale">Filiale Wien 15</div>
                                    </span>
                                </span>
                            </div>
                        </div>
                        <div class="tca-picker__button-area">
                            <button class="tca-button-text"><i class="icon-unlink tca-button__icon"></i>Betreuer
                                entfernen</button>
                            <button class="tca-button-text" onclick="tcaPickerClose()">Schließen</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript">
function tcaPickerOpen() {
var pickeropen = document.getElementById("tca-picker1");
pickeropen.style.display = pickeropen.style.display == "flex" ? "none": "flex";}
function tcaPickerClose() {
var pickerclose = document.getElementById("tca-picker1");
pickerclose.style.display = "none";}
</script>