The style kit is the one place where the look of your game’s interface is decided. Each color, type size, spacing step, corner shape, shadow, motion and sound is stored once, under a name. A named value is a token. Buttons, panels and text pick tokens by name, so changing a token changes every screen that uses it at the same moment.
The style kit is part of Jellydrop (the Game Creator), in the UI tab. Use it when you want the menus, the heads-up display and the cards the game draws over the island to look like one game. Every new project starts with a ready-made UI (a "new UI" below) that already has tokens. The pieces that pick tokens are styles; Classes and states explains them.
Open the style kit
Choose the UI tab (⌘ 3), then choose Style kit in the bar under the tabs. Three areas appear.
- Left: the Style kit list. Under Tokens are Colors, Type, Spacing and shapes, Motion and Sounds. A number beside four of them counts their tokens. Click one to edit it. Under Styles and Game parts are the styles that use the tokens.
- Middle: the tokens of the group you picked.
- Right: the live preview, which shows a style working for real while you edit.
Change a color everywhere
The quickest way to see what the style kit does.
Pick the token
Open Colors in the Style kit list. Find Accent, the color of main buttons and of anything that is switched on or selected, and click its swatch (the small colored square).
Choose a new color
Choose a color in the picker. The live preview changes as you drag, and so does every screen in the project that uses Accent. To type a value instead, click the box beside the swatch, enter six digits such as
E99A85and press Return.Check that the text still reads
Open the checks at the right end of the bar. They read Checks pass when all is well. If the new color makes text hard to read, a note appears, such as "Button.Primary, rest: text contrast is 3.1 to 1, below 4.5." Click the note to go to the style. See Checks.
Undo it if you like
Press ⌘ Z. A run of changes in the picker counts as one undo step.
Every token row
All five groups work the same way. Each token is one row.
The token’s name, as styles list it. Edit it and press Return or click away. Every style that uses the token follows the new name, so nothing breaks. Nothing happens if the new name is empty or already taken. Esc puts the old name back.
The color, type, size, shape, shadow, motion or sound itself. Each group has its own controls, described below.
The number at the right of the row: how many style states use this token. Hover it to read the first six, for example "Button.Base (hover)". A sound is also counted for each menu-flow arrow that plays it. At 0 the tip reads "Not used" and "Safe to delete". |
Removes the token. It is grayed out while any style uses it, so a style can never point at a token that is gone. |
Below each group. Adds a token called New (then New 2, New 3 and so on) with a starting value for you to change. A color starts as a soft gray #B9ACAE, a spacing step as 20 px, a shape as a radius of 12, a shadow as a gentle shadow and a sound as Toggle. Type and motion starting values are given under their groups. |
Used by counts styles only. The game also reads some tokens by name, without counting them (see Keep these names), so a token can show 0 and still matter.
Every change is one undo step, and a run of small changes to the same value, such as dragging a slider, counts as one. Press ⌘ Z to take it back. Number boxes also change when you drag their small label sideways (hold Shift for fine steps) or press ↑ and ↓.
Colors
Colors are named by their job, not by how they look. A style says "Surface" or "Ink", never a hex value, so you can recolor a whole game by editing eleven rows. Click a swatch to open the color picker, or type six hex digits in the box beside it (the # is optional) and press Return. Esc drops what you typed.
These are the colors a new UI starts with:
The main panel color.
A button or list row sitting on a panel.
The same button when the pointer is on it.
Main text and titles.
Body text and captions.
Text on an Accent fill.
The main button and anything that is selected or switched on.
An Accent button when the pointer is on it.
A selected main button, and the border of a selected slider.
The ring around a button chosen with the keyboard.
A soft warm highlight.
Keep these names
Besides your menu screens, the game draws screens of its own: the heads-up display, the islands menu, island title cards, story cards, credits, postcards, and the screens that ask who is playing. They are not laid out by you, but they follow the kit by token name.
Rename or delete these tokens with care. If a token is renamed or deleted, the part of the game that reads it stops following your kit and uses JellyWorks’ own value.
- Colors Surface, Surface.Deep, Ink, Ink.Soft, Accent, Ink.OnAccent, Warm and Glow, read by all of the game’s own screens.
- Colors Surface.Hover, Accent.Light and Accent.Deep, read by the player screens.
- Type Body and Display: the game takes its text fonts from them (the font only, not the size).
- Shadows Soft and Lifted, shape Card, and motions Rise, Fade, Squash.Small and Settle, read by the player screens.
- Sounds Tap, Confirm and Soft card, played by the player screens and the saving notices.
Type
The type group is the type ramp. Each row sets one text style, and the row shows a sample line, "A small island", drawn the way the game will draw it.
Fredoka is soft and round, for titles and big words. Lexend is plain and easy to read, for everything else.
The size in pixels. The sample stops growing at 30 px, but the real size is the number you set.
How heavy the letters are.
A new UI has six rows: Display (Fredoka 40, weight 500), Title (Fredoka 24, 500), Body (Lexend 16, 300), Caption (Lexend 12, 400), Button (Lexend 15, 500) and Button.Large (Lexend 18, 500). A new type token starts as Lexend 14, weight 400.
The game includes Fredoka in weights 500 and 600 and Lexend in 300, 400 and 500. For any other pair, the nearest of those shows, so a change of weight may not be visible.
Spacing and shapes
This group has three lists under their own headings.
Gaps and padding, in pixels. A bar beside each row shows its length. A style picks a spacing step for its padding and for the gap between its contents.
Corner roundness, as a radius in pixels. A sample shows the corner. A radius of 999 makes a full pill, called a pebble.
The shadow under a panel or button, written as a CSS shadow (for example 0 8px 28px rgba(62, 68, 88, 0.12)) or none. A sample box shows it.
A new UI has these spacing steps: Tight 4, Small 8, Snug 12, Medium 16, Roomy 24, Large 32 and Huge 48. Its shapes are Square 0, Soft 8, Card 18 and Pebble 999. Its shadows are None, Soft and Lifted.
Motion
A motion token describes a small movement a style plays when it changes state, such as a button squashing when pressed. A style picks one in its Motion property for a state (see Classes and states).
How long the movement takes.
Soft eases in and out. Settle overshoots a little, then settles back, like something coming to rest. Even moves at a steady pace.
How big the movement is. See below.
Plays the movement once on the button, so you can see it without leaving the group. |
A new UI has Breathe (2400 ms, Soft, 1.02), Squash.Small (120 ms, Settle, 0.95), Settle (320 ms, Settle, 1), Rise (480 ms, Settle, 8) and Fade (240 ms, Soft, 0). A new motion token starts at 300 ms, Settle, 0.97.
How motion tokens work
- Size or lift. When a style state names a motion token, the element is scaled to x while in that state: 0.95 shrinks it to 95 percent, 1 leaves its size alone. The one exception is the token named exactly Rise, whose x is a lift in pixels: 8 raises the element 8 px. Only that name lifts. Rename Rise and it scales instead, so an x of 8 would draw the element eight times its size.
- How long it takes. On a menu screen, every change of size or lift uses the length and easing of the Settle token, whichever token the style names. The ms and Easing of the token a style names matter only to a game part (see Classes and states), which uses its own token’s length and easing. Colors always change over 160 ms.
- Tokens the game reads by name. Rise (length, easing and lift) and Fade (length and easing) set how the player screens arrive. Squash.Small sets the press squash on those screens. Settle sets their size changes. Breathe is for your own styles: nothing in the game reads it by name.
- Try it differs. The button here lifts for any token whose x is above 2, and scales for the rest, whatever the name. A token called Lift with x 8 therefore looks right here and wrong in a style.
The entrance of a screen comes from its menu-flow arrow, not from these tokens; see Menu flow.
Sounds
A sound token gives a name to one of the game’s sounds, so a style or a menu-flow arrow can play it by that name.
A choice of the game’s sounds, by name, for example Toggle, Confirm or Button hover.
Plays the sound so you can hear it. |
A new UI has Tap (the Toggle sound), Confirm, Chime (the chime ladder) and Soft card (the sound of a story card appearing). A style plays a sound in the state where you set it, usually Pressed. Sounds lists what else makes a sound in the game.
Live preview
The live preview sits beside every token group and every style. It builds the style the way the game builds it, so you can hover it, press it and reach it with Tab as a player would. It is not the Island tab’s Live preview button, which brings residents to life.
When you open a token group, a Style shown list at the top picks which style to preview (it starts on the first button style). When you open a style, that style is shown. A line under the picture says "Hover, press and tab to it here; it behaves as it will in the game." for styles you can press, and "This style has one look; replay an entrance to see it arrive." for the rest.
Keeps the preview in one state: Rest, Hover, Pressed, Focused, Selected or Disabled. A small dot marks a state the style has not set, and a line says it looks like Rest. The preview follows the state you are editing in the style, so a change shows the moment you make it.
Plays a pointer arriving, pressing and leaving, with the press sound. A badge on the picture reads Press.
Steps through each state the style has, one after another. The badge reads Every state.
Fade, Rise or Slide, with Replay, to see how a screen holding this style arrives.
Plays every movement at Normal, Half or Quarter speed, so you can watch a squash that lasts 120 ms.
Draws the style inside a panel, as it usually appears.
Plays the style’s sounds in the preview.
Under the controls, one line states the timing in use, such as "Colors change over 160 ms. Size and lift settle over 320 ms (settle). A press uses Squash.Small."
Start from a template. The Templates button at the right of the bar replaces the whole UI, kit included, with one of five looks. Use one as a starting point and then change tokens. See Screens.
Related
- Classes and states builds buttons, panels and text from these tokens.
- Checks warns when a color pair is hard to read or a button is too small.
- Screens places the styled elements on a menu screen.