Skip to content

Simple frontend library ceneted around using JSX-style documents with DOM manipulation. Precursor to Web Components.

Notifications You must be signed in to change notification settings

AdamPodoxin/sFront

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sFront: simple Front-end

sFront is a component-based, front-end, JavaScript library. Make templating easier.

sFront strives for easy integration, simplicity, and understandable syntax.


Inspired by React.


Installation

  1. Create a new JavaScript (.js) file which you will use for interacting with sFront
  2. Inlcude this file in your HTML (.html/.htm) file using a <script> tag
  3. Ensure that the <script> tag has the type attribute set to module (i.e. <script type="module" src="..."></script>)

Integration

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

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.

About

Simple frontend library ceneted around using JSX-style documents with DOM manipulation. Precursor to Web Components.

Topics

Resources

Stars

Watchers

Forks