Valtimo docs
  • Welcome to Valtimo
  • Fundamentals
    • â„šī¸What is Valtimo
    • đŸ™ī¸Architectural overview
      • Choosing the right setup
      • âš™ī¸Available modules
    • Process Exchange
      • Process blueprints
      • Building blocks
    • 📖How to use this documentation
    • đŸ–ąī¸Getting started
      • Configuring the database
      • Modules
        • Core modules
          • Audit
          • Authorization
          • Camunda
          • Case
          • Connector
          • Contract
          • Core
          • Dashboard
          • Document
          • Document generation
          • Exporter
          • Form
          • Form flow
          • Form flow Valtimo
          • Importer
          • Localization
          • Local document generation
          • Local mail
          • Mail
          • Mandrill
          • Milestones
          • Plugins
          • Outbox
            • Outbox RabbitMQ
          • Process document
          • Resource
          • Temporary resource storage
          • Test utils common
          • Value resolvers
          • Valtimo dependencies
          • Valtimo dependency versions
          • Web
            • CORS
        • GZAC modules
          • Besluit
          • Besluiten API
          • Catalogi API
          • Contactmoment
          • Documenten API
          • Haalcentraal BRP
          • Klant
          • Notificaties API
          • Notificaties API Authentication
          • Objecten API
          • Objecten API Authentication
          • Object management
          • Objects API
          • Objecttypen API
          • OpenZaak
          • OpenZaak Plugin Authentication
          • OpenZaak resource
          • Portaaltaak
          • SmartDocuments
          • Valtimo GZAC dependencies
          • Verzoek
          • Wordpress mail
          • Zaken API
      • Compatibility matrix
  • Features
    • 🔏Access control
      • Configurable elements
      • Configuring roles
      • Configuring permissions
      • Configuring conditions
      • Configuring context conditions
      • For developers
        • Front-end access control
        • Creating a resource
        • Creating a relation to another resource
        • Running custom code without access control
    • đŸ—ƒī¸Case
      • Configuration
      • Document definition
      • List
      • Notes
      • Processes
      • Search fields
      • Statuses
      • Tabs
        • Widgets
      • For developers
        • Search fields API
        • Case list tab order
        • Custom case list columns
        • Custom case tabs
        • Case migration
        • Custom case headers
        • Register Angular component
    • 📊Dashboard
      • Widget data sources
      • Widget display types
      • For developers
        • Custom dashboards
        • Custom data sources
        • Custom display types
        • Widget translations
    • 📋Forms
      • Prefilling data
      • Interpolating data
      • Form flow
      • Objecten API object form
      • For developers
        • Form field data resolver
        • Custom value resolvers
        • Custom form flow component
        • Spring beans for Form flow
    • 🌍Localization
      • For developers
    • Logging
      • For developers
    • âœ‰ī¸Outbox
      • For developers
    • 🔌Plugins
      • Configuring plugins
      • SmartDocuments plugin
      • Exact Plugin
      • For developers
        • Custom plugin definitions
    • ⭕Process
      • System processes
      • Correlating messages
      • Job service
      • Process links
      • For developers
        • Integrating spring beans in a process
        • Whitelisting Spring beans for Camunda
    • ✅Tasks
      • Task list columns
    • 📃ZGW
      • Documents
        • Access control
        • Uploading to Documenten API with metadata
      • Creating extra case tabs for Zaakobjects
      • ZGW plugins
        • Besluiten Plugin
        • Catalogi API plugin
        • Documenten API plugin
        • Object Token Auhentication Plugin
        • Objecten API Plugin
        • Objecttypen API Plugin
        • Open Zaak plugin
        • Portaaltaak Plugin
        • Verzoek Plugin
        • Zaken API plugin
  • Release notes
    • Release notes
    • 12.x.x
      • 12.13.0 (backend only)
      • 12.12.0
      • 12.11.0
      • 12.10.0
        • 12.10.1
        • 12.10.2
      • 12.9.0
      • 12.8.0
      • 12.7.0
        • 12.7.1
        • 12.7.2
      • 12.6.0
        • 12.6.1
      • 12.5.0
      • 12.4.0
        • 12.4.1
      • 12.3.0
        • 12.3.1
      • 12.2.0
      • 12.1.0
      • 12.0.0
        • Valtimo backend libraries
        • Valtimo frontend libraries
        • Migration
          • Spring Boot 3
    • 11.x.x
      • 11.3.0
        • Valtimo backend libraries
        • Valtimo frontend libraries
      • 11.2.0 (RC)
        • Valtimo backend libraries
        • Valtimo frontend libraries
      • 11.1.5
        • Valtimo frontend libraries
      • 11.1.4
        • Valtimo backend libraries
        • Valtimo frontend libraries
      • 11.1.1
        • Valtimo backend libraries
        • Valtimo frontend libraries
      • 11.1.0
        • Valtimo backend libraries
        • Valtimo frontend libraries
      • 11.0.0
        • Valtimo backend libraries
        • Valtimo frontend libraries
        • Migration
    • 10.x.x
      • 10.8.3
        • Valtimo backend libraries
      • 10.8.2
        • Valtimo frontend libraries
      • 10.8.0
        • Valtimo backend libraries
        • Valtimo frontend libraries
      • 10.7.0
        • Valtimo backend libraries
        • Valtimo frontend libraries
      • 10.6.0
        • Valtimo backend libraries
        • Valtimo frontend libraries
        • Migration
      • 10.5.3
        • Valtimo backend libraries
      • 10.5.2
        • Valtimo backend libraries
      • 10.5.1
        • Valtimo backend libraries
        • Valtimo frontend libraries
      • 10.5.0
        • Valtimo backend libraries
        • Valtimo frontend libraries
        • Migration
      • 10.4.0
        • Valtimo backend libraries
        • Valtimo frontend libraries
      • 10.3.0
        • Valtimo backend libraries
        • Valtimo frontend libraries
      • 10.2.0
        • Valtimo backend libraries
        • Valtimo frontend libraries
      • 10.1.0
        • Valtimo backend libraries
        • Valtimo frontend libraries
        • Migration
      • 10.0.1
        • Valtimo frontend libraries
      • 10.0.0
        • Valtimo backend libraries
        • Valtimo frontend libraries
        • Migration
    • 9.x.x
      • 9.26.2/5.15.1
        • Valtimo backend libraries (9.26.2)
        • Migration
      • 9.26.1/5.15.1
        • Valtimo backend libraries (9.26.1)
        • Valtimo frontend libraries (5.15.1)
      • 9.26.0/5.15.0
        • Valtimo backend libraries (9.26.0)
        • Valtimo frontend libraries (5.15.0)
        • Migration
      • 9.25.0/5.14.0
        • Valtimo backend libraries (9.25.0)
        • Valtimo frontend libraries (5.14.0)
      • 9.24.0/5.13.0
        • Valtimo backend libraries (9.24.0)
        • Valtimo frontend libraries (5.13.0)
      • 9.23.0/5.12.0
        • Valtimo backend libraries (9.23.0)
        • Valtimo frontend libraries (5.12.0)
      • 9.22.0/5.11.0
        • Valtimo backend libraries (9.22.0)
        • Valtimo frontend libraries (5.11.0)
        • Migration
      • 9.21.0/5.10.0
        • Valtimo backend libraries (9.21.0)
        • Valtimo frontend libraries (5.10.0)
        • Migration
      • 9.20.0/5.9.1
        • Valtimo backend libraries (9.20.0)
        • Valtimo frontend libraries (5.9.1)
        • Migration
      • 9.19.0/5.8.0
        • Valtimo backend libraries (9.19.0)
        • Valtimo frontend libraries (5.8.0)
        • Migration
      • 9.18.0/5.6.0
        • Valtimo backend libraries (9.18.0)
        • Valtimo frontend libraries (5.6.0)
        • Migration
      • 9.17.0/5.5.0
        • Valtimo backend libraries (9.17.0)
        • Valtimo frontend libraries (5.5.0)
      • 9.16.0/5.4.0
        • Valtimo backend libraries (9.16.0)
        • Valtimo frontend libraries (5.4.0)
  • Running Valtimo
    • Application configuration
      • Temporary file-storage
      • Configuring CORS
      • REST API endpoint security test
      • Content Security Policy (CSP)
      • Configuring Keycloak
      • Temporary file storage
      • Feature toggles
  • Customizing Valtimo
    • Front-end customization
      • Customizing Carbon theme
      • Custom logo
      • Custom components
        • Custom case management tab
  • Contributing to Valtimo
    • Valtimo/GZAC
    • Documentation
    • Branching and release strategy
  • Nog een plek geven
    • References
      • Modules
        • Authorization
        • Document
        • Object management
      • User interface
        • Design philosophy
        • Carbon design system
        • v-button
        • Breadcrumbs
        • Setting up a list with actions
        • Setting up a list with custom template columns
        • Toolbar actions list
        • Multi select List
        • Pagination and sorting
        • Toolbar actions list
        • Searchable list
        • Valtimo Carbon List
      • Supported databases
      • Process beans
      • Environment
  • Templates
    • Feature
      • Subject
      • For developers
        • Subject for devs
    • Release notes
