Content Input Showcase

Variables

Edit JSON

Data Upload

{
aaaa
:

Edit Key

5

Edit Item


bbbb
:

Edit Key

"Hello"

Edit Item


cccc
:

Edit Key

false

Edit Item


dddd
:

Edit Key

[
false

Edit Item

false

Edit Item

false

Edit Item

true

Edit Item

]

Edit Item


eeee
:

Edit Key

[
{
team
:

Edit Key

"Albuquerque"

Edit Item


points
:

Edit Key

2378

Edit Item


}
{
team
:

Edit Key

"Atlanta"

Edit Item


points
:

Edit Key

2134

Edit Item


}
{
team
:

Edit Key

"Austin"

Edit Item


points
:

Edit Key

1539

Edit Item


}
{
team
:

Edit Key

"Baltimore"

Edit Item


points
:

Edit Key

423

Edit Item


}
{
team
:

Edit Key

"Baton Rouge"

Edit Item


points
:

Edit Key

453

Edit Item


}
{
team
:

Edit Key

"Boise"

Edit Item


points
:

Edit Key

2700

Edit Item


}
{
team
:

Edit Key

"Boston"

Edit Item


points
:

Edit Key

4105

Edit Item


}
{
team
:

Edit Key

"Buffalo"

Edit Item


points
:

Edit Key

3645

Edit Item


}
{
team
:

Edit Key

"Calgary"

Edit Item


points
:

Edit Key

1619

Edit Item


}
{
team
:

Edit Key

"Charleston"

Edit Item


points
:

Edit Key

1779

Edit Item


}
{
team
:

Edit Key

"Charlotte"

Edit Item


points
:

Edit Key

973

Edit Item


}
{
team
:

Edit Key

"Chicago"

Edit Item


points
:

Edit Key

4003

Edit Item


}
{
team
:

Edit Key

"Cincinnati"

Edit Item


points
:

Edit Key

1347

Edit Item


}
{
team
:

Edit Key

"Cleveland"

Edit Item


points
:

Edit Key

4512

Edit Item


}
{
team
:

Edit Key

"Columbus"

Edit Item


points
:

Edit Key

3895

Edit Item


}
{
team
:

Edit Key

"Dallas"

Edit Item


points
:

Edit Key

2683

Edit Item


}
{
team
:

Edit Key

"Denver"

Edit Item


points
:

Edit Key

4989

Edit Item


}
{
team
:

Edit Key

"Detroit"

Edit Item


points
:

Edit Key

1523

Edit Item


}
{
team
:

Edit Key

"El Paso"

Edit Item


points
:

Edit Key

1634

Edit Item


}
{
team
:

Edit Key

"Fargo"

Edit Item


points
:

Edit Key

4409

Edit Item


}
{
team
:

Edit Key

"Fresno"

Edit Item


points
:

Edit Key

4058

Edit Item


}
{
team
:

Edit Key

"Houston"

Edit Item


points
:

Edit Key

1285

Edit Item


}
{
team
:

Edit Key

"Indianapolis"

Edit Item


points
:

Edit Key

2169

Edit Item


}
{
team
:

Edit Key

"Jacksonville"

Edit Item


points
:

Edit Key

2999

Edit Item


}
{
team
:

Edit Key

"Kansas City"

Edit Item


points
:

Edit Key

435

Edit Item


}
{
team
:

Edit Key

"Las Vegas"

Edit Item


points
:

Edit Key

3943

Edit Item


}
{
team
:

Edit Key

"Los Angeles"

Edit Item


points
:

Edit Key

4822

Edit Item


}
{
team
:

Edit Key

"Louisville"

Edit Item


points
:

Edit Key

2118

Edit Item


}
{
team
:

Edit Key

"Memphis"

Edit Item


points
:

Edit Key

1596

Edit Item


}
{
team
:

Edit Key

"Miami"

Edit Item


points
:

Edit Key

1863

Edit Item


}
{
team
:

Edit Key

"Milwaukee"

Edit Item


points
:

Edit Key

1680

Edit Item


}
{
team
:

Edit Key

"Minneapolis"

Edit Item


points
:

Edit Key

2228

Edit Item


}
{
team
:

Edit Key

"Nashville"

Edit Item


points
:

Edit Key

2135

Edit Item


}
{
team
:

Edit Key

"New Orleans"

Edit Item


points
:

Edit Key

307

Edit Item


}
{
team
:

Edit Key

"New York"

Edit Item


points
:

Edit Key

3106

Edit Item


}
{
team
:

Edit Key

"Oakland"

Edit Item


points
:

Edit Key

1094

Edit Item


}
{
team
:

Edit Key

"Oklahoma City"

Edit Item


points
:

Edit Key

3275

Edit Item


}
{
team
:

Edit Key

"Omaha"

Edit Item


points
:

Edit Key

4650

Edit Item


}
{
team
:

Edit Key

"Orlando"

Edit Item


points
:

Edit Key

2098

Edit Item


}
{
team
:

Edit Key

"Philadelphia"

Edit Item


points
:

Edit Key

1914

Edit Item


}
{
team
:

Edit Key

"Phoenix"

Edit Item


points
:

Edit Key

4224

Edit Item


}
{
team
:

Edit Key

"Pittsburgh"

Edit Item


points
:

Edit Key

4511

Edit Item


}
{
team
:

Edit Key

"Portland"

Edit Item


points
:

Edit Key

4970

Edit Item


}
{
team
:

Edit Key

"Raleigh"

Edit Item


points
:

Edit Key

1271

Edit Item


}
{
team
:

Edit Key

"Reno"

Edit Item


points
:

Edit Key

3504

Edit Item


}
{
team
:

Edit Key

"Richmond"

Edit Item


points
:

Edit Key

4317

Edit Item


}
{
team
:

Edit Key

"Sacramento"

Edit Item


points
:

Edit Key

3603

Edit Item


}
{
team
:

Edit Key

"Salt Lake City"

Edit Item


points
:

Edit Key

1178

Edit Item


}
{
team
:

Edit Key

"San Antonio"

Edit Item


points
:

Edit Key

1477

Edit Item


}
{
team
:

Edit Key

"San Diego"

Edit Item


points
:

Edit Key

2691

Edit Item


}
{
team
:

Edit Key

"San Francisco"

Edit Item


points
:

Edit Key

2836

Edit Item


}
{
team
:

Edit Key

"San Jose"

Edit Item


points
:

Edit Key

2728

Edit Item


}
{
team
:

Edit Key

"Santa Fe"

Edit Item


points
:

Edit Key

3931

Edit Item


}
{
team
:

Edit Key

"Seattle"

Edit Item


points
:

Edit Key

1781

Edit Item


}
{
team
:

Edit Key

"St. Louis"

Edit Item


points
:

Edit Key

3088

Edit Item


}
{
team
:

Edit Key

"Tampa"

Edit Item


points
:

Edit Key

179

Edit Item


}
{
team
:

Edit Key

"Toledo"

Edit Item


points
:

Edit Key

4084

Edit Item


}
{
team
:

Edit Key

"Toronto"

Edit Item


points
:

Edit Key

0

Edit Item


}
]

Edit Item


}

