Este guia está disponível em inglês e em francês.
Skins
English translation of SKINS.md, which is the reference: keep the two in step.
A skin changes Sunao's look and its structure. It's a folder of data, with no code at all: JSON, a stylesheet, fonts and images. It can neither read your data nor act on your behalf (see Security).
Three ways to make a skin:
- a stylesheet alone:
skin.cssrestyles the original layout (library, page, panel, player bar); - a stylesheet and a layout:
skin.jsonrearranges the app's pieces in a tree of rows and columns,skin.cssstyles them (example:ui/skins/suno/); - a classic skin: the images of a 2000s media-player skin, with no stylesheet (see Classic skins).
Agent creating or editing a skin: read ui/skins/AGENTS.md, which gives the steps and the pitfalls.
Quick start
Open the skins folder: Settings > Display > Skin > Choose a skin > Open the skins folder. It's
<userData>/skins/:- macOS:
~/Library/Application Support/Sunao/skins/ - Windows:
%APPDATA%\Sunao\skins\ - Linux:
~/.config/Sunao/skins/
- macOS:
Create a
my-skin/folder in it with these two files:{ "id": "my-skin", "name": "My skin", "author": "Me", "version": "1.0.0", "api": 1 }:root { --bg: …; --surface: …; --text: …; --accent: …; --radius: …; } /* your own values */Check it from the app's repository:
npm run skin:check -- <folder path>.Go back to the skins page and apply it. A rejected skin shows up there, with the reason.
After each change, View > Reload (⌘R / Ctrl R) reads the stylesheet again.
To see it in every state without touching the running app:
SKIN=<folder path> npm run skin:shots(screenshots in/tmp/skin-shots/my-skin/, see Check).
If a skin makes the app unusable, View > Back to the default skin (⌘⌥0 / Ctrl Alt 0) restores the default skin. This menu belongs to the system: no stylesheet can hide it. It's also in the Dock menu on macOS. As a last resort, removing the skin's folder brings the app back to the default skin on the next launch.
Files
my-skin/
skin.json required: identity, layout, title bar
skin.css the stylesheet, loaded after ui/styles.css
preview.png gallery thumbnail, 16:10 (640×400 recommended)
icon.png the app icon while the skin is active (optional, see skin.json)
fonts/, img/ everything skin.css loads, through relative url()s
The folder may be a symbolic link (handy to work on a skin kept elsewhere). Its files, however, can't point outside the folder.
skin.json
{
"id": "my-skin",
"name": "My skin",
"author": "Me",
"version": "1.0.0",
"api": 1,
"description": { "fr": "…", "en": "…" },
"swatch": ["#…", "#…"],
"icon": "icon.png",
"titleBar": { "height": 40, "color": "#20202e", "symbol": "#ffffff", "buttons": "native" },
"slots": ["lcd", "stop"],
"layout": { … }
}
| Key | |
|---|---|
id |
the folder's name: a-z, 0-9, -, 2 to 41 characters. An installed skin can't take the id of a shipped skin. |
name, author, version |
text shown in the gallery (60, 60 and 20 characters at most). name is required. |
api |
the contract version followed: 1. Any other value gets the skin rejected. |
description |
one text, or one text per language (fr, en, es, pt, id, ru, ar, hi, bn, zh), falling back to English. 500 characters. |
swatch |
up to 5 #rrggbb colours, shown instead of preview.png when it's missing. |
icon |
relative path to a square PNG of 256 to 1024 px (1 MB at most) in the skin's folder, for example "icon.png". While the skin is active, it becomes the Dock icon on macOS and the window icon on Windows and Linux. Finder, Launchpad and Explorer keep the app's icon. An invalid icon gets the skin rejected. |
titleBar |
the area where macOS places its traffic lights (centred vertically) and Windows its buttons (drawn in the color and symbol colours). height from 28 to 96 px. "buttons": "skin": the skin draws its own buttons (the window piece) and macOS hides its traffic lights; on Windows and Linux, the system buttons stay and the window piece is hidden. |
slots |
only without layout: adds the display (lcd) and the stop button (stop) to the original player bar. |
layout |
the app's structure (below). Without it, the original layout. |
classic |
true for a classic skin (see below). |
skin.json weighs 64 KB at most. Unknown keys are ignored.
Layout
A tree of rows and columns, where every leaf is a piece of the app:
{ "dir": "row", "class": "desk", "items": [
{ "dir": "column", "size": 440, "items": [
{ "part": "lcd" },
{ "part": "transport", "buttons": ["prev", "play", "pause", "stop", "next"] },
{ "part": "panel", "default": "queue", "grow": 1 }
] },
{ "part": "page", "grow": 1 }
] }
| Key | |
|---|---|
dir |
row or column: a box, with items |
part |
a piece (list below) |
size |
fixed size along the parent's axis, in px |
grow |
share of the remaining space along the parent's axis |
min, max |
bounds along the parent's axis, in px |
class |
up to 4 class names (a-z, 0-9, -) for skin.css |
Boxes are div.box.box-row or div.box.box-column. Each piece is wrapped in div.part.part-<name>, which
it fills. Depth: 10 levels, 120 nodes at most.
| Piece | Options | |
|---|---|---|
page |
the current page (home, song, creator, search…). Required. | |
topbar |
arrows, home, search, bell, account | |
nav |
links to the main pages, the current one marked .on (.nav-link.nav-<page>, icon and name) |
buttons: home, search, tags, charts, artists, playlists, liked, history, stats, settings |
library |
library: liked songs, history, stats, playlists, followed creators | rail: true: a column of badges, without header or handle; each item's name is in .lib-name, a .rail-sep rule separates your collections from the rest, the create button is .rail-create |
panel |
the panel (now playing, lyrics, queue, devices), always open | default: now, lyrics, queue or devices, the view shown when none is chosen |
nowplaying, lyrics, queue, devices |
one panel view, fixed | |
player |
the original player bar, whole | |
track |
cover, title, creator, style, like | cover: cover size in px (0: none) |
cover |
the playing song's cover, which opens its page | |
transport |
playback buttons, in the given order | buttons: shuffle, prev, playpause, play, pause, stop, next, repeat, like |
seek |
position in the song | |
volume |
mute and volume | |
tools |
tool buttons, in the given order | buttons: now, lyrics, queue, devices, mini, fullscreen, eq (turns the equalizer on), settings, search, clear |
lcd |
full display: the next five pieces together | |
status |
playback state (playing, paused, stopped) | |
time |
elapsed time, or remaining on click, one element per character (see Stylesheet) | |
marquee |
scrolling title "1. Creator - Title (3:45)" | |
info |
bitrate (kbps), sample rate (kHz), model version, speaker | |
visualizer |
spectrum | |
milkdrop |
Milkdrop visualizations: one preset every 20 s, click for the next one | |
balance |
left-right balance; --b on .balance: distance from centre, 0 to 1 |
|
equalizer |
10-band equalizer and preamp, curve, presets | |
window |
window buttons, with titleBar.buttons "skin" |
buttons: minimize, maximize, mini, close |
drag |
empty strip that moves the window | |
spacer |
flexible space |
page, topbar, library and panel are placed only once. An unknown piece, a missing page or a tree
that's too big gets the skin rejected; unknown options are ignored.
Stylesheet
skin.css applies to the whole app: main window and mini player (.mini). It weighs 1 MB at most.
Starting tokens, on :root: --bg, --surface, --elev, --elev2, --hover, --line, --text,
--muted, --dim, --accent, --accent-hi, --radius, --pill, --font, --menu-bg, --menu-hover,
--side, --right, --bar, --top. These tokens recolor the original layout; a skin with its own
identity usually also restyles the components and rearranges the layout.
Guaranteed hooks. The classes a skin can rely on are listed, by area, in skin-hooks.json:
layout, top bar, navigation, library, pages, cards, song lists, detail pages, panel, player, equalizer, full
screen, mini player, menus and dialogs, settings. A b-* pattern covers generated classes (b-play,
b-next…). These classes exist in the interface (a test checks it) and won't change without a new contract
version. Other classes, and the exact nesting of elements, may change with any update: npm run skin:check
flags the ones your stylesheet uses.
On <html>:
data-skin: the current skin's id;lang: the language (useful for a font limited to the Latin alphabet);dir="rtl"in Arabic; the classesos-darwin,os-win32oros-linux.data-play:playing,pausedoridle(nothing playing), in the main window and in the mini player.--cover: the dominant colour of the playing song's cover, asr, g, b, absent with no song. Read it with a fallback:rgba(var(--cover, 255, 106, 61), .2).
On pages: .main[data-view] carries the name of the page shown (home, track, artist, tag, tags,
charts, artists, search, liked, history, stats, playlists, playlist, mine, sunolist,
settings, skins).
Song styles (the first terms of their prompt) are written on every card (.card-style) and under the
playing song's title (.t-style). Hidden by default: a skin shows them with display: block.
Sliders: the position (0 to 1) is in --v. Volume and position: .slider > .rail (.buf, .fill)
and .knob. Equalizer: .eq-band > .eq-track (.eq-fill, .eq-thumb), --v at 0.5 for 0 dB. These are
ordinary elements, fully styleable (no <input>).
Spectrum: colours on .viz (--viz-low, --viz-mid, --viz-high from bottom to top, --viz-peak),
bars in px (--viz-bar width, --viz-gap gap, --viz-step stepped rise, --viz-peak-size peaks).
Time: .lcd-time holds one <i class="d d-…"> per character: d-0 to d-9, d-colon, d-minus
(remaining time) and d-blank (the minus sign's slot, hidden by default). A sprite sheet and
background-position draw period digits.
Pixel placement: position: absolute on the pieces of a position: relative box, for example on a
550 × 232 grid.
Sound: as soon as a skin shows the spectrum or the equalizer, or the equalizer is set, sound goes through Web Audio and the spectrum shows the real sound. While casting to a speaker, the spectrum is simulated and the equalizer has no effect.
Motion: the app stays open for hours. A continuous animation should only run during playback
(html[data-play=playing]) and stop under @media (prefers-reduced-motion: reduce).
Classic skins
"classic": true in skin.json, and the images of a period media-player skin (the contents of a .wsz,
lowercase names): main.bmp (required), cbuttons.bmp, titlebar.bmp, eqmain.bmp, pledit.bmp,
text.bmp, numbers.bmp, volume.bmp, balance.bmp, posbar.bmp, shufrep.bmp, monoster.bmp,
playpaus.bmp, gen.bmp, viscolor.txt, pledit.txt. No stylesheet is read: ui/lib/classic.js cuts
the images and ui/classic.css places them at the original player's positions. Only the colours (r,g,b,
#rrggbb) and the font name in viscolor.txt and pledit.txt are read.
Security
What the app guarantees for installed skins. Each point is checked by test/skins-contract.mjs or
test/skins.mjs.
- No code. A skin brings only JSON, CSS, fonts and images. The app runs nothing it contains: it sees neither the data nor the app's API.
- No network access. A remote image would be enough to know who opens the app and when. The stylesheet is
rejected if it contains
@import, aurl()that isn't a relative address inside the skin's folder (remote address,//, absolute path, another scheme,.., including encoded as%2e%2eor through CSS escapes), or a function that loads an image from a plain string (image-set(),image(),src()). Only inline datadata:image/…anddata:font/…is allowed. - Confinement. A skin reads only the files in its folder: paths that leave it and symbolic links pointing outside are refused.
- Checked when served. The stylesheet goes through these checks every time the app loads it, not only when the gallery opens: a stylesheet changed afterwards doesn't get through.
- Bounded sizes: 64 KB for
skin.json, 1 MB forskin.css, 1 MB for the icon. - Icon checked before it's read: the app checks the file's bytes (PNG signature, square of 256 to 1024 px, size) before decoding it, when listing skins and every time it's applied.
- Shipped skins can't be impersonated: an installed skin that reuses a shipped skin's id is rejected.
- A way out, always: the "Back to the default skin" menu (out of reach of stylesheets), and the return to the default skin if the chosen skin's folder disappears.
- Shipped skins follow the same rules as installed skins.
What the app can't prevent:
- Misleading text. A stylesheet can hide, move or relabel elements, and display text (
content: "…"). It can neither create a field nor read what you type, but it can mislead. Only install skins from sources you trust. The app only asks for your Suno session when you sign in (the Sign in button), never while you use it. - Slowness. A stylesheet loaded with blurs and animations can slow the app down, even under the size limit.
- Future CSS functions. The check knows today's ways of loading a resource; a new CSS function that loads one from a string will have to be added to the list.
The ⌘⌥0 / Ctrl Alt 0 shortcut has only been checked on macOS.
Contract and versions
The api: 1 contract covers: the skin.json format, the pieces and their options, the tokens, the hooks in
skin-hooks.json, the states on <html> and .main[data-view]. While api is 1, these only grow: new
pieces, options or classes may appear, none disappears or changes meaning. An incompatible change will move to
api: 2, with the list of differences; the app rejects a skin whose version it doesn't know.
Check
From the repository's app/ folder:
npm run skin:check -- <folder>: the app's exact rules, without launching it. Errors (the skin would be rejected) and warnings: missing referenced file, classes outside the contract, animations without a reduced-motion fallback, missing thumbnail.SKIN=<id or folder> npm run skin:shots: screenshots of every page and state (home, menu, hover, song, creator, charts, styles, search, liked songs, stats, settings, gallery, panel views, full screen, paused, mini player). Options:OUT=<folder>,W=960 H=640(minimum window),SCALE=2(to inspect zoomed in),UI_LANG=ar(right to left),VIEWS=home,track. Screenshots use the test data (test/.data), in a separate window: the running app isn't touched.node test/skins-contract.mjs: the contract itself (run it after changing the app or a shipped skin, withnpm test).
Preview in the running app, for an agent or a tool: writing the skin's id into a .preview file at the
root of the skins folder makes the app apply it. The app writes the outcome to .preview.json (accepted, or
the reason it was refused) and a screenshot of the window to .preview.png, then reloads the skin on every
save of its files; a change that breaks a rule is refused and the app keeps the last valid version.
Publishing from a tool: POST /api/skins on the Sunao website, with the zip as the raw body
(content-type: application/zip) and a publishing token created on the account page
(Authorization: Bearer sunao_…). Same checks as the form; JSON answer.
Before sharing a skin:
-
npm run skin:checkaccepts the skin without warnings, or every warning is deliberate; - every page and every panel view has been looked at, playing, paused and with no song;
- hover, press and keyboard focus visible on everything clickable;
- minimum window (960 × 640), Arabic (right to left), and the Windows title bar (
os-win32); - reduced motion respected; nothing animates continuously outside playback;
-
preview.pngup to date, with no content you don't have the rights to; - fonts and images under a licence that allows distribution (include the licence in
fonts/).