Ui components

From elie222/inbox-zero · View interactive version

Ui components is an AI agent skill from the GitHub repository elie222/inbox-zero. UI component and styling guidelines using Shadcn UI, Radix UI, and Tailwind

How to use this skill

Skill file

UI Components and Styling

UI Framework

Install new Shadcn components

pnpm dlx shadcn@latest add COMPONENT

Example:

pnpm dlx shadcn@latest add progress

Data Fetching with SWR

For API get requests to server use the swr package:

const searchParams = useSearchParams();
const page = searchParams.get("page") || "1";
const { data, isLoading, error } = useSWR<PlanHistoryResponse>(
  `/api/user/planned/history?page=${page}`
);

Loading Components

Use the LoadingContent component to handle loading states:

<Card>
  <LoadingContent loading={isLoading} error={error}>
    {data && <MyComponent data={data} />}
  </LoadingContent>
</Card>

Form Components

Text Inputs

<Input
  type="email"
  name="email"
  label="Email"
  registerProps={register("email", { required: true })}
  error={errors.email}
/>

Text Area

<Input
  type="text"
  autosizeTextarea
  rows={3}
  name="message"
  placeholder="Paste in email content"
  registerProps={register("message", { required: true })}
  error={errors.message}
/>
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.