Search

Results include substring matches and semantically similar vals. Learn more
jaredsilver avatar
leadership_styles_inventory
@jaredsilver
@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";
const leadershipStyles = [
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") {
client();
export default async function server(request: Request): Promise<Response> {
NaN avatar
HelloWorld
@NaN
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react **/
import { renderToString } from "https://esm.sh/react-dom@18/server";
export default (req: Request) => {
return new Response(
yawnxyz avatar
blobbyFace
@yawnxyz
(todo) This lists all your blobs. You can create new blobs, edit them, or even preview (and upload) file blobs from both URL and computer!
HTTP
updated: false,
this.blobs[this.name] = newBlob;
// not creating this on server causes annoying side effects
await this.updateCreate(this.name);
// await this.loadBlob(this.name);
tfayyaz avatar
tldrawReactExportScript
@tfayyaz
@jsxImportSource https://esm.sh/react@18.2.0
Script
/** @jsxImportSource https://esm.sh/react@18.2.0 */
import { useState } from "https://esm.sh/react@18.2.0";
import { Tldraw } from "https://esm.sh/tldraw@2.1.0";
export function MyApp() {
heathergliffin avatar
DailyDaughterNotes
@heathergliffin
* This app generates cute daily notes for a daughter using OpenAI's GPT model. * It stores the generated notes in SQLite for persistence and displays them on a simple web interface. * The app uses React for the frontend and Deno's runtime environment in Val Town for the backend.
HTTP
* It stores the generated notes in SQLite for persistence and displays them on a simple web interface.
* The app uses React for the frontend and Deno's runtime environment in Val Town for the backend.
/** @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() {
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") { client(); }
async function server(request: Request): Promise<Response> {
iamseeley avatar
multirouteHTML
@iamseeley
๐ŸŒ Personal Website with Server-Side Active Navigation
HTTP
๐ŸŒ Personal Website with Server-Side Active Navigation
* @title Personal Website with Server-Side Active Navigation
* @description Create a personal portfolio website with multiple pages and server-side active navigation using an HTTP Val.
import { websiteStyles } from "https://esm.town/v/iamseeley/websiteStyles";
<p>${personalData.summary}</p>
<p><strong>This website is rendered server-side with pure HTML.</strong></p>
<p>Check out the <a href='https://www.val.town/v/iamseeley/multirouteHTML'>source</a> and start building your own site!
janpaul123 avatar
valle_tmp_56208884983514818093201845315532
@janpaul123
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react */
import valleGetValsContextWindow from "https://esm.town/v/janpaul123/valleGetValsContextWindow";
import archiveVal from "https://esm.town/v/nbbaier/archiveVal?v=10";
import _ from "npm:lodash@4";
import OpenAI from "npm:openai";
import { renderToString } from "npm:react-dom/server";
// Set these to your own
const username = "janpaul123";
janpaul123 avatar
valleCodemirror
@janpaul123
// const ret = await build({
Script
target: ts.ScriptTarget.ESNext,
module: ts.ModuleKind.ESNext,
jsx: ts.JsxEmit.React,
lib: ["esnext", "dom"],
moduleDetection: ModuleDetectionKind.Force,
willthereader avatar
fullWebsiteChecker
@willthereader
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react */
import * as cheerio from "https://esm.sh/cheerio";
import React, { useEffect, useState } from "https://esm.sh/react";
import { createRoot } from "https://esm.sh/react-dom/client";
console.log("Version: " + import.meta.url.match(/[?&]v=([^&]*)/)?.at(1));
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") {
client();
let currentProgress = null;
philip2050 avatar
convivialAquaFinch
@philip2050
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react **/
import { renderToString } from "https://esm.sh/react-dom@18/server";
export default (req: Request) => {
return new Response(
jxnblk avatar
snake
@jxnblk
// WIP turn-based snake game built in Val Town
HTTP
// WIP turn-based snake game built in Val Town
/** @jsxImportSource npm:preact */
import { render } from "npm:preact-render-to-string";
import prng from "npm:pure-rand";
type V2 = [number, number];
stevekrouse avatar
chatWithCerebras
@stevekrouse
An interactive, runnable TypeScript val by stevekrouse
HTTP
i++;
if (messages.length > 0) {
const client = new Cerebras();
const completionCreateResponse = await client.chat.completions.create({
messages: [
role: "system",
themostbored avatar
cerebras_coder
@themostbored
This is an AI code assistant powered by Cerebras , running llama3.3-70b. Inspired by Hassan's Llama Coder . Setup Sign up for Cerebras Get a Cerebras API Key Save it in a Val Town environment variable called CEREBRAS_API_KEY Todos I'm looking for collaborators to help. Fork & send me PRs! [ ] Experiment with two prompt chain (started here )
HTTP
/** @jsxImportSource https://esm.sh/react@18.2.0 */
import Cerebras from "https://esm.sh/@cerebras/cerebras_cloud_sdk";
import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
import { Prism as SyntaxHighlighter } from "https://esm.sh/react-syntax-highlighter";
import React, { useEffect, useState } from "https://esm.sh/react@18.2.0";
// Inline STARTER_PROMPTS to replace external import
reetkumarbind avatar
openCoralConstrictor
@reetkumarbind
@jsxImportSource https://esm.sh/react@18.2.0
HTTP
/** @jsxImportSource https://esm.sh/react@18.2.0 **/
import { renderToString } from "https://esm.sh/react-dom@18.2.0/server";
import React from "https://esm.sh/react@18.2.0";
export default (req: Request) => {
itsmikepowers avatar
ardentCrimsonTurtle
@itsmikepowers
@jsxImportSource https://esm.sh/react@18.2.0
HTTP
/** @jsxImportSource https://esm.sh/react@18.2.0 **/
import { renderToString } from "https://esm.sh/react-dom@18.2.0/server";
export default (req: Request) => {
return new Response(
โ€ฆ
66
โ€ฆ
Next