# Preact
(opens new window) (opens new window) (opens new window) (opens new window)
ActiveWidgets Datagrid for Preact.
ATTENTION!
This package requires dependencies under ⚠️ FREE TRIAL/COMMERCIAL license. You have to purchase a license (opens new window) for each developer in your team before including this package in your application.
The library is available as an NPM package and over ActiveWidgets CDN.
> npm install --save @activewidgets/preact
# NPM package
The main module exports ActiveWidgets component classes.
import { Datagrid } from "@activewidgets/preact";
The css files are imported as dependencies - your bundler/build script should be configured to process css imports.
# Separate JS, CSS
If you build js and css separately - use @activewidgets/preact/js
and @activewidgets/preact/css
modules.
import { Datagrid } from "@activewidgets/preact/js"; // code
import "@activewidgets/preact/css"; // stylesheets
# Bundle
There is also a bundle
module, which includes stylesheets as a string inside the javascript code and automatically injects them as a <style> tag into the page <head>.
import { Datagrid } from "@activewidgets/preact/bundle";
This is the simplest if your build script does not like css imports.
# CDN links
For quick prototyping the package is also availble over ActiveWidgets CDN -
<script src="https://cdn.activewidgets.com/preact"></script>
or, if you prefer separate js/css -
<link href="https://cdn.activewidgets.com/preact/ax.css" rel="stylesheet" />
<script src="https://cdn.activewidgets.com/preact/ax.js"></script>
which redirect to the latest version -
<script src="https://cdn.activewidgets.com/preact@3.0.0/bundle.js"></script>
or
<link href="https://cdn.activewidgets.com/preact@3.0.0/ax.css" rel="stylesheet" />
<script src="https://cdn.activewidgets.com/preact@3.0.0/ax.js"></script>
Use ActiveWidgets.Preact
global namespace with CDN packages.
const { Datagrid } = ActiveWidgets.Preact;
# Components
Export | Description |
---|---|
Datagrid | Datagrid component |
Row | Row component |