datastar

module
v0.21.0-beta2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2024 License: MIT

README

Version npm bundle size GitHub Discord GitHub Repo stars

Datastar

The hypermedia framework.

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

Getting started is as easy as adding a single script tag to your HTML.

<script type="module" src="https://cdn.jsdelivr.net/gh/starfederation/datastar/bundles/datastar.js"></script>

Then start adding frontend reactivity using declarative data-* attributes.

<input data-bind-title type="text">
<div data-text="title.value.toUpperCase()"></div>
<button data-on-click="sse('/endpoint', {method: 'post'})">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>

Directories

Path Synopsis
cmd/build command
sdk
go
tests module
cmd/site command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL