Everything on Lucy
require(Lucy) returns one table. This page lists everything on it, so you can
check a name exists before you use it, and find the page that explains it.
Reactivity
| Name | What it is | More |
|---|
Lucy.ref, computed, reactive | State that code can follow | Reactivity |
Lucy.watch, watchEffect | Run code when state changes | Effects |
Lucy.effectScope, onCleanup | Group effects and stop them together | Lifetime |
Lucy.batch, untrack, peek, toValue, toRaw | Write several values at once; read without following | Effects |
Lucy.isRef, isWritable, isReactive | Tell what kind of value you have | Effects |
Lucy.insert, remove | Add to and remove from a list in a reactive table, so readers update | reactive |
Lucy.trigger | Tell readers of a ref it changed, after editing a table inside it in place | Effects |
Building UI
| Name | What it is | More |
|---|
Lucy.new | Make an instance with bound properties: Lucy.new "Frame" { ... } | Declarative UI |
Lucy.hydrate | Bind an instance built in Studio | UI built in Studio |
Lucy.on, changed, out, model, instance | Keys for events, property changes and two way bindings | Declarative UI |
Lucy.show, each | Show something while a condition holds; one item per list entry | Conditionals and lists |
Lucy.Component | Build your own component | Build a component |
Composables
Lucy.useDensity, useMetric, useResponsive, useBackHandler,
useFocusScope, useFocusZone, useHoldArrows, useSize, useFit, useHasVisibleChild, useUiSound, useTable, useSort, useWhile, useCountdown,
useDrag, useReveal, useCount, useRequest, useIntersect, useDelayGroup, useDismiss, useFocus, useHover, usePress and useProximity. See
the composables reference.
Animation
| Name | What it is | More |
|---|
Lucy.spring, tween | Values that move smoothly to a target, and follow reduced motion | Animation |
In the world
| Name | What it is | More |
|---|
Lucy.Aura | Effects worn on characters or at points: Aura.follow(app, options) on the client, Aura.wear and Aura.take on the server (players by Player or UserId, kept as u<UserId>: Aura.idOf), Aura.new for one, Aura.register for your own types | Auras |
Lucy.Binder | Binds behaviour to every Instance carrying a CollectionService tag with per-instance Maid cleanup and optional ancestor scoping: Lucy.Binder.new(tag, fn, options) | Tag binder |
Lucy.DialogueTree | Pure Luau branching dialogue engine with Blackboard, Priority Stack entry routing, Hub and Spokes, locked choices and validation: Lucy.DialogueTree.new(tree, blackboard) | Dialogue trees |
Images
| Name | What it is | More |
|---|
Lucy.preload, Preload | Fetches pictures before they are shown, in one shared queue; { pin = true } keeps them loaded | Preloading |
Lucy.prebuild(handles) | Builds ahead the content of sheets, dialogs, menus, selects, tabs and long lists that build on first show, one handle a frame. Returns a job with done() and progress() | Building on open |
The App and its parts
On the server
| Name | What it is | More |
|---|
Lucy.Server | The server's store, sent to each player's App at server.*, and requests from them: Lucy.Server.new(options) | The server |
Lucy.DataQueue | DataStore requests paced to the engine's limits, with cached reads and a flush on close: Lucy.DataQueue.new(options) | The data queue |
Lucy.Profiles | Players' saved data, held by one server at a time so trades cannot duplicate items, with purchase receipts granted once: Lucy.Profiles.new(queue, name, options) | The data queue |
Lucy.Check | Checks for what a client sends, for server:handle's check option: Lucy.Check.string({ max = 24 }) | The server |
Lucy.Services | A game's modules started in the order they need each other: Lucy.Services.new() | The server |
Lucy.Boards | Leaderboards on the server: all time, this week and today, each player's rank, names, the request and published rows: Lucy.Boards.new(options) | Boards |
Themes and colour
| Name | What it is | More |
|---|
Lucy.Tokens | The design tokens and the theme builders (themesFor, onColor) | Theming |
Lucy.Palette | Every palette colour as OKLCH values | Theming |
Lucy.color, Lucy.Color | Lucy.color(container, name) gives part of the UI one of your named colours. Lucy.Color is the module behind it: Lucy.Color.scope is the same function, and Lucy.Color.attribute ("LucyColor") is the attribute a coloured container carries | Named colours |
Lucy.Oklab | Colour maths: convert, mix, and check contrast | Theming |
Lucy.Preferences | The player's accessibility settings: reduced motion, text size, background transparency | Accessibility |
Devices and layout
| Name | What it is | More |
|---|
Lucy.Responsive | Pick a value by device, input, breakpoint or orientation: Responsive.pick(app, { mobile = 2, default = 5 }) | Components |
Lucy.Adaptive | Scales each ScreenGui for the device | Scaling |
Lucy.Scroll | Scroll.reveal(object, margin?, only?) scrolls every ScrollingFrame above object (or only only) so it shows | Utils |
Components
Lucy.Accordion, Alert, Arrow, Attribution, Avatar, Badge, Button, Checkbox,
Collapsible, DataGrid, Dialog, Dialogue, Effect, Gradient, Grid, Icon, IconStack, Image, InlineConfirm,
Input, Item, Kbd, Leaderboard, List, Marquee, Menu, NumberField, Panel, Pressable, Progress, Prompt,
RadioGroup, ScrollArea, Select, Separator, Sheet, Skeleton,
Slider, Slot, SortButton, Spinner, Stack, Switch, Table, Tabs, Text, Toaster,
Toggle, ToggleGroup, Tooltip, Tour and Waveform. Each has a page under Components.
Lucy.PanelCorner is the top right corner of a dialog or sheet (the close button and the
corner slot), for panels built by hand.
Exported types
For --!strict scripts, Lucy exports: Lucy.Ref<T>, Computed<T>, MaybeRef<T>,
Scope, App, Server, ServerLink, Profile, Check, Binder, DialogueTree,
DialogueRunner, DialogueSnapshot, AppState, Theme, Scene, Handle, Props,
Rule, Spec and Story.
Tools
| Name | What it is | More |
|---|
Lucy.Preview | Show stories in Studio | Stories |
Lucy.Devtools | Look at and drive a running UI in Studio | Devtools |
Utils and helpers
Lucy uses these itself, and you can too.
| Name | What it is | More |
|---|
Lucy.Format | Turns values into text, such as Format.number(4200), which is "4,200" | Utils |
Lucy.Scroll | Scrolls ScrollingFrames to reveal an object, calculates offsets and scales | Utils |
Lucy.Signal | A small event for plain Luau objects: Signal.new(), :Connect(fn), :Fire(...) | Utils |
Lucy.Maid | Collects things to clean up and cleans them in one call | Utils |
Lucy.Reactive, Lucy.Element and Lucy.Animate are the modules behind the
shortcuts above (Lucy.ref is Lucy.Reactive.ref). Use the shortcuts.