Story Controls
Overview
Controls are Flipbook's mechanism for defining parameters to pass off to the story to live-edit it. Controls can be used to dynamically change props, styles, and other component properties, allowing components to be live-edited.

Problems
Flipbook's controls are super limited, only supporting primitive data types with fairly basic UI for modifying them. This is one of the areas of the plugin that leaves a lot to be desired, and alternatives like UI Labs blow us out of the water with their controls
- The datatypes for controls are too limited. Flipbook only supports strings, booleans, numbers, and arrays of those datatypes. Some light support for Enums also exists
- Writing a story's controls schema should be more expressive, allowing for more control types to be defined, along with providing extra information like descriptions, default values, and explicit control types.
- Bridging controls between Flipbook and Storyteller isn't going well. Flipbook needs to 1) read a story to know what controls it accepts so it can render them out and 2) keep track of the current modified state of each control value.
Requirements
- New control schema
- Introduce a more expressive control schema akin to Storybook’s ArgTypes
- Full UI Labs compatibility 3. Scoped to just controls for now but the goal is 1:1 interop with UI Labs so stories Just Work 4. Migration logic will detect if the control schema is using UI Labs' schema and migrate it to one Flipbook supports.
- Introduce more supported data types for controls 6. Roblox datatypes like Color3 and DateTime
- Allow users to define more complex controls 8. Filters for String controls 9. Improvements to Number controls, like specifying constraints 10. Mix together simple and complex controls, like using
foo = "Hello, World!to represent a String control - 1:1 interop with prior controls schema 12. Users can decide to use the new schema with the provided constructors, or continue with simple controls
Stretch goals:
- Create a proper Table component for rendering out controls. This way the Name column can be auto-sized to fill based on the widest cell
- Support more Roblox data types like UDim2, Vector3 and Instances
- Create a new Flipbook utility package that's essentially just a rebrand of Storyteller 4. This way users will write
local Flipbook = …in their stories, which cements the link between the story and the plugin 5. Export most of the same things as Storyteller, like the control constructors and types
Solution
- New control schema 2. Introduce a more expressive control schema akin to Storybook’s ArgTypes
- New data types
- UI Labs compatibility 2. Migration logic will detect if the control schema is using UI Labs' schema and migrate it to one Flipbook supports.
Implementation
The source for controls lives in two distinct places:
- Storyteller,
- Flipbook, by using Storyteller's Controls API to build out the frontend UI
| Current | Screen → StoryCanvas → StoryView → StoryPreview |
|---|---|
| Proposed | Screen → StoryView → StoryPreview → Storyteller.StoryContainer |
Where StoryView handles the full story page, keeps track of control changes, and contains StoryPreview, which handles story render errors and whether to mount the story in the plugin widget or in the 3D viewport.
Supported Data Types
The following table keeps track of all the data types we support now and intend to support in the future.
Also includes a UI Labs comparison. We should ultimately be comparing against ourselves, but it's good to keep tabs on the competition.
| Control Type | Description | Flipbook (v2.4.0) | UI Labs (v1.5.0) | Flipbook (Q1 2026) | UI Labs (Q1 2026) | Notes |
|---|---|---|---|---|---|---|
| Boolean | Provides a toggle for switching between possible states | Supported | Supported | Supported | Supported | |
| Callback | Provides a button to trigger an arbitrary action | Unsupported | Unsupported | Unsupported | Unsupported | Out of scope |
| Check | Provides a set of checkbox components for selecting multiple options | Unsupported | Unsupported | Supported | Unsupported | |
| Color | Provides a color picker component to handle color values. Can be additionally configured to include a set of color presets | Unsupported | Supported | Supported | Supported | |
| Date | Provides a datepicker component to handle date selection | Unsupported | Unsupported | Supported | Unsupported | |
| File | Provides a file input component that returns an array of URLs | Unsupported | Unsupported | Unsupported | Unsupported | Impossible unless there's some new engine APIs that allow file selection |
| Inline Check | Provides a set of inlined checkbox components for selecting multiple options | Unsupported | Unsupported | Unsupported | Unsupported | Might still be in scope, but confirm the visual differences in Storybook |
| Inline Radio | Provides a set of inlined radio buttons based on the available options | Unsupported | Unsupported | Supported | Unsupported | Might still be in scope, but confirm the visual differences in Storybook |
| Instance | Provides an Instance picker component to choose an Instance from the DataModel | Unsupported | Supported | Unsupported | Supported | Out of scope |
| Multi-select | Provides a drop-down list that allows multiple selected values | Unsupported | Unsupported | Unsupported | Unsupported | This will only be included if Foundation.Dropdown can support multiple selections |
| Number | Provides a numeric input to include the range of all possible values | Supported | Supported | Supported | Supported | |
| Object | Provides a JSON-based editor component to handle the object's values. Also allows edition in raw mode | Unsupported | Unsupported | Unsupported | Unsupported | Out of scope |
| Radio | Provides a set of radio buttons based on the available options | Unsupported | Unsupported | Supported | Unsupported | |
| Select | Provides a drop-down list component to handle single value selection | Unsupported | Supported | Supported | Supported | |
| Sequence | Provides a sequence editor akin to Roblox's one for NumberSequence | Unsupported | Unsupported | Unsupported | Unsupported | Out of scope |
| Slider | Provides a range slider component to include all possible values | Unsupported | Supported | Supported | Supported | |
| Text | Provides a freeform text input | Supported | Supported | Supported | Supported | |
| UDim | Unsupported | Unsupported | Supported | Supported | ||
| UDim2 | Unsupported | Unsupported | Supported | Unsupported | ||
| Vector2 | Unsupported | Unsupported | Supported | Unsupported | ||
| Vector3 | Unsupported | Unsupported | Supported | Unsupported |
Schema
StoryControlsSchema: Describes what controls the story can acceptStoryControl: Default values for the ControlSchemaStoryControls: Controls specified by the user that get hydrated byStoryControlsSchema
export type StoryControl =
StringControl
| BooleanControl
| NumberControl
| SliderControl
| SelectControl<unknown>
| MultiSelectControl<unknown>
| CheckControl<unknown>
| RadioControl<unknown>
| ColorControl
| DateControl
export type StoryControlsSchema = {
[string]: StoryControl,
}
export type StoryControls = {
[string]: unknown,
}
Components
UI elements needed to support data types:
- Select one
Foundation.RadioGroup
- Multi-select
- I'd like to make something akin to the following. I don't think Foundation has something like that built in, but could be made by composing Checkbox with a label
- I'd like to make something akin to the following. I don't think Foundation has something like that built in, but could be made by composing Checkbox with a label
- Date picker:
Foundation.DateTimePicker - Color picker:
Foundation.ColorPicker - CSV input to Roblox data type:
Foundation.TextInput - Range slider:
Foundation.Slider - Instance picker: Out of scope
- Sequence widget: Out of scope
UI Labs Compatibility
https://github.com/PepeElToro41/ui-labs-utils
If we wind up needing a library like UILabs to support controls, maybe Flipbook could install and manage a copy of Storyteller in the experience? For Studio users. And let folks know to use Wally if they're Rojo users?
UILabs.Boolean(def: boolean): {
ControlValue: boolean,
EntryType: "Control",
Type: "Boolean",
}
UILabs.Choose<T>(list: { T }, def: number?): {
ConrolValue: T,
DefIndex: number,
EntryType: "Control",
List: { T },
Type: "Choose",
}
UILabs.Datatype.Color3(def: Color3): {
ControlValue: Color3,
EntryType: "Control",
Type: "Color3",
}
UILabs.EnumList<T>(list: { [string]: T }, def: string): {
ControlValue: T,
DefIndex: string,
EntryType: "Control",
List: { [string]: T },
Type: "EnumList"
}
UILabs.Number(
def: number,
min: number?,
max: number?,
step: number?,
dragger: boolean?,
sensitivity: number?
): {
ControlValue: number,
Dragger: boolean,
EntryType: "Control",
Max: number?,
Min: number?,
Sensibility: number,
Step: number?,
Type: "Number",
}
UILabs.Object(
className: string?,
def: Instance?,
predicator: ((instance: Instance) -> boolean)?
): {
ClassName: string,
ControlValue: Instance?,
EntryType: "Control",
Predicator: ((instance: Instance) -> boolean)?,
Type: "Object",
}
UILabs.RGBA(def: Color3, transparency: number?): {
ControlValue: {
Color: Color3,
Transparency: number -- Defaults to 0
},
EntryType: "Control",
Type: "RGBA"
}
UILabs.Slider(def: number, min: number, max: number, step: number?): {
ControlValue: number,
EntryType: "Control",
Max: number,
Min: number,
Step: number?,
Type: "Slider",
}
UILabs.String(def: string, filters: { (input: string, oldInput: string) -> string }?): {
ControlValue: string,
EntryType: "Control",
Filters: { (input: string, oldInput: string) -> string }?,
Type: "String",
}
Comprehensive example of using controls in UI Labs (source):
local UILabs = require(...) -- Path of your Utility Package
local controls = {
-- [[ Choose ]] --
Theme = UILabs.Choose({"Dark", "Light"}),
Currency = UILabs.Choose({"Coins", "Gems"}),
-- [[ EnumList ]] --
WindowSize = UILabs.EnumList({
Mobile = 500,
Tablet = 1000,
Desktop = 1500,
}, "Mobile"),
TextColor = UILabs.EnumList({
Red = Color3.new(1, 0, 0),
Green = Color3.new(0, 1, 0),
Blue = Color3.new(0, 0, 1),
}, "Red"),
Volume = UILabs.Slider(50, 0, 100, 1), -- it only has integer values
FrameColor = UILabs.RGBA(Color3.new(1, 1, 1), 0) -- you will need to set BackgroundTransparency too
}
local story = {
controls = controls,
story = ...
}
return story
Research
Storybook
CSF Next: Component Story Format (CSF) | Storybook docs ← We may be able to write a Luau implementation of this
Scratchpad
Follow-up PRs:
- Runtime typechecking https://github.com/flipbook-labs/storyteller/pull/78
- Migrations https://github.com/flipbook-labs/storyteller/pull/77
- Connecting with
render.luauhttps://github.com/flipbook-labs/storyteller/pull/79
Write out all that's changed. You spent a lot of time on the Controls revamp, so tell people how to use it!
Goals:
- Full UI Labs compatibility
- Scoped to just controls for now but the goal is 1:1 interop with UI Labs so stories Just Work
- Introduce more supported data types for controls
- Roblox datatypes like Color3 and DateTime
- Vector3, UDim2, and others coming later
- Roblox datatypes like Color3 and DateTime
- Allow users to define more complex controls
- Filters for String controls
- Improvements to Number controls, like specifying constraints
- Mix together simple and complex controls, like using
foo = "Hello, World!to represent a String control
- 1:1 interop with prior controls schema - Users can decide to use the new schema with the provided constructors, or continue with simple controls Next:
- Create a new Flipbook utility package that's essentially just a rebrand of Storyteller
- This way users will write
local Flipbook = …in their stories, which cements the link between the story and the plugin - Export most of the same things as Storyteller, like the control constructors and types
- This way users will write
I'm already starting to forget how this all works so start writing!!!!
TODO:
- Revise how list-based controls work. The
optionsandmappingbit feels wrong. Look at how Storybook and UI Labs do it - https://discord.com/channels/385151591524597761/1234734352609316894/1456423084662849536
Diagrams
Type relationships:
graph TD
StoryControlValue
BooleanControl
StringControl
NumberControl
SliderControl
ColorControl
DateControl
SelectOptions
SelectControl
RadioOptions
RadioControl
MultiSelectOptions
MultiSelectControl
CheckOptions
CheckControl
PrimitiveStoryControl
ListBasedStoryControl
AdvancedStoryControl
RobloxStoryControl
NumberBasedStoryControl
StoryControl
StoryControlsSchema
InputStoryControlValue
StoryControls
NumberControl --> NumberBasedStoryControl
SliderControl --> NumberBasedStoryControl
PrimitiveStoryControl --> BooleanControl & StringControl & NumberControl
ListBasedStoryControl --> CheckControl & MultiSelectControl & SelectControl & RadioControl
CheckControl --> CheckOptions
RadioControl --> RadioOptions
SelectControl --> SelectOptions
MultiSelectControl --> MultiSelectOptions
AdvancedStoryControl --> SliderControl & ListBasedStoryControl
RobloxStoryControl --> DateControl & ColorControl
StoryControlsSchema --> PrimitiveStoryControl & AdvancedStoryControl & RobloxStoryControl
StoryControls --> InputStoryControlValue
References
- Storybook controls 2. https://storybook.js.org/docs/essentials/controls#annotation 3. https://storybook.js.org/docs/api/arg-types
- UI Labs controls:
- Full list of Roblox data types: https://create.roblox.com/docs/reference/engine/datatypes
- User sentiments: 7. https://x.com/maximumadhd/status/1979375586964574404