@dcc-bs/common-ui.bs.js

A comprehensive Nuxt module providing reusable UI components, composables, and utilities built with the official Kanton Basel-Stadt design system. This package streamlines development of Basel-Stadt ap
8,299
Install
npm install @dcc-bs/common-ui.bs.js
Latest Version:2.2.1
Vue:3
License:MIT
Last Updated:Oct 22, 2026
Links: GitHub  ·  npm
Maintainer: tbollinger

common-ui.bs.js

A comprehensive Nuxt module providing reusable UI components, composables, and utilities built with the official Kanton Basel-Stadt design system. This package streamlines development of Basel-Stadt applications by offering a consistent, accessible, and well-documented component library.

GitHub License Checked with Biome NPM Version

What's included:

  • Pre-built Components: Navigation bars, split views, disclaimers, status indicators, and more
  • First-run Orchestrator: A single <FirstRunOrchestrator> component that coordinates the Disclaimer, Changelogs, and Onboarding flows by priority (one on screen at a time, rendered client-side to prevent hydration flash)
  • Useful Composables: User feedback system, error handling utilities
  • i18n Integration: Built-in internationalization support
  • Design System: Full integration with Kanton Basel-Stadt color palette and styling
  • Accessibility: Components built with accessibility in mind
  • Zero Configuration: Auto-imports components and configures everything for you

First-run flows

Disclaimer, Changelogs, and Onboarding each compete for the screen when a user enters the app. Mount one <FirstRunOrchestrator> (typically in app.vue) and it renders the highest-priority pending flow, one at a time, recomputing after each completion. Priority: Disclaimer (30) > Changelogs (20) > Onboarding (10).

<script setup lang="ts"> const builder = useOnboardingBuilder() </script> ```

Completion state is stored in cookies (disclaimer-accepted, changelogs-last-read, tour-completed) so pending can be computed from the client's cookie jar. The active flow is rendered inside <ClientOnly>, which guarantees no flash even if the cookie can't reach the SSR layer (proxy stripping, cross-origin SSR, etc.). Re-trigger buttons (<DisclaimerButton>, <ChangelogsButton>, <OnboardingRestartButton>) reset the corresponding cookie. See docs/migration-v2.md for the full consumer guide.

Configuration

The following environment variables control the first-run flows. Set them in your .env file to disable the corresponding flow:

Env Var Default Description
NUXT_PUBLIC_COMMON_UI_DISABLE_DISCLAIMER false When set to true, disables the Disclaimer flow.
NUXT_PUBLIC_COMMON_UI_DISABLE_CHANGELOG false When set to true, disables the Changelogs flow.
NUXT_PUBLIC_COMMON_UI_DISABLE_ONBOARDING false When set to true, disables the Onboarding flow.
NUXT_PUBLIC_COMMON_UI_DISABLE_SYSTEM_STATUS false When set to true, disables the <SystemStatus> health indicator.

Example .env:

NUXT_PUBLIC_COMMON_UI_DISABLE_CHANGELOG=true
NUXT_PUBLIC_COMMON_UI_DISABLE_DISCLAIMER=true
NUXT_PUBLIC_COMMON_UI_DISABLE_ONBOARDING=true
NUXT_PUBLIC_COMMON_UI_DISABLE_SYSTEM_STATUS=true

Disclaimer content defaults can also be set in nuxt.config.ts under runtimeConfig.public.commonUi.disclaimer.{appName, version, contentHtml, postfixHtml, confirmationText}, and overridden per-mount via the orchestrator's :disclaimer prop.

Documentation

For installation and detailed usage instructions, visit the Documentation Site. For version-to-version changes, see the Changelog and the v2 migration guide.

License

MIT © Data Competence Center Basel-Stadt

DCC Logo

Datenwissenschaften und KI
Developed with ❤️ by DCC - Data Competence Center

Related Packages

@dcc-bs/audio-recorder.bs.js

Audio Recorder is a powerful Nuxt.js module that provides advanced audio recordi...

3,164 0

Version History

Version Released Vue License
2.2.1 ^3.0 MIT
2.2.0 ^3.0 MIT
2.1.10 ^3.0 MIT
2.1.9 ^3.0 MIT
2.1.8 ^3.0 MIT