Example

div

qtfdezhp

Add Child Element

No available elements found

section

tajkrrsj

Add Child Element

No available elements found

h2

kxfvkedb

Add Child Element

No available elements found

base_text

qqglxnco

Add Child Element

No available elements found

youtube_video

tjcehxeb

Add Child Element

No available elements found

section

ehkvhkwa

Add Child Element

No available elements found

h2

eokuzawt

Add Child Element

No available elements found

base_text

vyhslkus

Add Child Element

No available elements found

p

rpetxxbn

Add Child Element

No available elements found

base_text

lvozlxpc

Add Child Element

No available elements found

link

nhihtsqe

Add Child Element

No available elements found

base_text

zyyxwumf

Add Child Element

No available elements found

section

ediedjta

Add Child Element

No available elements found

h2

aycvrubd

Add Child Element

No available elements found

base_text

vmykssyg

Add Child Element

No available elements found

p

qpyzehoj

Add Child Element

No available elements found

base_text

ncuqmdzu

Add Child Element

No available elements found

p

rxajadec

Add Child Element

No available elements found

base_text

xlxorjvl

Add Child Element

No available elements found

link

bdhqknan

Add Child Element

No available elements found

base_text

agoyrhdq

Add Child Element

No available elements found

p

wklukwyf

Add Child Element

