CodelabDocs
Core concepts

Registry

The supplied elements and functions you build with.

A registry catalogs the primitives supplied by Codelab and its libraries. The element registry describes what each kind renders and which props it accepts. The function registry describes callable operations and their parameters.

Elements

Choose an element kind from these libraries, then configure its props.

LibraryWhat it providesExample kinds
HTMLStandard webpage elements for content, links, and forms.div, h1, a, form
COSSUI components for controls, cards, tables, dialogs, and other interface patterns.Button, Input, Card, Dialog
Radix ThemesLayout primitives for arranging and spacing content.Box, Flex, Grid, Container, Section
CodelabImage, navigation, and nested-page elements.codelab.image, codelab.navbar, codelab.outlet
LucideGeneral-purpose icons selected by name.lucide.icon
Simple IconsBrand and logo icons selected by name.simple-icons.icon
ReactA fragment that groups children without a wrapping element.react.fragment
MotionAnimated versions of HTML and SVG elements.motion.div, motion.button, motion.svg

Your own components combine elements into reusable trees. Each instance supplies its own prop values.

Functions

These supplied functions can be called from actions and function bindings. The table groups them by what they provide.

Source or purposeFunctionsWhat they do
Supabase authenticationsupabase-login, supabase-signup, supabase-logoutSign in, create an account, and sign out in the app's connected Supabase project.
Supabase datasupabase-queryRead or write tables in the connected project. The visitor's session and the project's access policies govern the operation.
Stateset-property, abort-controller-createUpdate a store field, or place an AbortController in a store to support cancellation.
NavigationnavigateMove to another URL.
HTTPhttp-requestSend a request to an API.
UI feedbacktoast, browser-alertShow a toast or a browser alert.
Timing and debuggingdelay, logWait before continuing, or write a console message.
JavaScriptcode-actionRun custom JavaScript behavior.

For example, a COSS Button can bind its onClick prop to an action that calls supabase-login. The element supplies the interface; the function supplies the operation.

See functions and parameters for inputs, and hooks for configured behavior that exposes values and methods.

On this page