Skip to content

Installation

SalsaFX is distributed as the npm package @salsafx/ui.

Release@salsafx/uiv4.62.3


  • Node.js 18 or later
  • npm, pnpm, yarn, or bun
  • A project using Lit (peer dependency) or any framework that supports Web Components

  1. Install the package

    Terminal window
    npm install @salsafx/ui

    After installation, your package.json will contain:

    {
    "dependencies": {
    "@salsafx/ui": "^4.11.0"
    }
    }
  2. Install the peer dependency

    SalsaFX requires Lit:

    Terminal window
    npm install lit

Register all components with a single import in your app entry (Vite, webpack, …):

import '@salsafx/ui';

Once imported, the components are available as standard HTML custom elements:

<fx-radial-gauge
value="75"
min="0"
max="100"
label="Oil Pressure"
unit="BAR"
></fx-radial-gauge>

SalsaFX components are standard Web Components and work in any framework:

// React
import '@salsafx/ui';
export function Dashboard() {
return (
<fx-radial-gauge value={75} label="Oil Pressure" unit="BAR" />
);
}
<!-- Vue -->
<script setup>
import '@salsafx/ui';
</script>
<template>
<fx-radial-gauge :value="75" label="Oil Pressure" unit="BAR" />
</template>

Terminal window
npm update @salsafx/ui

The package includes TypeScript declarations. No additional @types package is needed.

import type { FxRadialGauge } from '@salsafx/ui';
const gauge = document.querySelector('fx-radial-gauge') as FxRadialGauge;
gauge.value = 80;