The Classic Stylesheets Toolkit
npm install cstkCSTK is the "Classic Stylesheets Toolkit". It's intended as both a simple and (hopefully) performant JSX-based frontend TypeScript library based on reactive programming, and a set of widgets, layouts and utilities for building traditional desktop GUIs for the web.
CSTK is still in the early experimental stages of development and may change or be abandoned at any time.
``tsx`
const a = bind(1);
const b = bind(2);
const c = zipWith([a, b], (a, b) => a + b);
console.log(c.value); // 3
a.value = 10
console.log(c.value); // 12
`tsx`
function Counter() {
const count = bind(0);
return ;
The count is {count}
}
- Counter (7GUIs)
- Temperature Converter (7GUIs)
`tsx
import { createElement, mount} from 'cstk';
// A component without inputs
function HelloWorld() {
return
// A component with a required input
function HelloName({name}: {
name: string,
}) {
return
// The main application component
function App() {
return
// Attach application component to the body
mount(document.body,
`
* bind()ref()
* zip()
* zipWith()
* bindList()
* p.getAndObserve()
* p.map()
* p.mapDefined()
* p.flatMap()
* p.not
* p.defined
* p.undefined
* p.eq()
* p.and()
* p.or()
* p.props
* p.orElse()
* p.await()
*
*
*
*
*
*
*