No available elements found

base_text

lrbjyzss

Add Child Element

No available elements found

section

hbqkjhhy

Add Child Element

No available elements found

h2

hrynnlcn

Add Child Element

No available elements found

base_text

yeczsxvq

Add Child Element

No available elements found

p

hendabql

Add Child Element

No available elements found

base_text

kgupnngr

Add Child Element

No available elements found

link

evdwsopr

Add Child Element

No available elements found

base_text

vvktyfjf

Add Child Element

No available elements found

link

gzsqfwtr

Add Child Element

No available elements found

base_text

fokevalf

Add Child Element

No available elements found

p

uoeivoif

Add Child Element

No available elements found

base_text

endxliqk

Add Child Element

No available elements found

link

njfzxryi

Add Child Element

No available elements found

base_text

tusmvxzf

Add Child Element

No available elements found

section

ekkurnwd

Add Child Element

No available elements found

h2

utqydrdm

Add Child Element

No available elements found

base_text

iskvhbcd

Add Child Element

No available elements found

p

pusldsji

Add Child Element

No available elements found

base_text

rhlxlevd

Add Child Element

No available elements found

link

thyljaur

Add Child Element

No available elements found

base_text

xfitwoqu

Add Child Element

No available elements found

p

bicqwggm

Add Child Element

No available elements found

base_text

tgejyjij

Add Child Element

No available elements found

section

rpsvmmsm

Add Child Element

No available elements found

h2

bfispmyg

Add Child Element

No available elements found

base_text

ryhnqolk

Add Child Element

No available elements found

p

xlxjlyom

Add Child Element

No available elements found

base_text

euxxfcpo

Add Child Element

No available elements found

code_inline

yklgwlfi

Add Child Element

No available elements found

base_text

ahjxjyfm

Add Child Element

No available elements found

p

irwehmuw

Add Child Element

No available elements found

base_text

fcbwdhkz

Add Child Element

No available elements found

p

psuhvlcm

Add Child Element

No available elements found

base_text

afiisndj

Add Child Element

No available elements found

code_inline

blvvjzgm

Add Child Element

No available elements found

base_text

itdiqwxz

Add Child Element

No available elements found

section

lffhdqof

Add Child Element

No available elements found

h2

ltpaxcei

Add Child Element

No available elements found

base_text

ttrweabn

Add Child Element

No available elements found

p

qovvxzdm

Add Child Element

No available elements found

base_text

pnhuobtu

Add Child Element

No available elements found

section

qrkbbsqr

Add Child Element

No available elements found

h2

sryywfso

Add Child Element

No available elements found

base_text

zrxwzrnb

Add Child Element

No available elements found

p

ybzrdskl

Add Child Element

No available elements found

base_text

ybajubdj

Add Child Element

No available elements found

link

nqecfvfe

Add Child Element

No available elements found

base_text

hxngmmfu

Add Child Element

No available elements found

link

zrbadtzz

Add Child Element

No available elements found

base_text

bsoqgbyf

Add Child Element

No available elements found

p

tjddadxe

Add Child Element

No available elements found

base_text

rdbjmewj

Add Child Element

No available elements found

link

cpnybkoz

Add Child Element

No available elements found

base_text

laawbzfg

Add Child Element

No available elements found

p

winpozaz

Add Child Element

No available elements found

base_text

lkpgxnua

Add Child Element

No available elements found

p

ulfeqmfv

Add Child Element

No available elements found

base_text

hnochyxt

Add Child Element

No available elements found

section

bejqtxts

Add Child Element

No available elements found

h2

xqnncyby

Add Child Element

No available elements found

base_text

ddiwhcra

Add Child Element

No available elements found

p

xygicvcv

Add Child Element

No available elements found

base_text

bhxscmfq

Add Child Element

No available elements found

link

ababkome

Add Child Element

No available elements found

base_text

elgvajqa

Add Child Element

No available elements found

p

txsgrcrz

Add Child Element

No available elements found

base_text

myafcruh

Add Child Element

No available elements found

p

wpgwzymz

Add Child Element

No available elements found

base_text

bnjdfrjn

Add Child Element

No available elements found

section

yrbajwld

Add Child Element

No available elements found

h2

ysjyhdtn

Add Child Element

No available elements found

base_text

wkhevkrc

Add Child Element

No available elements found

p

idfqxmgg

Add Child Element

No available elements found

base_text

wxmnsdde

Add Child Element

No available elements found

link

asimpyjl

Add Child Element

No available elements found

base_text

zlfmfzwr

Add Child Element

No available elements found

link

xbpnjaoo

Add Child Element

No available elements found

base_text

alzekgmb

Add Child Element

No available elements found

YouTube version of this Post

Customize Site

This guide largely builds off of the Quick Start Guide

Link Preview

Quick Start Guide

https://www.contibase.com/blog/quick-start-guide

. If you haven't seen that, start there and then come back to this part.

Make your Brand Icon

Keep it simple. Use 1-3 colors and a few shapes. Don't include text in the icon. This will result in better viewing from a distance because it will often be used in small areas such as a browser tab.

Use the Contibase Image Generator

Link Preview

Contibase Image Generator

https://www.contibase.com/tools/image-generator

to generate an icon image. You can try something like "Make a simple, flat SVG icon for my site about ________. Keep it very simple. A flat SVG with 1-3 colors and 1-3 shapes. Use a white background."

Crop into a square icon image with slim padding. Download the image.

Turn your Icon Image into an SVG

Switch to the Contibase Image to SVG

Link Preview

Contibase Image to SVG

https://www.contibase.com/tools/image-to-svg

tool and convert to a SVG. Alternatively, if you are graphically skilled you can draw over the image and create the SVG yourself in a tool like Affinity Designer

Link Preview

Affinity Designer

https://affinity.serif.com/en-us/designer/

.

Export your design as an SVG. In the export options select "flatten" if its unchecked. And check viewbox. Optimize your SVG code using SVG Optimizer

Link Preview

SVG Optimizer

https://www.contibase.com/tools/svg-optimizer

. Delete any backgrounds and add a new, clean one in the editor.

Generate Favicons

Go to the Favicon Generator

Link Preview

Favicon Generator

https://www.contibase.com/tools/favicon-generator

. Paste your <svg>...</svg> code in. (Make sure there is a <rect> background with an id starting with "bg-"). Type your brand name and generate the favicons. This also generates other useful media such as thumbnails and useful icon images.

Download your favicons. Drag all files into the /static folder and overwrite the defaults.

Fix app.html and Website Logo

Back in your project in VS Code, update

src/lib/components/Logo/index.svelte
to use your new logo. Paste the generated component from the favicon generator.

Go to your app.html and paste the generated version from the Favicon Generator.

Go to

src/routes/+layout.svelte
. Scroll down to the <style> CSS and find :root { --primary-c: var(--c10); --primary-h: var(--h18); } and change the number in "--primary-h: var(--h18);" to a number 0-24 that matches your brands primary hue.

Add Icon and Full Logo to Contibase

Go to contibase.com/settings and click branding. Use the favicon.webp file for the icon. The for the full logo use full_logo.webp. This will be used at the top of emails you send when toggled on in the page.

Project Structure & Stack

Your site uses SvelteKit

Link Preview

SvelteKit

https://svelte.dev/docs/kit/introduction

along with the Sveltekit-UI

Link Preview

Sveltekit-UI

https://www.sveltekit-ui.com

component library. At this point you'll need to get into the coding side of things a bit. Use your resources and chip away a little progress each day. Ask AI for help with any questions. Keep in mind some AI likes to use old svelte, so make sure to use svelte 5 (the latest version as of 2025) if you start using AI.

It's kind of experimental at the moment, but for building your components this tool, SvelteKit-UI Code Generator

Link Preview

SvelteKit-UI Code Generator

https://www.contibase.com/code_generator

, may help you get an idea for how I like structuring my code. The concept is inspired from Object-Oriented Programming, talks by Alan Kay, and other things over time.

Building "managers" for each component with logic encapsulated within, exposing state and methods, leads to a clean code structure where all logic can be assembled into one parent manager at the root of each +page.svelte. The manager is instantiated on page load in the <script> tag and is passed as a manager prop into the HTML. This avoids "prop drilling" and deeply nested bindings.

You are free to write code in any way you find appealing. You are in charge. I am just sharing the way I've found to make the most sense.

Publish Your Live Website

If you havent already, create an account on Vercel

Link Preview

Vercel

https://vercel.com

. If you already bought your domain on Vercel, even better. You can also transfer your domain purchased elsewhere to Vercel. I just like things as simple as possible and find keeping everything on Vercel to be best.

In Vercel connect to your Github account and set your "main" branch to be used in production. Connect your domain name to this deployment. Anytime you push to main you will automatically trigger a build and you will see on your live website a couple minutes later pending no errors.

Vercel Analytics is already configured in the code but you'll need to toggle on that feature in your Vercel Dashboard. You'll also want to copy the environment variables we used in the .env file and paste them in the Vercel project settings in the Environment variables page.

Check Final Example Tutorial Code

The live version of the code from this tutorial project can be found at Live Github Code

Link Preview

Live Github Code

https://github.com/upppllc/survivorsnuff

. It includes changes beyond this stage of the tutorial. The live site is survivorsnuff.com

Link Preview

survivorsnuff.com

https://www.survivorsnuff.com

.

Edit Attributes

Element ID

Markdown to astc

Note: for valid json make sure all keys and strings are in double quotes, and no trailing commas. example:

{
  "type_id": "div",
  "children": []
}
  

Input Type:

Component Documentation

Component Name

ContentInput

Builder Function Name

create_content_input_manager

Description

offers a panel builder for creating and editing a nested content structure (ASTC format) with interactive insertion, removal, and attribute editing of various node types

Use like example

Config

PropertyTypeDefaultDescription
valobject

the initial top-level ASTC node

on_changefunction

callback triggered when the ASTC structure changes

on_finishfunction

callback triggered when the user finishes editing

on_eventfunction

callback invoked for certain child content manager events

definition_stackany

external definition_stack variables object for show_conditions or other variable-based usage

mapkit_js_tokenstring

token for mapkit if needed by location-based nodes

storageany

storage definition used when uploading or managing files

storage_default_folder_pathstring

default folder path for storage uploads

storage_pathstring

template path for retrieving stored media if needed by child nodes

Methods

MethodDescriptionParametersReturns
init

initial setup; stores the initial value, populates managers, and sets the selected version to 0

config: object

void
clean_content

validates a node's type, ensures allowed attributes, and recursively computes text stats

val: object

object with { warnings, word_count, character_count, embedding_text, total_elements, total_nests, val }
add_version

inserts a new version of the ASTC into the version stack, triggers on_change if provided

version: object

void
finish

calls on_finish with the current astc structure

No Params

void
copy_markdown

copies the entire current ASTC as markdown to clipboard

No Params

void
copy_astc

copies the entire current ASTC (json) to clipboard

No Params

void
copy_text

copies an embedding-friendly text representation of the ASTC to clipboard

No Params

void
set_focused_selector_id

tracks which selector id is currently focused in the UI

selector_id: string

void
open_edit_markdown_modal

opens a popover with the current ASTC as markdown, allowing direct editing/replacement

No Params

void
set_astc_from_markdown

parses markdown (or astc) from a text area, updates the current version with that content

No Params

void
initiate_add_sibling_el_to_selector

prompts the user to add a sibling node right below a given selector id

selector_id: string

void
add_sibling_el

creates a new sibling node (or uses a provided astc node) below the specified selector id

selector_id: string

el_type_id: string | null

element_to_add: object

void
initiate_add_child_el_to_selector

prompts the user to add a child node under a given selector id

selector_id: string

void
add_child_el

creates a new child node of the specified type, appended to an element’s children array

selector_id: string

type_id: string

void
add_astc_to_element_children

directly appends a parsed ASTC string as a child to a given element’s children array

element: object

void
copy_element_astc

copies the ASTC json for a specific node identified by selector_id

selector_id: string

void
copy_element_markdown

copies the markdown representation for a specific node identified by selector_id

selector_id: string

void
shift_el

moves a node up or down within its siblings by a specified integer offset

selector_id: string

i_shift: number

void
delete_el

removes a node by selector_id from the current ASTC

selector_id: string

void
open_edit_element_attributes_popover

opens an attribute editor popover for a given node identified by selector_id

selector_id: string

void
set_element_attribute

sets a single attribute on a node identified by selector_id

selector_id: string

attribute: string

val: any

void
set_element_attributes

overwrites the attributes object for a node identified by selector_id

selector_id: string

new_attributes: object

void
pass_event_down

propagates external events through the content manager, used by child components for updates

input: object

void
get_new_element_to_add

creates a blank node of the specified type, initializing children & attributes from node_types

type_id: string

object
calc_child_element_options

determines the set of valid child node types that can be appended to a given element

element: object

is_sibling: boolean

array of available type_ids

Returned Properties

PropertyTypeDescription
idstring

unique identifier for this content input instance

valobject

the current ASTC version being displayed

variables_data_typeany

the data-type object used for attribute editing

variablesany

the variables reference for conditions or loops

versions_lennumber

the total number of versions in the version stack

selected_version_preppedobject

the currently selected version in a processed/prepped form

storageany

storage definition object if used for file management

storage_default_folder_pathstring

default folder path for storage

focused_selector_idstring

tracks the selector id of the currently focused node

paste_astc_markdown_popover_managerobject

popover manager for switching between astc or markdown input

paste_astc_markdown_location_to_add_elementobject

stores the context of adding astc/markdown content as child or sibling

paste_astc_markdown_dropdown_managerobject

dropdown manager to select 'astc' or 'markdown' as input

paste_astc_markdown_text_input_managerobject

text input manager containing either markdown or a raw astc object

paste_astc_markdown_finish_button_managerobject

button manager to finalize the markdown/astc insertion

location_to_add_elementstring

tracks where a new element is inserted: 'child' or 'sibling'

astc_element_stringstring

transient state for storing raw astc text being inserted

all_selector_idsarray

list of all selector ids found in the current ASTC

preempt_add_first_element_button_managerobject

button manager offering to add the very first element if none exists

first_el_add_element_managerobject

add element manager used for adding an initial node

content_managerobject

the underlying content manager that renders the ASTC

content_overall_managerobject

an object with references for handling focus and attribute editing popovers

attributes_inputobject

the manager for attributes editing popover

icon
Sponsored byContibase