sFront is a component-based, front-end, JavaScript library. Make templating easier.
sFront strives for easy integration, simplicity, and understandable syntax.
Inspired by React.
sFront.js
file to your project
ORJavaScript (.js)
file which you will use for interacting with sFrontHTML (.html/.htm)
file using a <script>
tag<script>
tag has the type
attribute set to module
(i.e. <script type="module" src="..."></script>
)In your JavaScript (.js)
file, either:
Import all of sFront by stating:
import * as sFront from "sFront.js";
You can name the sFront variable whatever you want, but ensure that you point to the correct path when importing.
OR
Import the desired sFront methods from the sFront file i.e.
import { registerElement } from "sFront.js";
If using the sFront CDN, import from https://adampodoxin.github.io/sFront/sFront.js
instead of a local file.
Examples of how to use sFront can be seen in the examples folder of the GitHub repository. The contacts list example shows the perfect way to easily use templates with sFront.