Search

Results include substring matches and semantically similar vals. Learn more
MrAvi avatar
handleEmail
@MrAvi
@jsxImportSource https://esm.sh/react@18.2.0
HTTP
/** @jsxImportSource https://esm.sh/react@18.2.0 */
import React, { useState, useEffect } from "https://esm.sh/react@18.2.0";
import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
// Generate trending color data
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request): Promise<Response> {
prashamtrivedi avatar
icsviewer
@prashamtrivedi
ICS Calendar Viewer A web-based calendar application for viewing ICS (iCalendar) files, deployed as a Val Town HTTP val. Features 📅 Monthly calendar view 📤 ICS file upload support 📋 ICS content paste support 🌓 Dark/Light mode 🎨 Automatic event coloring Usage Access the calendar through your Val Town HTTP val URL Upload ICS files or paste ICS content View your events on the calendar Toggle dark/light mode as needed Navigate between months Technical Details Built with React 18.2.0 and TailwindCSS Handles ICS file parsing and display No data persistence (events are stored in memory only) Fork and Modify Fork this val Make your changes Save to automatically deploy your version
HTTP
## Technical Details
- Built with React 18.2.0 and TailwindCSS
- Handles ICS file parsing and display
/** @jsxImportSource https://esm.sh/react@18.2.0 */
import React, { useState, useCallback, useEffect } from "https://esm.sh/react@18.2.0";
import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
function generateRandomColor() {
</div>
function client() {
createRoot(document.getElementById("root")).render(<Calendar />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request): Promise<Response> {
spinningideas avatar
interview_practice
@spinningideas
@jsxImportSource https://esm.sh/react@18.2.0
HTTP
/** @jsxImportSource https://esm.sh/react@18.2.0 */
import {
XCircleIcon,
} from "https://esm.sh/@heroicons/react/24/solid?deps=react@18.2.0&react-dom@18.2.0";
import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
import React, { useEffect, useRef, useState } from "https://esm.sh/react@18.2.0";
interface InterviewItem {
inputRef.current?.focus();
const handleSubmit = async (e: React.FormEvent) => {
e.preventDefault();
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request): Promise<Response> {
janpaul123 avatar
VALLErun
@janpaul123
The actual code for VALL-E: https://www.val.town/v/janpaul123/VALLE
HTTP
/** @jsxImportSource https://esm.sh/react */
import { renderToString } from "npm:react-dom/server";
consider it part of the current conversation. The conversation below is your recent interaction with the user.
You can use React but you don't have to.
currentCode = `/** @jsxImportSource https://esm.sh/react */
import React from "npm:react";
import { renderToString } from "npm:react-dom/server";
You can use React but you don't have to.
DON'T respond with a preamble (aside from saying "Certainly", "Of course", "Let's do it", or something similar) or further ex
/** @jsxImportSource https://esm.sh/react */
shrirudragoud avatar
modernSalesCRM
@shrirudragoud
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react */
import React, { useState, useEffect } from "https://esm.sh/react";
import { createRoot } from "https://esm.sh/react-dom/client";
function Button({ children, onClick, className = '' }) {
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request): Promise<Response> {
muhammad_owais_warsi avatar
Spline
@muhammad_owais_warsi
Spline
HTTP
/** @jsxImportSource https://esm.sh/react */
import React, { useEffect, useState } from "https://esm.sh/react";
import { createRoot } from "https://esm.sh/react-dom/client";
function App() {
// Load the Spline component dynamically
import("https://esm.sh/@splinetool/react-spline@2.2.6")
.then((module) => {
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") { client(); }
async function server(request: Request): Promise<Response> {
sharanbabu avatar
knowledgeExplorer
@sharanbabu
* This val creates a modern, stylish knowledge explorer using the Cerebras LLM API. * It allows users to enter a topic or select from suggestions, displays information in a centered card, * and enables exploration of related topics or deeper dives using arrow keys or buttons.
HTTP
* and enables exploration of related topics or deeper dives using arrow keys or buttons.
/** @jsxImportSource https://esm.sh/react@18.2.0 */
import React, { useState, useEffect, useCallback } from "https://esm.sh/react@18.2.0";
import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
const SUGGESTIONS = ["Quantum Computing", "Renaissance Art", "Climate Change", "Artificial Intelligence", "Space Exploration"
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") {
client();
async function server(request: Request): Promise<Response> {
const Cerebras = (await import("https://esm.sh/@cerebras/cerebras_cloud_sdk")).default;
const client = new Cerebras({
apiKey: Deno.env.get("CEREBRAS_API_KEY"),
try {
const completion = await client.chat.completions.create({
messages: [
keo avatar
spaceTradersStatusTable
@keo
Simple Space Traders API status table. 100% generated by Townie AI.
HTTP
/** @jsxImportSource https://esm.sh/react@18.2.0 */
import React, { useState, useEffect } from "https://esm.sh/react@18.2.0";
import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
function StatusTable() {
return <StatusTable />;
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request): Promise<Response> {
all avatar
excaliGrid
@all
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react */
import React, { useCallback, useEffect, useState } from "https://esm.sh/react";
import { createRoot } from "https://esm.sh/react-dom/client";
function ExcalidrawCanvas({ name, url, onRemove, onRename, onUrlChange }) {
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") {
client();
export default async function server(request: Request): Promise<Response> {
breeze4 avatar
bigFuchsiaHalibut
@breeze4
* This React app creates a search interface with a navbar and two equal-width panels. * It includes a search input on the left and displays search results as cards on the right. * The search functionality is simulated with a static list of items.
HTTP
* This React app creates a search interface with a navbar and two equal-width panels.
* It includes a search input on the left and displays search results as cards on the right.
* The search functionality is simulated with a static list of items.
/** @jsxImportSource https://esm.sh/react */
import React, { useState } from "https://esm.sh/react";
import { createRoot } from "https://esm.sh/react-dom/client";
// Simulated data for search results
cursor: 'pointer',
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") { client(); }
async function server(request: Request): Promise<Response> {
Bella_s avatar
glowingText
@Bella_s
@jsxImportSource https://esm.sh/react@18.2.0
HTTP
/** @jsxImportSource https://esm.sh/react@18.2.0 */
import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
import React, { useEffect, useState } from "https://esm.sh/react@18.2.0";
function App() {
transition: "background-color 0.3s",
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request): Promise<Response> {
rozek avatar
GDI_AnalogClock
@rozek
This val is part of a series of examples to introduce "val.town" in my computer science course at Stuttgart University of Applied Sciences . The idea is to motivate even first-semester students not to wait but to put their ideas into practice from the very beginning and implement web apps with frontend and backend. It contains a very simple (but still a bit visually impressive) web page with an analog clock showing the current time - made using Townie. This val is licensed under the MIT License.
HTTP
/** @jsxImportSource https://esm.sh/react */
import React, { useState, useEffect } from "https://esm.sh/react";
import { createRoot } from "https://esm.sh/react-dom/client";
function AnalogClock({ time }) {
</div>
function client() {
const root = document.getElementById('root');
if (typeof document !== "undefined") {
client();
export default async function server(request: Request): Promise<Response> {
easrng avatar
preactWebApp
@easrng
@easrng.preactWebApp Make a web app on val.town with server-side rendered Preact components
Script
# @easrng.preactWebApp
[![Example](https://easrng-button.express.val.run/Example)](https://www.val.town/v/easrng.examplePreactWebApp/)
Make a web app on val.town with server-side rendered Preact components
export const preactWebApp = (function () {
| import("npm:preact@10.17.0").VNode<
import("npm:preact@10.17.0").Attributes
| import("npm:preact@10.17.0").VNode<
import("npm:preact@10.17.0").Attributes
& typeof import("npm:preact@10.17.0")
& typeof import("npm:preact@10.17.0/hooks");
const preactWebApp =
(App: (_: propType) => import("npm:preact@10.17.0").VNode) =>
const preact = await import("npm:preact@10.17.0");
eligosmlytics avatar
versatileBlackKite
@eligosmlytics
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react */
import React, { useState, useEffect } from "https://esm.sh/react";
import { createRoot } from "https://esm.sh/react-dom/client";
function App() {
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request): Promise<Response> {
nbbaier avatar
sqliteExplorerApp
@nbbaier
SQLite Explorer View and interact with your Val Town SQLite data. It's based off Steve's excellent SQLite Admin val, adding the ability to run SQLite queries directly in the interface. This new version has a revised UI and that's heavily inspired by LibSQL Studio by invisal . This is now more an SPA, with tables, queries and results showing up on the same page. Install Install the latest stable version (v86) by forking this val: Authentication Login to your SQLite Explorer with password authentication with your Val Town API Token as the password. Todos / Plans [ ] improve error handling [ ] improve table formatting [ ] sticky table headers [x] add codemirror [ ] add loading indication to the run button (initial version shipped) [ ] add ability to favorite queries [ ] add saving of last query run for a table (started) [ ] add visible output for non-query statements [ ] add schema viewing [ ] add refresh to table list sidebar after CREATE/DROP/ALTER statements [ ] add automatic execution of initial select query on double click [x] add views to the sidebar [ ] add triggers to sidebar [ ] add upload from SQL, CSV and JSON [ ] add ability to connect to a non-val town Turso database [x] fix wonky sidebar separator height problem (thanks to @stevekrouse) [x] make result tables scrollable [x] add export to CSV, and JSON (CSV and JSON helper functions written in this val . Thanks to @pomdtr for merging the initial version!) [x] add listener for cmd+enter to submit query
HTTP
- [ ] add schema viewing
- [ ] add refresh to table list sidebar after `CREATE/DROP/ALTER` statements
- [ ] add automatic execution of initial select query on double click
- [x] add views to the sidebar
- [ ] add triggers to sidebar
- [ ] add upload from SQL, CSV and JSON
- [ ] add ability to connect to a non-val town Turso database
- [x] fix wonky sidebar separator height problem (thanks to @stevekrouse)
- [x] make result tables scrollable
return c.render(
<main class="sidebar-layout">
<div class="sidebar">
<TablesList tables={[...tables, ...views]}></TablesList>
<Separator direction="horizontal"></Separator>
<div class="not-sidebar">
<EditorSection />