Incursa
SM Sam McAravey Administrator
Signed in as Sam McAravey
Profile Preferences Sign out
  1. Examples
  2. Web Components

Optional Layer

Browser-native components that stay inside the same CSS kit.

Use the class-based UI kit when you only need the language. Use the Web Component layer when you want declarative HTML, attributes, slots, DOM events, and the same design vocabulary from plain browser markup.

Load the entrypoints

The package export is `@incursa/ui-kit/web-components`. Pair it with `@incursa/ui-kit/web-components/style.css` for the default look, then import the runtime once to register the shipped elements.

<link rel="stylesheet" href="/node_modules/@incursa/ui-kit/web-components/style.css">
<script type="module">
  import "@incursa/ui-kit/web-components";
</script>

The v1 layer covers layouts, navbar/tabs/user-menu, field/input-group/choice-group/readonly-field/validation-summary, state/live-region/auto-refresh/theme-switcher, button/button-group/button-toolbar/close-button, alert/empty-state/list-group/key-value hosts, badge/spinner atoms, sparkline trends, and disclosure/dialog/drawer.

Tables, filters, bulk workflows, files, utilities, and most other presentation-only atoms stay CSS-first for now. Sparklines are promoted because dense metric tables need a reusable accessible trend primitive.

Plain HTML equivalent

Explicit class wiring

This is the CSS-first version of the same screen shape. It works, but the structure is louder because every wrapper is spelled out by hand.

<section class="inc-card">
  <div class="inc-card__header">
    <h2 class="inc-card__title">Queue summary</h2>
  </div>
  <div class="inc-card__body">
    <table class="inc-table inc-table--sm inc-table--data-table">
      <thead>...</thead>
      <tbody>...</tbody>
    </table>
  </div>
</section>

Web Components equivalent

Shorter markup, same result

The Web Component layer lets the browser own the semantics while the slots keep the layout contract obvious and reusable.

<inc-card elevated>
  <div slot="header" class="inc-card__header">
    <h2 class="inc-card__title">Queue summary</h2>
  </div>
  <div slot="body">
    <table class="inc-table inc-table--sm inc-table--data-table">
      <thead>...</thead>
      <tbody>...</tbody>
    </table>
  </div>
</inc-card>

Shell, navigation, and metrics

Queue
124
Pending review
Risks
7
Needs attention
Saved
$18.2k
This week
Review queue content.
Ready-to-approve content.
Recently exported content.

Atomic controls with stable defaults

Badge hosts standardize tone and pill styling without making you memorize the class suffix chain.

Draft Approved Pending

Spinner hosts standardize loading variants and accessible labels.

Buttons, alerts, and empty states

Button hosts wrap native controls and standardize tone, size, and loading defaults.

Approve Save Draft Saving
Publishing Refreshing
Light Dark System Refresh Export

Alerts and empty-state shells keep the repeated runtime scaffolding declarative.

Success alert text. Information alert text. Warning alert text.

No saved views

Create a named filter set so your operators can reuse it across screens.

Dismiss Create View

List groups and key values

List-group hosts standardize repeated action-row markup without changing list semantics.

Needs review March closeout Projects missing billing period
  • First review pass
  • Secondary approval
  • Final export
  • Key-value hosts standardize the repeated description-list pair pattern.

    Sparkline trend evidence

    Static pages can pass simple numeric values. Timestamped benchmark history can use the `points` JSON attribute or the `points` property.

    Markers and reference lines remain decorative support. The surrounding cell should still show the current value and delta.

    Benchmark Current History Delta
    HTTP/3 plaintext 5,510 rps +3.1%
    QPACK decode 1.42 ms Best

    Tables, colors, and low-level presentation stay CSS-first

    The Web Component layer does not replace the table styling language. It reuses the same class-based table system where that is still the right contract.

    Project Period Amount Status
    AP-2026-00142 March 2026 $18,240.22 Approved
    AP-2026-00144 March 2026 $4,992.00 Pending

    The color story and compact action buttons still match the CSS-first kit exactly.

    Primary Action color var(--bs-primary)
    Warning Attention state var(--bs-warning)
    Danger High-risk state var(--bs-danger)
    Surface Neutral panel var(--inc-surface-secondary)

    Forms and feedback

    Visible to operators.

    Project name is required.

    $ USD Approval route
    Synced 8:13 AM Ready for status announcements.

    Overlays and disclosures

    Disclosure content stays native-details based in the WC layer.

    Approve exception

    Capture an audit-safe explanation.

    Assign review owner

    Choose the person responsible.