Skip to content

Attribution

A small badge that displays “Built with Lucy” alongside Lucy’s mascot head, in five variants across light and dark themes.

Attribution exampleAttribution example
Lucy.Stack.new({
    direction = "horizontal",
    gap = "Space3",
    children = {
        Lucy.Attribution.new({ variant = "default" }),
        Lucy.Attribution.new({ variant = "light" }),
        Lucy.Attribution.new({ variant = "outline" }),
        Lucy.Attribution.new({ variant = "secondary" }),
        Lucy.Attribution.new({ variant = "brand" }),
    },
    Parent = parent,
})

Props

PropTypeDefaultState keyWhat it does
labelstring"Built with"yesPrefix text before the brand name
brandstring"Lucy"yesBrand text
variantstring"default"yesdefault, light, secondary, outline or brand
sizestring"md"yessm (24 px), md (32 px) or lg (40 px)
shapestring"rounded"yesrounded (pill) or square ($RadiusMd)
imagestring?nilyesCustom image asset id in place of Lucy’s mascot head
onClick((handle) -> ())?nilnoTurns the badge into a button (ImageButton) with hover and press states
visiblebooleantrueyesShows or hides the badge

It also takes the props every component takes.

Variants

VariantBackgroundWhat it looks like
default$CardCard surface with a thin border and dark linework mascot
lightLight fillBright badge with dark text and crisp ink mascot linework
secondary$SecondaryMuted surface with a thin border
outlineTransparentBorder only ($Border), showing whatever sits behind it
brandSubtle brand tintHighlighted badge in the theme’s accent

The mascot art swaps between dark and light assets so hair lines, eyes and headphones stay legible on both dark and light surfaces.

Examples

In a settings or credits panel

Lucy.Panel.new({
    title = "About",
    children = {
        Lucy.Text.new({ text = "Made with Lucy.", variant = "muted" }),
        Lucy.Attribution.new({
            variant = "outline",
            size = "sm",
        }),
    },
    Parent = parent,
})

Sizes and shapes

Lucy.Stack.new({
    direction = "horizontal",
    gap = "Space3",
    children = {
        Lucy.Attribution.new({ size = "sm" }),
        Lucy.Attribution.new({ size = "md" }),
        Lucy.Attribution.new({ size = "lg" }),
        Lucy.Attribution.new({ shape = "square" }),
    },
    Parent = parent,
})

Clickable badge

Pass onClick to make the badge clickable, for opening a credits window or link notice:

Lucy.Attribution.new({
    onClick = function()
        app.state:set("ui.credits.open", true)
    end,
    Parent = parent,
})

Preview

In Studio, from the command bar: Lucy.Preview.show("Attribution").