Collapsible panels & accordions

Use a collapsible panel for optional filters or supporting details. Use an accordion for related sections. These examples use the Bootstrap Collapse plugin already loaded by the base template.

Optional filter panel

Starts collapsed. Closing the panel preserves its field values; it does not clear or apply filters. This example does not filter production data.

Grouped details accordion

One section can be open at a time. The first section starts expanded; all sections may be closed.

Show the project owner, current status, and key dates here.

Show task progress and checklist details here.

Show supporting project documents and attachment actions here.

Usage & accessibility

  • Use a real button: Tab focuses each trigger; Enter or Space toggles it. Tab continues into fields and links when the panel is open. Arrow-key navigation is not provided by Bootstrap Collapse.
  • Give each panel a unique ID, connect it with aria-controls, and match the initial aria-expanded value to its .show state. Bootstrap maintains the expanded state after interaction.
  • Keep the trigger label stable and rotate its chevron to show state. Respect reduced-motion preferences and keep touch targets at least 44px.
  • Put padding on an inner wrapper, not on the .collapse element, so height transitions work correctly.
  • Remove data-bs-parent to allow several accordion sections open together. Keep required fields, validation errors, and critical actions visible when users need them.
<button type="button" data-bs-toggle="collapse" data-bs-target="#optionalDetails"
        aria-expanded="false" aria-controls="optionalDetails">Details</button>
<div class="collapse" id="optionalDetails">
  <div class="p-3">Optional content</div>
</div>

Page layouts

Compose admin pages with shared ui.css classes. Examples below use synthetic data; controls never save to production.

Reference list

Subcontractors 2 examples

Preview only
NameStageCity
Example ElectricalContactedRishon LeZion
Example PlumbingNewTel Aviv
Example Electrical
Stage
Contacted
City
Rishon LeZion
Example Plumbing
Stage
New
City
Tel Aviv

Standard lists switch to cards below 768px. Dense project lists use .ui-has-cards-tablet below 1200px; Projects uses two columns at 768โ€“1199px and one on phones. Keep all data and actions available in both views.

<div class="ui-header">Title + .ui-header-actions</div>
<div class="ui-list ui-has-cards">
  .ui-toolbar + .ui-table-wrap + .ui-cards + .ui-pager
</div>

Project detail / task workspace

Example project

Tasks

Keep tasks in the main column and summary metadata alongside. Stack the summary below tasks on phones. Use .ui-header for admin workspaces; .page-header remains the portal title/subtitle pattern.

Board workspace

Header โ†’ List/Board toggle โ†’ shared filters โ†’ horizontally scrolling stage columns. Keep filters consistent between views and preserve them when switching. See Drag & Drop for a working board.

Drag & drop

Based on the subcontractor pipeline. Drag a card between columns, or use its stage selector with keyboard or touch. This demo changes only local page state.

New

Example contractor

Electrical ยท Rishon LeZion

Contacted

Approved

Ready. No changes saved.

File uploads

Production styling uses .upload-area and .upload-hint, with initDropZone() for drag feedback and file selection. These examples validate locally; file contents are never read or uploaded.

Single document

Drop one file here, or click to browse
PDF, PNG or JPEG ยท up to 5 MiB per file ยท one file only

