Skip to content

Repository files navigation

@bitcode-framework/ui-web-components

Enterprise-grade Stencil Web Components for business applications. 127 components covering forms, charts, data tables, layout, dialogs, media viewers, kanban board, and widgets. Works in any HTML page, no framework required.

MIT Licensenpm versionLive Demo

Live Demo → — interactive component gallery with all 127 components.

What is @bitcode-framework/ui-web-components?

127 Web Components built with Stencil.js. They compile to standard Custom Elements, so they run anywhere HTML runs: plain pages, React, Vue, Angular, Svelte, or any framework that renders to the DOM.

Built for the BitCode low-code platform, but fully standalone. No BitCode server or runtime dependency. Drop a <script> tag and start using components.

Framework-agnostic. No build step for consumers. Tree-shakeable.

Component Overview

CategoryCountComponents
Fields35text, textarea, small text, password, integer, float, decimal, currency, percent, date, time, datetime, duration, checkbox, toggle, select, radio, multi-checkbox, tags, many2one link, dynamic link, table select, morph, rich text (Tiptap), markdown, HTML editor, code (CodeMirror), JSON, file upload, image upload, signature pad, barcode/QR, color picker, geolocation (Leaflet), rating
Charts26bar, line, pie/donut, area, scatter/bubble, radar, gauge, funnel, heatmap, treemap, sunburst, candlestick/OHLC, boxplot, mixed/combo, sankey, network graph, tree, polar, parallel coordinates, theme river, pictorial bar, custom (raw ECharts), pivot table, KPI card, scorecard, progress
DataTable3data table with server-side pagination/sorting/filtering, filter builder, lookup modal
Views10form, list, kanban, calendar, gantt, tree, map, activity, report, editor
Layout10row, column, section, tabs, tab, sheet, header, separator, button-box, html-block
Dialogs5modal, confirm, quick-entry, wizard, toast
Widgets19badge, copy-to-clipboard, phone, email, URL, progress, status bar, priority, drag handle, domain, sync status, PDF viewer, image viewer, document viewer, YouTube embed, Instagram embed, TikTok embed, video player, audio player
Search4search, filter bar, filter panel, favorites
Social3activity feed, chatter, timeline
Print3print, export, report link
Table1child table (editable sub-table for forms)

All 26 charts are powered by Apache ECharts. Pass raw ECharts options to bc-chart-custom for anything not covered by the dedicated chart components.

Quick Start

CDN (no build step)

<!DOCTYPE html><html><head><scripttype="module" src="https://unpkg.com/@bitcode-framework/ui-web-components/dist/bc-components/bc-components.esm.js"></script></head><body><bc-field-stringname="email" label="Email" requiredplaceholder="you@example.com"></bc-field-string><bc-field-selectname="country" label="Country"
options='[{"label":"Indonesia","value":"ID"},{"label":"Japan","value":"JP"}]'></bc-field-select></body></html>

NPM

npm install @bitcode-framework/ui-web-components
import{defineCustomElements}from'@bitcode-framework/ui-web-components/loader';defineCustomElements();

Global Configuration (optional)

Components work with zero config. When you need API integration, auth, or theming, configure once:

import{BcSetup}from'@bitcode-framework/ui-web-components';BcSetup.configure({baseUrl: '/api',auth: {type: 'bearer',token: ()=>localStorage.getItem('jwt')},theme: 'system',locale: 'en'});

Config can also be set via meta tags for server-rendered pages:

<metaname="bc-base-url" content="/api"><metaname="bc-auth-token" content="eyJhbG..."><metaname="bc-theme" content="dark">

Usage Examples

Form Fields

<bc-field-stringname="name" label="Full Name" requiredclearable></bc-field-string><bc-field-integername="age" label="Age" min="0" max="150"></bc-field-integer><bc-field-currencyname="price" label="Price" currency="USD"></bc-field-currency><bc-field-datename="birthday" label="Birthday" format="YYYY-MM-DD"></bc-field-date><bc-field-togglename="active" label="Active"></bc-field-toggle><bc-field-ratingname="score" label="Rating" max="5"></bc-field-rating><bc-field-geoname="location" label="Location" lat="-6.2" lng="106.8"></bc-field-geo>

API-Connected Select

<bc-field-selectname="city"
label="City"
data-source="/api/cities"
data-text-field="name"
data-value-field="id"
searchable></bc-field-select>

DataTable

<bc-datatablecolumns='[ {"field":"name","header":"Name","sortable":true}, {"field":"email","header":"Email"}, {"field":"status","header":"Status","filterable":true} ]'
data-source="/api/users"
server-sidepaginationpage-size="20"
selectable></bc-datatable>

Charts

<bc-chart-bardata='[{"category":"Q1","revenue":120000},{"category":"Q2","revenue":180000}]'
x-field="category"
y-field="revenue"
title="Quarterly Revenue"
></bc-chart-bar><bc-chart-kpititle="Active Users" value="12483" trend="up" trend-value="12.5%"></bc-chart-kpi><bc-chart-piedata='[{"name":"Desktop","value":60},{"name":"Mobile","value":40}]'
name-field="name"
value-field="value"
></bc-chart-pie>

