Michael Farrell
Philadelphia, PA
LiteralJS Starter
A Basic Application To Help Easily Start A LiteralJS Project
May 2026
JavaScriptLiteralJSStarter Template
README
README.md
View on GitLab ā# LiteralJS Starter š
A beautiful starter template for [LiteralJS](https://literaljs.com) ā a 4.25 kB zero-dependency framework with keyed reconciliation, WeakMap events, and component memoization.

## ⨠Features
- **Cute Catppuccin Mocha design** ā Soft pastels, bouncy animations, floating shapes
- **Interactive counter demo** ā With sound effects and visual feedback
- **Copy-to-clipboard** ā Click "npm" button to copy install command
- **Sound effects** ā Animal Crossing-style bloops on every interaction
- **Responsive** ā Looks great on mobile and desktop
- **Zero config** ā Parcel handles JSX, SCSS, and bundling
## š Quick Start
```bash
# Clone this repository
git clone git@gitlab.com:mikeysax/LiteralJS-Starter.git my-app
cd my-app
# Install dependencies
npm install
# Start development server
npm start
# Open http://localhost:1234 in your browser
```
## š¦ Available Scripts
| Script | Description |
|--------|-------------|
| `npm start` | Start development server (Parcel) |
| `npm run dev` | Start and open browser |
| `npm run build-netlify` | Build for production (Netlify) |
## šØ Design System
This starter uses the **Catppuccin Mocha** palette:
| Color | Hex | Usage |
|-------|-----|-------|
| Mauve | `#cba6f7` | Primary accent, buttons |
| Pink | `#f5c2e7` | Secondary accent |
| Sky | `#89dceb` | Links, highlights |
| Green | `#a6e3a1` | Success, badges |
| Peach | `#fab387` | Warnings, tags |
| Lavender | `#b4befe` | Gradients, glows |
## š§© JSX Setup
This starter uses the `h` pragma for JSX. Configured via `.babelrc`:
```json
{
"plugins": [
["@babel/plugin-transform-react-jsx", { "pragma": "h" }],
["@babel/plugin-transform-runtime", { "regenerator": true }]
]
}
```
All JSX files must include the pragma comment:
```js
/** @jsx h */
import { component, h } from 'literaljs';
```
## š Project Structure
```
.
āāā index.html # Entry HTML with favicon
āāā index.js # Root app and global store
āāā index.scss # Global Catppuccin Mocha styles
āāā package.json # Dependencies
āāā .babelrc # JSX pragma config
āāā components/
āāā Main/
āāā index.js # Main component with counter demo
```
## šÆ Example Component
```js
/** @jsx h */
import { component, h } from 'literaljs';
export default component({
name: 'MyComponent',
state: { count: 0 },
methods() {
return {
increment() {
this.setState({ count: this.getState().count + 1 });
}
};
},
render() {
const { count } = this.getState();
return (
<div>
<p>Count: {count}</p>
<button events={{ click: () => this.increment() }}>+</button>
</div>
);
}
});
```
## ā¬ļø Upgrading LiteralJS
```bash
npm install literaljs@latest
```
See [LiteralJS Changelog](https://gitlab.com/mikeysax/LiteralJS/-/blob/master/CHANGELOG.md) for version details.
## š Links
- [LiteralJS Website](https://literaljs.com)
- [LiteralJS GitLab](https://gitlab.com/mikeysax/LiteralJS)
- [npm Package](https://www.npmjs.com/package/literaljs)
- [Catppuccin Theme](https://catppuccin.com)
## š License
MIT