Skip to content

Getting Started

Verbose is a signal-driven frontend framework built with TypeScript. It provides fine-grained reactivity, class components with decorators, and a complete ecosystem of first-party packages.

Installation

bash
# Install the core packages
npm install @verbose/core @verbose/jsx @verbose/runtime @verbose/decorators

# Vite plugin for JSX and HMR
npm install -D @verbose/vite-plugin

Project Setup

Configure Vite to use the Verbose plugin:

ts
// vite.config.ts
import { defineConfig } from 'vite'
import { verbose } from '@verbose/vite-plugin'

export default defineConfig({
  plugins: [verbose({ hmr: true })],
})

Configure TypeScript to use the Verbose JSX runtime:

json
// tsconfig.json
{
  "compilerOptions": {
    "experimentalDecorators": true,
    "jsx": "react-jsx",
    "jsxImportSource": "@verbose/jsx"
  }
}

Your First Component

tsx
import { Component, State, Prop } from '@verbose/decorators'
import { BaseComponent } from '@verbose/decorators'

@Component({ tag: 'my-counter' })
class Counter extends BaseComponent {
  @Prop() initialCount = 0
  @State() count = this.props.initialCount

  increment() {
    this.count++
  }

  render() {
    return (
      <div>
        <p>Count: {this.count}</p>
        <button onClick={() => this.increment()}>Increment</button>
      </div>
    )
  }
}

Mounting the App

ts
import { render } from '@verbose/runtime'
import { jsx } from '@verbose/jsx'

render(<Counter initialCount={0} />, document.getElementById('app')!)

Package Overview

PackagePurpose
coreReactive primitives: signal, computed, effect, resource
composablesDOM and browser composition utilities
decoratorsClass decorators for components
jsxJSX runtime and type definitions
runtimeVNode rendering engine
storeReactive state management
routerClient-side routing
motionAnimations: tweens, springs, keyframes
fsmFinite state machines
concurrentAsync concurrency control
diDependency injection container
vite-pluginVite integration

Released under the MIT License.