Skip to content
Developer

UI states

Every screen in RedPhantom Trade handles loading, empty, error and permission states with the same components. Use this page as a reference when you build new screens.

Loading

Skeletons mirror the final layout so the page doesn’t jump. Screens use useSimulatedLoad() — swap it for your data-fetching hook.

Table rows

SkeletonRows — lists and tables while data loads (useSimulatedLoad).

Cards & metrics

Skeleton blocks shaped like the final content.

AI thinking

Shown in the assistant drawer while a result is generated.

Reading related records…

Empty

Every list has an empty state that says what happened and what to do next.

First use

No records yet — explain value, offer the primary action.

No contacts yet

Add your first contact or import a CSV from your old CRM.

Import

No results

Filters or search matched nothing — offer to clear.

No deals match “dental”

Try a different search or clear the stage filter.

All caught up

A positive empty state for queues.

Inbox zero

Every conversation has a reply or an owner.

Nothing scheduled

Calm, informative, with an optional action.

No meetings today

A good day for deep work.

Illustrations

Eight drawn scenes for EmptyState’s art prop. They are painted with palette tokens, so they recolour with every palette and in dark mode, and float gently unless reduced motion is on.

art="inbox"

Inbox, conversations

art="search"

No results, not found

art="done"

Queues cleared, tasks done

art="calendar"

Nothing scheduled

art="agents"

AI agents, automations

art="data"

Reports, usage, no data

art="error"

ErrorState

art="locked"

PermissionState

Error & permission

Errors reassure and offer a retry. Permission states respect the role matrix in Settings → Team & roles.

Error with retry

ErrorState — the request failed; data is safe. Retry moves to loading, then loaded.

Couldn’t load this data

The request timed out. Your data is safe — try again in a moment.

Permission

PermissionState and disabled controls. Your role: Owner — switch it from the profile menu.

Billing is limited to the owner

Ask a workspace owner to change your role.

Disabled controls stay visible and explain why — never silently missing.

Feedback & forms

Toasts confirm actions; validation errors sit next to the field.

Toasts

useToast() — short confirmations; destructive or AI actions offer Undo.

Form validation

Errors appear on submit, next to the field, with aria-invalid.

Work email preferred

Badges & buttons

Semantic tokens only — dark mode remaps them automatically.

Badges & tones

Colour is reserved for status, actions and selection. The same seven tones work in dark mode.

NeutralPrimarySuccessWarningDangerInfoAi
neutralprimarysuccesswarningdangerinfoai
inquiryqualifiedproposalnegotiationwonlost

Buttons

Six variants, four sizes, icon-only buttons need an aria-label.