UI recipes
Build components and screens for the blocks, such as notifications, search, onboarding, comments, members, API keys, the audit log, billing and settings, from shadcn or React Native components and the blocks' hooks.
better-supabase ships no visible UI components. A recipe builds one component or one screen from your own shadcn components (web) or React Native primitives (native) and one or more blocks. Every recipe has web code; the ones that fit a phone also have native code, which calls the same hook. Both come from the example apps, apps/examples/nextjs and apps/examples/expo-powersync, so they typecheck and run.
Each recipe below has a docs page with its install commands and code, and a page at bettersupabase.com/recipes with a screenshot. The native snippets use plain React Native primitives, so they run without a styling library; React Native Reusables serves shadcn-style native components from a working registry if you want them.
Identity & access
Two-factor setup
A card that enrolls an authenticator app with a QR code, verifies the first code and removes the factor. Web code.
Can
Shows an action only to members who hold a permission key; the checks of one render share one round trip. Web code.
Subject link
A link to any subject type, titled and routed by subject_titles, with plain text for a record the caller can't read. Web code.
Subject chip
A compact badge with a subject's type and title that links to its page. Web code.
Sessions list
The caller's signed-in devices with the last activity and a button to end each session. Web code.
SSO connection settings
The organization's SAML or OIDC connection with its domains and the role new members get. Web code.
Access requests inbox
Requests for access to a resource, with approve and deny buttons for the owner. Web code.
My work
What waits on the caller across the installed blocks, from getMyWork: assigned work, approvals, due reminders, mentions and SLA warnings, each linked to its record. Web code.
Tenancy & accounts
Organization switcher
A menu of the user's organizations that switches the active one and refreshes the session for its tenant claim. Web and React Native code.
Settings layout
Settings pages generated from the settings definition: a section per scope and a control per key, picked by the kind its schema declares. Web and React Native code.
Members table
An organization's members with their roles, where a role change shows at once and a member can be removed. Web and React Native code.
Invite dialog
A form that invites a teammate by email with a role, then shows the token for the accept link. Web and React Native code.
Profile form
A form that updates the caller's display name through a server action and shows field errors. Web code.
Workspace URL field
An organization form with a name and a URL slug, where reserved and taken slugs come back as field errors. Web code.
Team picker
A select of the caller's teams in the active organization, to scope a page or assign work. Web code.
Collaboration
Comment thread
A record's comments with their authors and a form to add one, kept current after each write. Web and React Native code.
Channel sidebar
The caller's channels with unread and mention counts, kept live, with dialogs to browse, join and create channels. Web code.
Message list
A conversation's messages over Realtime, with older pages on demand, who is typing, reply counts and the composer. Web code.
Message composer
A message box that sends on Enter, signals typing, and uploads dropped, pasted or picked files onto the message. Web code.
Thread panel
A thread beside the channel: the root message, its replies live over Realtime, and a composer that replies into it. Web code.
Presence avatars
Who else has a record open (a channel, a comment thread's record or a document), on the record's presence topic. Web code.
Reactions bar
Emoji reactions under a record with counts, which toggle the caller's own reaction. Web code.
Share link dialog
A dialog that creates an expiring link to a record and revokes it. Web code.
Attachments uploader
A drop zone that uploads files to a record and lists them with a download link. Web code.
Subject timeline
One record's comments, files and versions merged newest first, from bsb.record(...).timeline, skipping the bindings the caller can't read. Web code.
Post board
A feedback board's posts ranked by votes, with an upvote toggle, the roadmap status, moderation state and a New post dialog. Web code.
Acknowledgement inbox
The records a member is asked to read, soonest due first, with the due date and a button that acknowledges the version they read. Web code.
Meeting agenda
The organization's meetings in a data grid with their kind, place and status, the most recent first, each linking to its minutes. Web code.
Meeting minutes
One meeting with the minutes of each agenda item, its decisions with the votes so far and a Settle button, the tasks it opened, and Start and Hold buttons for the people who run it. Web code.
Notifications & messaging
Notification bell
A header button with the unread count, which updates when a notification arrives or is read. Web and React Native code.
Notification list
The caller's latest notifications with an unread marker, loaded again on every change. Web and React Native code.
Inbox with threads
A shared inbox queue with search and status, assignee and channel filters in the URL; each row opens its thread beside the list. Web code.
Push opt-in
A card that registers this browser for web push and removes it again. Web code.
Growth & engagement
Onboarding checklist
The organization's getting-started steps with progress, hidden once every step is done. Web and React Native code.
Announcement banner
The newest live announcement for the user and organization, with a dismiss button. Web code.
Feature flags
Which feature flags are on for the active organization, read-only. Web code.
Waitlist signup
An email form that joins the waitlist and shows the position in line. Web code.
CRM & sales
Contact detail
A person or company with its details, related contacts and the latest activity. Web code.
Deal board
Deals as cards in pipeline stage columns, moved by drag and drop. Web code.
Sequence builder
Each sequence's email, wait and task steps in order, with its enrollment counts, an Add step dialog and an Activate or Pause button. Web code.
Activity timeline
Calls, emails and meetings with a contact, newest first. Web code.
Quote builder
A quote with line items, discounts and totals in minor units, sent for acceptance. Web code.
Targets progress
Sales targets for the period with the progress toward each one. Web code.
Contract renewals
Active contracts with their value, end date and notice deadline, the nearest deadline first, so a renewal is decided in time. Web code.
Work management
Command search
A search dialog over the search index, with favorites and recents before the user types. Web and React Native code.
Tag input
A record's tags with suggestions, where typing a name adds a tag or creates it. Web and React Native code.
Work item board
Work items in state columns, ordered by rank and moved through allowed transitions. Web code.
Entity form
A create dialog whose inputs come from recordForm: the entity's own fields and the organization's custom fields, validated together by useRecordForm before the Server Action runs. Web code.
Work item grid
A data grid of work items with filters, sorting and saved views. Web code.
Approvals queue
Requests waiting for the caller's decision, with approve and reject buttons. Web code.
SLA badges
A badge on a record with the time left before its SLA is breached. Web code.
Custom fields editor
A settings page that adds, orders and removes the custom fields of a record type. Web code.
Bulk action bar
A bar over a selection of rows that runs an action on all of them and reports failures. Web code.
Related items panel
The records linked to a record, with a picker to add or remove a link. Web code.
Dispatch board
A week of technicians by day with their scheduled work orders, and the backlog to schedule. Web code.
Technician day
A technician's stops for the day in route order, each with the button that moves it on. Web code.
Status page
A public status page: the overall status, each public component with its daily uptime, and the public incident updates. Web code.
Risk register
The organization's risks in a data grid with their residual band, status and next review date, the highest residual score first. Web code.
Risk heatmap
The open risks on the default matrix, one cell per likelihood and impact with the count in the band's color. Web code.
Case board
The open cases in stage columns, reported to verifying; dragging a card moves the case to that stage of its kind's pipeline. Web code.
Case detail
One case with its severity, root cause, what still blocks closing it and its actions, and a Close button once nothing blocks it. Web code.
Inspection programme calendar
The audit programme in a data grid: each inspection in the month it is planned, with its number, kind, programme and status. Web code.
Inspection run
One inspection with its status, checklist and team, its findings with a Raise case button for each nonconformity, and a Close button once every one has its case. Web code.
People
Employee directory
A list of employees with server-side search, a status filter and a link to each record. Web code.
Qualification matrix
A table of the members who lack a required qualification, hold an expired one or will lose one soon. Web code.
My qualifications
The signed-in member's certificates and licences with their expiry, and the required ones they still lack. Web code.
Roster board
This week's shifts in a column per day, with their status and how many places are filled. Web code.
Medication chart
A record's medication orders for today, with the status of each planned dose. Web code.
Care plan editor
A client's care plan as a tree of problems, goals and actions, with the status of each and the actions that wait for an approval. Web code.
Care plan evaluations
The evaluations of a care plan's goals in a data grid, the newest first, with the goal status each one found. Web code.
Hiring board
Candidates for an opening as cards in interview stage columns. Web code.
Timesheet
A week of time entries per project with a running timer and totals. Web code.
Payroll runs
The organization's payroll runs, newest period first, with their line count, export format and whether they are locked. Web code.
Observation chart
A record's latest vital signs with the flag against each reference range and a sparkline of the recent readings. Web code.
Billing & commerce
Plan picker
The plans with their prices and a checkout button each. Checkout starts in a server action or API route that holds the Stripe key, and the client opens the URL it returns. Web and React Native code.
Usage meter
This period's usage per meter against the plan's quota, with the reset date. Web and React Native code.
Feature gate
Content shown only when the active organization's plan includes a feature, read from the session's features claim and updated when the session refreshes. Web and React Native code.
Shipment tracking
Shipments with their status and the tracking timeline of the selected one, newest event first. Web code.
Invoices table
The organization's invoices with their status, amount and a link to the PDF. Web code.
Product catalog grid
Products in a grid with prices, variants and a filter by collection. Web code.
Inventory table
Stock levels per product and location, with a form to adjust a count. Web code.
Order detail
An order with its lines, totals, payment state and fulfillment steps. Web code.
Kitchen display
Open tickets per kitchen station, each line moved from queued to served, refreshed over Realtime. Web code.
Order state board
Today's kitchen orders in preparation-state columns; dragging an order forward moves all of its lines. Web code.
Promotion code field
A field that checks a promotion code and shows the discount it gives. Web code.
Trial balance
Total assets, liabilities and equity and this year's net income, then each account's debit, credit and balance with the totals. Web code.
Production order board
Production orders in status columns from draft to done; dragging a draft to Released releases it, and a running order to Done completes it. Web code.
Bank reconciliation
Each bank account's statement balance and what is left to match, then its latest transactions; an unmatched one offers its best invoice to match or can be ignored. Web code.
Scheduling
Calendar view
A month and week calendar of events with a dialog to add one. Web code.
Booking page
A public page that shows open slots and books one without overlaps. Web code.
Availability editor
Weekly working hours and date overrides that set which slots can be booked. Web code.
Reminders list
The next events with the caller's reminders on each, to add a reminder at an offset before an event or remove one. Web code.
Content & files
Grants editor
The grants on a drive item, inherited ones included, with a picker to share it with a member or team at a role. Web code.
File request upload
The public page of a file request link, where anyone with the link sends a file into a folder, with the link's password when it has one. Web code.
Document register
The organization's controlled documents in a data grid with their number, status, effective version and next review date, flagged when the review is due. Web code.
Drive explorer
Folders and files with upload, rename, move and a breadcrumb trail, each file with its labels and the approval of its current version. Web code.
Form builder
An editor for form fields and a preview, with the responses in a table. Web code.
Course outline
A course's modules and lessons in rank order, with the caller's progress, certificate and an Enroll button. Web code.
Lesson player
One lesson's content with a Mark as done button, or its quiz, which the database grades on submit. Web code.
Templates gallery
Templates in a grid with a preview and a button to create a record from one. Web code.
Document editor
A rich text editor for a document with autosave, collaborators and a suggestion mode that editors accept or reject. Web code.
AI
Chat with history
An AI chat that stores every message, resumes a stored conversation and streams the reply. Web code.
Chat message as Markdown
An assistant answer rendered as Markdown with Streamdown: a caret while it streams, static once stored, and only safe elements and links. Web code.
Knowledge base upload
A form that adds a document to the knowledge base, which chunks and embeds it for search. Web code.
Agent activity
The agent runs for the organization with their steps and the approvals that wait for a person. Web code.
AI task queue
A table of scheduled AI prompts with each task's next run and latest run status, plus pause and resume. Web code.
AI provider settings
A settings card that lists the organization's own AI provider keys and models, adds a key to Vault and removes one. Web code.
Automation
Workflow canvas
A node editor for a workflow definition that saves drafts, publishes versions and runs the workflow. Web code.
Workflow runs
The latest workflow runs with their status, which update while a run is in progress. Web code.
Connector credentials
A sheet that stores a connector credential encrypted and revokes it, without reading the secret back. Web code.
Rule builder
A condition tree with field, operator and value rows, nested And and Or groups, drag to reorder and a fixed first condition, saved as a versioned rule. Web code.
Job runs table
The latest background job runs with their status, attempts and error, and a button to retry a failed run. Web code.
Developer platform
API keys table
The organization's API keys, with a form that creates one and shows its token once, and a revoke button per key. Web and React Native code.
Webhook endpoints
The organization's webhook endpoints with their recent deliveries and a retry button. Web code.
Service accounts table
Machine identities with their scopes, last use and a button to disable one. Web code.
Signing keys rotation
The active and previous signing keys with a button to rotate them. Web code.
Admin & compliance
Audit log table
The audit trail, newest first, with filters by actor and action and older pages on demand. Web and React Native code.
Support session banner
A banner that tells the user a support agent is viewing the app as them, rendered on the server. Web code.
Metrics dashboard
A card per metric: the 30-day total against the 30 days before, with daily bars. Web code.
Data export and delete
Buttons to export the caller's data and to request account deletion, with the request status. Web code.
Control posture
One card per compliance framework with its passing, failing and not started controls, then the overdue evidence tasks. Web code.
Consent register
The purposes an organization asks consent for, with their lawful basis, version, how long a grant lasts and whether it needs a signature. Web code.
Database primitives
Undo toast
A toast after a delete with a button that restores the record from the trash. Web code.
Version history
The saved versions of a record with a diff and a button to restore one. Web code.
Trash bin
Deleted records with buttons to restore them or delete them for good. Web code.
CSV import wizard
A stepper that uploads a CSV, maps its columns, validates the rows and imports them. Web code.
App tables
Record grid
An app table as a data grid with search, filters, saved views and bulk actions on the selected rows, including a Set field action. Web code.
Record form
A create form whose inputs follow each column: a length limit for text, a select for options, a date input and a searchable picker for references. Web code.
Record page
One row as a page: its fields, the rows that reference it, and comments and tags once the table is a subject. Web code.
Record board
An app table as a board with a column per option value, where dragging a card writes the value and its rank. Web code.
Record calendar
Rows on a month grid by a date column, with the month in the URL and a count of rows without a date. Web code.
Record timeline
Rows as bars from a start date to an end date over four weeks, with a lane per assignee. Web code.
Record Gantt chart
A row per record grouped by its parent, with a bar for its planned dates and a marker for rows without dates. Web code.
Record history
Every version subject.versions kept of a row, with the fields each one changed and a restore per field. Web code.
Upsert import
Paste CSV, map its columns, preview the rows it creates and changes, then upsert them on one of the table's unique sets. Web code.
Last updated on