All Config Engine Components

Complete reference of the 16 components that support $.setup() configuration

16 Supported 9 Unsupported

Quick Reference

Supported Components (16): Can be configured via $.setup()

card modal tabs accordion tooltip carousel dropdown badge backToTop buttonGroup loader breadcrumbs navbar notification timer alarm

Not Supported (9): Must use direct initialisation

autocomplete pillbox toast dialog treeView jumbotron themeRoller pageRoller editor

Supported 1. card

Purpose: Interactive container elements with hover effects and click handling

$.setup({
  '.demo-card': {
    component: 'card',
    options: {
      hoverable: true,
      shadow: 'medium',
      onClick: () => console.log('Card clicked!')
    }
  }
});

Product 1

Hover or click me!

Product 2

Hover or click me!

Product 3

Hover or click me!

Supported 3. tabs

Purpose: Tabbed content panels with animation support

$.setup({
  '#demo-tabs': {
    component: 'tabs',
    options: {
      activeIndex: 0,
      animation: 'fade'
    }
  }
});
  • Overview
  • Specifications
  • Reviews

Product Overview

This is the overview content. Configured tabs automatically handle switching.

Technical Specifications

Detailed specifications appear in this tab panel.

Customer Reviews

Reviews and ratings are displayed here.

Supported 4. accordion

Purpose: Collapsible content sections with single or multi-expand modes

$.setup({
  '#demo-accordion': {
    component: 'accordion',
    options: {
      multiExpand: false,
      animation: 'slide'
    }
  }
});
What is Domma?

Domma is a lightweight JavaScript framework combining jQuery-style DOM manipulation with modern UI components.

How do I install it?

Include the CDN link or npm install domma-framework

Is it production-ready?

Yes! Domma is stable and used in production applications.

Supported 5. tooltip

Purpose: Contextual popups on hover or click with multiple positioning options

$.setup({
  '[data-tooltip]': {
    component: 'tooltip',
    options: {
      position: 'top',
      trigger: 'hover',
      delay: 200
    }
  }
});

Supported 8. badge

Purpose: Status indicators and labels with variant styles

$.setup({
  '.demo-badge': {
    component: 'badge',
    options: {
      variant: 'primary',
      rounded: true
    }
  }
});
Primary Secondary Success Danger Warning Info

Supported 9. backToTop

Purpose: Scroll-to-top button that appears after scrolling down

$.setup({
  '#back-to-top': {
    component: 'backToTop',
    options: {
      showAfter: 300,
      duration: 500,
      position: 'bottom-right'
    }
  }
});

Note: Scroll down the page to see the back-to-top button appear in the bottom-right corner.

Supported 10. buttonGroup

Purpose: Radio/checkbox style button groups with single or multi-select

$.setup({
  '#demo-btngroup': {
    component: 'buttonGroup',
    options: {
      mode: 'single',  // or 'multiple'
      activeClass: 'active'
    }
  }
});

Selected: Left

Supported 11. loader

Purpose: Loading indicators with multiple animation types

$.setup({
  '#demo-loader-container': {
    component: 'loader',
    options: {
      type: 'spinner',
      size: 'medium',
      overlay: true,
      text: 'Loading...'
    }
  }
});

Content area - click button to show loader overlay

Supported 14. notification

Purpose: Desktop browser notifications (requires permission)

$.setup({
  '#request-notification-btn': {
    events: {
      click: async () => {
        if ('Notification' in window) {
          const permission = await Notification.requestPermission();
          if (permission === 'granted') {
            Domma.elements.notify('Domma Notification', {
              body: 'Desktop notification configured via $.setup()!',
              icon: '../../assets/logo/domma-icon.svg'
            });
          }
        }
      }
    }
  }
});

Note: Browser will prompt for permission to show notifications.

Supported 15. timer

Purpose: Countdown timer with optional visual display and controls

$.setup({
  '#demo-timer': {
    component: 'timer',
    options: {
      duration: 60000,  // 60 seconds
      format: 'mm:ss',
      showControls: true,
      autoStart: false
    }
  }
});

Supported 16. alarm

Purpose: Scheduled time-based alerts with localStorage persistence

$.setup({
  '#demo-alarm': {
    component: 'alarm',
    options: {
      alarms: [
        {
          time: '09:00',
          label: 'Morning Meeting',
          repeat: 'weekdays',
          enabled: true
        }
      ],
      storageKey: 'demo-alarms'
    }
  }
});
Alarm Configuration: Alarms are configured via options and persist in localStorage. When an alarm triggers, a desktop notification and optional sound are displayed.
Current Time: --:--
Next Alarm: Morning Meeting at 09:00 (weekdays)

Not Supported Components Requiring Direct Init

These components cannot be configured via $.setup() and must be initialized directly.

autocomplete

Why: Complex data binding and async data sources

// Use direct init
const ac = Domma.elements.autocomplete('#search', {
  data: ['Apple', 'Banana', 'Cherry'],
  onSelect: (val) => console.log(val)
});

pillbox

Why: Advanced multi-select state management

// Use direct init
const pb = Domma.elements.pillbox('#tags', {
  data: ['React', 'Vue', 'Angular'],
  creatable: true
});

toast

Why: Ephemeral notifications (no persistent DOM element)

// Use static method
Domma.elements.toast('Success!', {
  type: 'success',
  duration: 3000
});

dialog (alert, confirm, prompt)

Why: Promise-based programmatic APIs

// Use static methods
const ok = await Domma.elements.confirm('Delete?');
const name = await Domma.elements.prompt('Name:');

treeView

Why: Hierarchical data requires direct data binding

// Use direct init
const tree = Domma.elements.treeView('#tree', {
  items: [{label: 'Parent', children: [...]}]
});

jumbotron

Why: CSS-only component (no JavaScript)


Hero Section

themeRoller / pageRoller / editor

Why: Developer tools (in tools bundle, not main bundle)

// Load domma-tools.min.js first
const roller = Domma.elements.themeRoller('#container');
const editor = Domma.elements.editor('#editor');

When to Use Config Engine vs. Direct Init

✓ Use $.setup() for:

  • Static component initialisation
  • Multiple similar components
  • Simple setup scenarios
  • Layout-based components
  • Components with persistent DOM elements
  • Declarative configuration approach

✓ Use Direct Init for:

  • Dynamic data sources
  • Complex interactions
  • Conditional setup logic
  • Ephemeral/temporary components
  • Promise-based workflows
  • Components requiring runtime data