# Primora Component Quick Reference
A quick reference guide for using Primora's enhanced UI components.
---
## 🚀 Quick Start
```tsx
import {
Button,
Card,
Modal,
Tooltip,
Dropdown,
Progress,
Tabs,
toast,
ToastContainer,
} from "./components";
```
---
## 📦 Components
### Button
```tsx
// Primary action
// With icon
}>
Add Item
// Loading state
// Sizes
// Variants
```
### Card
```tsx
// Basic card
Card content goes here
// With eyebrow and description
{/* Content */}
// Stat card
}
trend="up"
trendValue="+12%"
/>
// Interactive card
Clickable card
```
### Modal
```tsx
const [open, setOpen] = createSignal(false);
setOpen(false)}
title="Confirm Action"
description="Are you sure you want to proceed?"
size="md"
>
Modal content
```
### Tooltip
```tsx
} />
// With delay
Hover me
```
### Dropdown
```tsx
Actions}
placement="bottom-end"
items={[
{
id: "edit",
label: "Edit",
icon: ,
onClick: () => handleEdit(),
},
{
id: "duplicate",
label: "Duplicate",
icon: ,
onClick: () => handleDuplicate(),
},
{ id: "divider", divider: true },
{
id: "delete",
label: "Delete",
icon: ,
danger: true,
onClick: () => handleDelete(),
},
]}
/>
```
### Progress
```tsx
// Linear progress
// Circular progress
// Spinner
```
### Tabs
```tsx
console.log(tabId)}
tabs={[
{
id: "overview",
label: "Overview",
icon: ,
content: ,
},
{
id: "settings",
label: "Settings",
badge: "3",
content: ,
},
{
id: "disabled",
label: "Disabled",
disabled: true,
content: null,
},
]}
/>
// Variants
```
### Toast
```tsx
// Add to app root
// Use anywhere
toast.success("Operation successful!");
toast.error("Something went wrong", "Error");
toast.warning("Please review your changes");
toast.info("New update available", undefined, 10000);
// Manual control
const id = toast.show({
variant: "info",
message: "Processing...",
duration: 0, // Won't auto-dismiss
});
// Dismiss manually
toast.dismiss(id);
toast.dismissAll();
```
### Input
```tsx
// Text input
setName(e.currentTarget.value)}
error={errors().name}
/>
// Textarea