starfederation / datastar

A real-time hypermedia framework.
https://data-star.dev/
MIT License
698 stars 37 forks source link

Version npm bundle size GitHub Discord

Datastar

A real-time hypermedia framework.

Datastar helps you build real-time web applications with the simplicity of server-side rendering and the power of a full-stack SPA framework.

Here’s what frontend reactivity looks like using Datastar:

<input data-model="input" type="text">
<div data-text="$input.toUpperCase()"></div>
<button data-on-click="$post('/endpoint')">Save</button>

Visit the Datastar Website »

Join the Discord Server »

Getting Started

Read the Getting Started Guide »

Contributing

Read the Contribution Guidelines »

Custom Plugins

You can manually add your own plugins to the core:

<script type="importmap">
{
    "imports": {
      "datastar": "https://cdn.jsdelivr.net/gh/starfederation/datastar/bundles/datastar-core.js"
    }
}
</script>
<script type="module">
import {Datastar} from 'datastar'

Datastar.load(
    // I can make my own plugins!
)
</script>