No files selected.

    Multiple attachments

    Drop files here, or click to browse
    PDF, PNG or JPEG ยท up to 5 MiB per file ยท maximum 5 files

    No files selected.

      Tab to the drop zone and press Enter or Space to browse. Mobile users can tap it. A new selection replaces the previous selection. Invalid selections are cleared so users can select the same file again.

      <div class="upload-area" id="fileZone">
        <span id="fileLabel">Drop a file here, or browse</span>
        <div class="upload-hint">PDF ยท maximum 5 MiB</div>
      </div>
      <input type="file" id="fileInput" accept=".pdf" hidden>
      const control = initDropZone('fileZone', 'fileInput', 'fileLabel');
      // Add click/keyboard browsing, change validation, and upload handling.
      // control.reset() clears the selection and restores the prompt.

      For production uploads, validate file count, size, and actual content on the server too. Show real upload progress, success, and retry feedback; prevent duplicate submission while uploading. The helper handles selection only, not validation or network requests.

      Interaction contract

      • Idle: grab cursor and visible move control. Dragging: reduced opacity. Valid target: dashed brand outline and tinted background.
      • On drop, announce the destination. Production: show saving, confirm success, and restore the previous position with a retry action if saving fails.
      • Keep empty columns available as drop targets; show counts and stage text so color is never the only signal.
      • Tasks, checklist items, and phases use reorder behavior rather than stage changes. Show an insertion marker and offer Move up / Move down controls; respect phase boundaries.
      • On phones, scroll the board horizontally and retain the stage selector. Do not require dragging for any operation.

      The highlighted states are a proposed shared convention. Existing board and task drag styles remain page-specific; the guide scopes its demonstration styles with sg-.

      Icons

      Use the Bootstrap Icons font already loaded by the base templates. Pass the bare name to render_button(icon='plus-lg'); raw markup uses bi bi-plus-lg.

      Add
      bi-plus-lg
      Edit
      bi-pencil
      Delete
      bi-trash
      View
      bi-eye
      Deactivate
      bi-power
      Refresh
      bi-arrow-clockwise
      Clear filters
      bi-x-circle
      List view
      bi-list-ul
      Board view
      bi-kanban
      Categories
      bi-tags
      Reorder
      bi-grip-vertical
      Sort descending
      bi-sort-down

      Use a consistent 16px action icon and 20px section icon. Let icons inherit text color. Decorative icons use aria-hidden="true"; icon-only buttons need an accessible label and a title. Use logical spacing for RTL; mirror directional navigation only when its meaning changes with direction.

      <button type="button" class="btn btn-outline-secondary" aria-label="Refresh" title="Refresh">
        <i class="bi bi-arrow-clockwise" aria-hidden="true"></i>
      </button>

      Colors & Design Tokens

      Brand Colors

      --brand-600
      #2563eb
      --brand-50
      #eff6ff
      --brand-700
      #1d4ed8

      Status Colors

      Success
      Warning
      Danger
      Info

      Buttons

      Production action patterns

      One primary action per action group. Use outline secondary for supporting actions and danger for destructive actions. Header controls use --control-h (36px); phone controls use --touch-target (44px). Dense desktop row actions use .act-btn; cards enlarge them for touch. Tab through this page to inspect focus outlines. Loading controls keep a text label and disable duplicate submission.

      {{ render_button('New item', 'primary', icon='plus-lg') }}

      Variants & Sizes

      Size order: standard > Small (.btn-sm, dense desktop, ~28px) > XS (.btn-xs). Page-header actions use --control-h (36px); mobile actions use --touch-target (44px).

      Primary

      Secondary

      Ghost

      Danger

      Forms & Inputs

      Badges & Status Indicators

      Active Pending Archived Pending Review Neutral Purple

      Alerts

      Cards

      Standard Card
      With header and body

      This is a standard card component with title, subtitle, and content area.

      Card with Actions
      Includes action buttons

      This card has a footer section with action buttons.

      KPI Cards

      +12.5%
      $12,345
      Revenue
      +8.2%
      2,543
      Users
      -2.1%
      34.2%
      Bounce Rate
      +5.0%
      23
      Errors

      Tables

      Name Email Role Status
      Alice Johnson alice@example.com Admin Active
      Bob Smith bob@example.com Manager Active
      Charlie Brown charlie@example.com Client Pending

      List page recipe

      Example list

      3 items total
      3 items

      Rules

      • 25 rows per page; search (300ms debounce), filters and sorting are server-side and reset to page 1.
      • Below 768px the table is replaced by cards with the same data and every row action. Dense lists such as Projects use .ui-has-cards-tablet to keep cards below 1200px.
      • Row actions are .act-btn chips with aria-label + title; 28px on desktop, 44px on cards.
      • Dates display as DD/MM/YYYY via formatDate(); date-only values never shift day; timestamps show in Asia/Jerusalem.
      API valueformatDate()formatDateTime()

      Typography

      Heading 1 (H1)

      Used for page titles and main headings

      Heading 2 (H2)

      Used for section headings

      Heading 3 (H3)

      Used for subsection headings

      This is a paragraph with standard body text. It uses the default font size of 14px and line-height optimized for readability.

      This is smaller text (12px) used for captions and metadata.

      Monospace font for code snippets