@swim/web implements a thin web application framework built on the
@swim/ui toolkit. @swim/web makes it easy to embed
views and @swim/ux
widgets in any web page by simply adding special
swim- attributes to ordinary
HTML elements. @swim/web is a part of the broader
The @swim/web umbrella package depends on, and re-exports, the following component libraries:
For an npm-managed project,
npm install @swim/web to make it a dependency.
TypeScript sources will be installed into
node_modules/@swim/web/lib/main. And a pre-built UMD script, which
bundles all @swim/web component libraries, can be found in
Browser applications can load
swim-web.js, along with its
swim-ui.js dependencies, from the Swim CDN.
<script src="https://cdn.swim.ai/js/latest/swim-core.js"></script> <script src="https://cdn.swim.ai/js/latest/swim-ui.js"></script> <script src="https://cdn.swim.ai/js/latest/swim-web.js"></script>
Alternatively, the standalone
swim-system.js script may be loaded
from the Swim CDN, which bundles @swim/web together with all other
@swim/web can be imported as an ES6 module from TypeScript and other
ES6-compatible environments. All component libraries are re-exported by
import * as swim from "@swim/web";
@swim/web can also be used with CommonJS-compatible module systems.
All component libraries are re-exported by the umbrella
var swim = require("@swim/web");
When loaded by a web browser, the
swim-web.js script adds all component
library exports to the global
swim namespace. The
swim-ui.js have already been loaded.
swim-system.js script also adds all @swim/web component library
exports to the global
swim namespace, making it a drop-in replacement
swim-web.js when additional @swim/system frameworks are needed.