Skip to content

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

NameWhat it isMore
Lucy.ref, computed, reactiveState that code can followReactivity
Lucy.watch, watchEffectRun code when state changesEffects
Lucy.effectScope, onCleanupGroup effects and stop them togetherLifetime
Lucy.batch, untrack, peek, toValue, toRawWrite several values at once; read without followingEffects
Lucy.isRef, isWritable, isReactiveTell what kind of value you haveEffects
Lucy.insert, removeAdd to and remove from a list in a reactive table, so readers updatereactive
Lucy.triggerTell readers of a ref it changed, after editing a table inside it in placeEffects

Building UI

NameWhat it isMore
Lucy.newMake an instance with bound properties: Lucy.new "Frame" { ... }Declarative UI
Lucy.hydrateBind an instance built in StudioUI built in Studio
Lucy.on, changed, out, model, instanceKeys for events, property changes and two way bindingsDeclarative UI
Lucy.show, eachShow something while a condition holds; one item per list entryConditionals and lists
Lucy.ComponentBuild your own componentBuild 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

NameWhat it isMore
Lucy.spring, tweenValues that move smoothly to a target, and follow reduced motionAnimation

In the world

NameWhat it isMore
Lucy.AuraEffects 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 typesAuras
Lucy.BinderBinds 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.DialogueTreePure 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

NameWhat it isMore
Lucy.preload, PreloadFetches pictures before they are shown, in one shared queue; { pin = true } keeps them loadedPreloading
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

NameWhat it isMore
Lucy.AppMake the App: Lucy.App.new(options)The app
Lucy.AppStateThe store’s class; use app.stateThe store
Lucy.ThemeThe theme’s class; use app.themeTheming
Lucy.SceneManagerThe scenes’ class; use app.scenesBuild screens with scenes
Lucy.InputManagerInput’s class; use app.inputInput and focus

On the server

NameWhat it isMore
Lucy.ServerThe server’s store, sent to each player’s App at server.*, and requests from them: Lucy.Server.new(options)The server
Lucy.DataQueueDataStore requests paced to the engine’s limits, with cached reads and a flush on close: Lucy.DataQueue.new(options)The data queue
Lucy.ProfilesPlayers’ 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.CheckChecks for what a client sends, for server:handle’s check option: Lucy.Check.string({ max = 24 })The server
Lucy.ServicesA game’s modules started in the order they need each other: Lucy.Services.new()The server
Lucy.BoardsLeaderboards 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

NameWhat it isMore
Lucy.TokensThe design tokens and the theme builders (themesFor, onColor)Theming
Lucy.PaletteEvery palette colour as OKLCH valuesTheming
Lucy.color, Lucy.ColorLucy.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 carriesNamed colours
Lucy.OklabColour maths: convert, mix, and check contrastTheming
Lucy.PreferencesThe player’s accessibility settings: reduced motion, text size, background transparencyAccessibility

Devices and layout

NameWhat it isMore
Lucy.ResponsivePick a value by device, input, breakpoint or orientation: Responsive.pick(app, { mobile = 2, default = 5 })Components
Lucy.AdaptiveScales each ScreenGui for the deviceScaling
Lucy.ScrollScroll.reveal(object, margin?, only?) scrolls every ScrollingFrame above object (or only only) so it showsUtils

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

NameWhat it isMore
Lucy.PreviewShow stories in StudioStories
Lucy.DevtoolsLook at and drive a running UI in StudioDevtools

Utils and helpers

Lucy uses these itself, and you can too.

NameWhat it isMore
Lucy.FormatTurns values into text, such as Format.number(4200), which is "4,200"Utils
Lucy.ScrollScrolls ScrollingFrames to reveal an object, calculates offsets and scalesUtils
Lucy.SignalA small event for plain Luau objects: Signal.new(), :Connect(fn), :Fire(...)Utils
Lucy.MaidCollects things to clean up and cleans them in one callUtils

Lucy.Reactive, Lucy.Element and Lucy.Animate are the modules behind the shortcuts above (Lucy.ref is Lucy.Reactive.ref). Use the shortcuts.