Dark Mode

Apply to any element or the body:

<bodydata-bc-theme="dark">

Or auto-detect system preference:

BcSetup.configure({theme: 'system'});

Features

4-Level Data Fetching

Components that load data support four strategies, controlled via attributes or BcSetup:

  1. Local data - pass data directly via attributes (options, data, columns)
  2. URL endpoint - set data-source="/api/users" and the component fetches automatically
  3. Event intercept - listen for bcDataFetch to modify requests before they go out
  4. Custom fetcher - register a function in BcSetup for full control over the request/response cycle

3-Level Validation

  1. Built-in rules - required, min, max, minlength, maxlength, pattern, email, url, and more via attributes
  2. Custom JS validators - register named validators via BcSetup.registerValidator()
  3. Server-side - components send validation requests and display server errors
BcSetup.registerValidator('no-competitor',async(value)=>{if(String(value).endsWith('@competitor.com'))return'Competitor emails not allowed';returnnull;});
<bc-field-stringname="email" label="Email" validate="required email no-competitor"></bc-field-string>

Theming

Four theme modes: light, dark, system (auto-detect OS preference), and custom. All colors use CSS custom properties, so you override at any granularity.

:root {
--bc-primary:#6366f1;
--bc-border-radius:8px;
--bc-font-family:'Inter', sans-serif;
}

i18n

11 languages built in. Set via BcSetup.configure({ locale: 'ja' }) or the locale attribute on individual components.

CodeLanguage
enEnglish
idBahasa Indonesia
arArabic
deGerman
esSpanish
frFrench
jaJapanese
koKorean
pt-BRPortuguese (Brazil)
ruRussian
zh-CNChinese (Simplified)

Reactivity

Fields can react to changes in other fields. Register rules that run when a field value changes:

BcSetup.reactivity({'customer_type': (value,form)=>{if(value==='company'){form.setRequired('tax_id',true);form.setVisible('company_name',true);}else{form.setRequired('tax_id',false);form.setVisible('company_name',false);}}});

Offline Support

When used inside the BitCode Tauri shell, components automatically route CRUD operations to a local SQLite database for models marked mode: "offline". No code changes to the components themselves.

Framework Integration

Stencil compiles to standard Custom Elements, so integration is straightforward in any framework.

React

import{defineCustomElements}from'@bitcode-framework/ui-web-components/loader';defineCustomElements();functionContactForm(){return(<form><bc-field-stringname="name"label="Name"required></bc-field-string><bc-field-stringname="email"label="Email"required></bc-field-string><bc-field-selectname="country"label="Country"options={JSON.stringify([{label: 'Indonesia',value: 'ID'},{label: 'Japan',value: 'JP'}])}></bc-field-select></form>);}

Vue

import{defineCustomElements}from'@bitcode-framework/ui-web-components/loader';defineCustomElements();// vite.config.js or vue.config.jsexportdefault{compilerOptions: {isCustomElement: (tag)=>tag.startsWith('bc-')}};
<template>
<bc-field-stringname="name"label="Name"required></bc-field-string>
<bc-datatable:columns="columns"data-source="/api/users"server-side></bc-datatable>
</template>

Angular

// app.module.tsimport{CUSTOM_ELEMENTS_SCHEMA,NgModule}from'@angular/core';import{defineCustomElements}from'@bitcode-framework/ui-web-components/loader';defineCustomElements();
@NgModule({schemas: [CUSTOM_ELEMENTS_SCHEMA]})exportclassAppModule{}
<!-- contact.component.html --><bc-field-stringname="name" label="Name" required></bc-field-string><bc-field-datename="birthday" label="Birthday"></bc-field-date>

Tech Stack

LibraryPurpose
Stencil.jsWeb Component compiler
Apache EChartsCharts (26 chart types)
TiptapRich text editor
CodeMirrorCode, JSON, HTML, SQL, CSS editors
LeafletMaps and geolocation
FullCalendarCalendar views
markdown-itMarkdown parsing and rendering
JsBarcodeBarcode generation
qrcodeQR code generation
signature_padSignature capture
SortableJSDrag-and-drop sorting
SheetJSExcel export/import
frappe-ganttGantt charts

Related Repositories

RepoDescription
go-jsonJSON/JSONC programming language engine
go-json-runtimesScript runtime engines for go-json (Goja, QuickJS, Yaegi, Node.js, Python)
ui-web-componentsThis repository
ui-tauriTauri 2.0 native shell for desktop and mobile

Documentation

Per-component documentation with props, events, methods, and examples lives in the docs/ folder.

GuideDescription
Getting StartedInstallation and basic usage
BcSetupGlobal configuration: auth, headers, base URL, theme, validators
ThemingLight, dark, system-detect, and custom themes
Data Fetching4-level data strategy
Validation3-level validation system
ReactivityDependent fields, cascading logic
Component ReferenceFull component catalog with links to per-component docs

License

MIT

About

119 enterprise Stencil Web Components. Fields, charts (ECharts), data tables, layout, dialogs, media viewers. Framework-agnostic, works in plain HTML.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages