Soft Hours Diary logoSoft Hours Diary / Docs
API HomePlayground ↗GitHub ↗
Copy / Open with AI ▾
Export this guide
Download full AI context (.md)
Continue with AI
START HERE · QUICK START

Quick Start Guide

Go from a short asset ID to a working image in five steps. Start with a direct URL, then add the helper library when you need reusable components.

Public CDNHelper v1.0.0No API key

Before you start

You need an asset type, a quality value and an asset ID. No API key, account or package installation is required to display a single image. The simplest option is a direct image URL; add the JavaScript helper when you want reusable URL generation or custom elements.

Fastest route: open the playground, choose an asset and copy the resulting HTML snippet.

Step 1 — Choose an asset family

Asset familytypeID exampleUse case
Emojiemoji1f632Reactions, mood indicators, content UI
Flag SVGflagINLanguage or country selection
Flag iconflagsINCompact country labels and chips

Step 2 — Choose a quality

Emoji assets support svg and png. Flag SVG supports s, m and l. Flag icons support 1x1 and 4x3.

Step 3 — Build the URL

const CDN = "https://softhoursdiary-emojis.pages.dev";

const emoji = CDN + "/emojis/svg/1f632.svg";
const flag = CDN + "/flag/l/IN.svg";
const flagIcon = CDN + "/flags/4x3/in.svg";

console.log(emoji, flag, flagIcon);

Step 4 — Display it in HTML

<img
  src="https://softhoursdiary-emojis.pages.dev/emojis/svg/1f632.svg"
  alt="Surprised face"
  width="36"
  height="36"
  loading="lazy"
  decoding="async"
/>

Step 5 — Use the helper for reusable markup

<script defer src="https://softhoursdiary-emojis.pages.dev/soft-hours-diary.js"></script>

<shd-emoji asset-id="1f632" quality="svg"
  alt="Surprised face"></shd-emoji>

The helper registers the custom element and resolves its asset URL when the element is connected to the page.

Verify the result

  1. Open the playground and select the correct asset family.
  2. Enter an ID and choose a supported quality value.
  3. Confirm the URL and image preview.
  4. Copy the direct URL or generated HTML snippet.
  5. Set accessible alt text and dimensions in production.
For a framework-specific setup, continue to React, Next.js or TypeScript.
© 2026 Soft Hours Diary · Little things, deep feelings.