Powered by GitBook
On this page
  • Design tokens
  • Including design tokens in an implementation
  • Design token system
  • Components
  • Library structure
  • Selector naming
  • HTML structure
  • Component input
  • Spacing
  • Example component: v-paragraph
  1. Nog een plek geven
  2. References
  3. User interface

Design philosophy

In valtimo-frontend-libraries major version 5, a new library was introduced: @valtimo/user-interface. It aims to provide a set of components which will give Valtimo a clean and consistent look and feel. The initial set of components are based on this Figma design.

Note: as of valtimo-front-end-libraries major version 10, the development and use of this library has been discontinued. For new features, the Carbon design system will be used.

Design tokens

All main design aspects - like color, typography, and spacing - are stored in CSS variables, which are then referenced in specific design tokens used by components.

Including design tokens in an implementation

All design tokens are specified in one file, and exported from @valtimo/user-interface.

They are included by adding the following line to the styles array in an implementation's angular.json file:

node_modules/valtimo/user-interface/assets/design-tokens.css;

Implementation developers can later add their own sheets with tokens after this import, in order to override values, for example to customize an implementation's accent colors.

Design token system

Prefixes

All design tokens are prefixed with --v-*.

Values

All spacing and sizing is done through the use of pixel values. Margins and padding are added with the block and inline syntax. So for example, margin-inline-start as opposed to margin-left.

