START HERE · QUICK START
Quick Start Guide
Display your first emoji or flag using a direct URL, or resolve dynamic assets with the public JSON API. Nothing to install.
Before you start
You need an asset type, quality value and asset ID. The simplest option is a direct image URL; choose the JSON API when the ID is dynamic. Neither option needs a package or account.
Fastest route: open the playground, choose an asset and copy its direct HTML snippet.
Step 1 — Choose an asset family
| Asset family | type | ID example |
|---|---|---|
| Emoji | emoji | 1f632 |
| Flag SVG | flag | IN |
| Flag icon | flags | IN |
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 — Use a simple image URL
For a fixed image, use a standard img element:
<img
src="https://softhoursdiary-emojis.pages.dev/[emojis/svg/1f632.svg"
alt="Surprised face"
width="36"
height="36"
loading="lazy"
decoding="async"
/>Step 4 — Resolve a dynamic asset with JSON
Use this no-package endpoint when the asset ID comes from application data:
const params = new URLSearchParams({
type: "emoji",
id: "1f632",
quality: "svg"
});
const response = await fetch(
"https://softhoursdiary-emojis.pages.dev/[api/v1/asset?" + params
);
const result = await response.json();
if (!response.ok || !result.ok) {
throw new Error(result.error?.message || "Asset lookup failed.");
}
const imageUrl = result.data.url;Step 5 — Optional browser helper
For DOM mounting or custom elements, load the standalone script. This step is optional and does not install a package.
<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>Verify the result
- Open the playground and select the correct asset family.
- Confirm the supported quality and filename casing.
- Copy the direct URL or generate a JSON API request.
- Check the final image request in your browser if the file does not load.
- Set accessible alt text and image dimensions in production.