Definition

All main design aspects are defined at the top of `design-tokens.css. For example, this line defines the main accent color:

/* colors */
--v-color-accent-1: #ef6622;

New design aspects are always added at the top of the file, with the main tokens, and are appropriately categorized using CSS comments.

Component tokens

Subsequently, specific tokens are specified for each component, which reference these main design aspects:

/* Button */
--v-button-primary-bg-color: var(--v-color-accent-1);

In this way, the design remains consistent, and it offers implementation developers the choice to either override a main design aspect in all components (for example, changing an accent color), or to override a specific property of a specific component.

Stylesheets of components refer to component tokens only, never to main tokens, like so:

button.component.scss

.v-button--primary {
    background-color: var(--v-button-primary-bg-color);
}

Components

Library structure

All components using this new design are exported from the library @valtimo/user-interface with their own module. In this way, components are only imported into other modules as needed.

Selector naming

Components using the new design are prefixed with v-*, for example v-paragraph.

HTML structure

Components are made from scratch, and as much as possible, without the help of third party components. Their HTML structure is to conform to the BEM naming convention. For a guide on how to use BEM, refer to this page.

Component input

As a way to reuse code as much as possible, the appearance of features of a component may be altered through the use of component inputs. If a new feature or look is required, make sure to determine if this is best added to an existing component and enabled through the use of inputs.

Spacing

By default, margins external to the component - for example, the margin below a title element - are optional and can be turned off. In this way, spacing is flexible and may be customized to satisfy specific needs.

Example component: v-paragraph

Taking all the above guidelines into account, view the reference code below with comments, to see how it all comes together.

paragraph.component.html

<p
    <!-- Main component class using a v-* prefix -->
    class="v-paragraph"
    <!-- BEM modifier classes triggered based on component input -->
    [ngClass]="{
        'v-paragraph--center': center,
        'v-paragraph--full-width': fullWidth,
        'v-paragraph--margin': margin,
        'v-paragraph--italic': italic
    }"
>
    <ng-content></ng-content>
</p>

paragraph.component.ts

import {Component, Input} from '@angular/core';

@Component({
    // Component selector prefixed with v-*
    selector: 'v-paragraph',
    templateUrl: './paragraph.component.html',
    styleUrls: ['./paragraph.component.scss'],
})
export class ParagraphComponent {
    // Component inputs which trigger the BEM classnames in the template
    @Input() center = false;
    @Input() fullWidth = false;
    @Input() margin = false;
    @Input() italic = false;
}

paragraph.component.scss

/* Main component class using a v-* prefix */
.v-paragraph {
    margin: 0;
    font-size: var(--v-paragraph-font-size);
    line-height: var(--v-paragraph-line-height);
    color: var(--v-paragraph-color);
    font-weight: var(--v-paragraph-font-weight);
}

/* BEM modifier classnames triggered by component inputs */

.v-paragraph--center {
    text-align: center;
}

.v-paragraph--full-width {
    width: 100%;
}

.v-paragraph--margin {
    /* Component only uses component specific design tokens */
    margin-block-end: var(--v-paragraph-margin);
}

.v-paragraph--italic {
    font-style: italic;
}

The component is then exported separately from its own module, so that it can be used on its own in other modules.

paragraph.module.ts

import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {ParagraphComponent} from './paragraph.component';

@NgModule({
    declarations: [ParagraphComponent],
    imports: [CommonModule],
    exports: [ParagraphComponent],
})
export class ParagraphModule {}
PreviousUser interfaceNextCarbon design system

Last updated 2 months ago