@usevyre/ai-context 0.1.1 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/anti-patterns.json +222 -0
- package/dist/cheat-sheets/accordion.md +25 -0
- package/dist/cheat-sheets/alert.md +35 -0
- package/dist/cheat-sheets/avatar.md +34 -0
- package/dist/cheat-sheets/badge.md +41 -0
- package/dist/cheat-sheets/breadcrumb.md +26 -0
- package/dist/cheat-sheets/button.md +63 -0
- package/dist/cheat-sheets/calendar.md +27 -0
- package/dist/cheat-sheets/card.md +37 -0
- package/dist/cheat-sheets/checkbox.md +32 -0
- package/dist/cheat-sheets/command.md +29 -0
- package/dist/cheat-sheets/dropdownmenu.md +25 -0
- package/dist/cheat-sheets/field.md +36 -0
- package/dist/cheat-sheets/index.md +34 -0
- package/dist/cheat-sheets/input.md +28 -0
- package/dist/cheat-sheets/label.md +22 -0
- package/dist/cheat-sheets/modal.md +33 -0
- package/dist/cheat-sheets/pagination.md +15 -0
- package/dist/cheat-sheets/popover.md +32 -0
- package/dist/cheat-sheets/progress.md +27 -0
- package/dist/cheat-sheets/select.md +32 -0
- package/dist/cheat-sheets/separator.md +26 -0
- package/dist/cheat-sheets/sheet.md +28 -0
- package/dist/cheat-sheets/sidebar.md +33 -0
- package/dist/cheat-sheets/skeleton.md +27 -0
- package/dist/cheat-sheets/slider.md +22 -0
- package/dist/cheat-sheets/switch.md +26 -0
- package/dist/cheat-sheets/table.md +28 -0
- package/dist/cheat-sheets/tabs.md +24 -0
- package/dist/cheat-sheets/toast.md +41 -0
- package/dist/cheat-sheets/tooltip.md +30 -0
- package/dist/cheat-sheets/typography.md +22 -0
- package/dist/claude-context.md +716 -40
- package/dist/copilot-instructions.md +716 -40
- package/dist/cursor-rules.md +255 -261
- package/dist/full-context.md +715 -40
- package/dist/index.js +5054 -584
- package/dist/schema.json +1278 -0
- package/dist/tokens.json +1388 -0
- package/dist/tokens.md +180 -0
- package/dist/version-info.json +233 -0
- package/dist/windsurf-rules.md +716 -40
- package/package.json +9 -3
- package/LICENSE +0 -21
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Input — AI Cheat Sheet
|
|
2
|
+
> Quick reference for Claude / Cursor / Copilot
|
|
3
|
+
|
|
4
|
+
**Text input field. Wrap in Field for labels and validation. Use leftElement/rightElement for icons.**
|
|
5
|
+
|
|
6
|
+
```ts
|
|
7
|
+
import { Input } from "@usevyre/react"
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Valid Props
|
|
11
|
+
|
|
12
|
+
| Prop | Values | Default |
|
|
13
|
+
|------|--------|---------|
|
|
14
|
+
| `size` | `"sm"` \| `"md"` \| `"lg"` | `md` |
|
|
15
|
+
|
|
16
|
+
## Common AI Mistakes
|
|
17
|
+
|
|
18
|
+
- ❌ `size="icon"`
|
|
19
|
+
→ Use size="sm" | "md" | "lg"
|
|
20
|
+
- ❌ `type="search" for search UI`
|
|
21
|
+
→ Import Command from @usevyre/react for search palettes
|
|
22
|
+
|
|
23
|
+
## Examples
|
|
24
|
+
|
|
25
|
+
**Password input with icon**
|
|
26
|
+
```tsx
|
|
27
|
+
<Input type="password" rightElement={<EyeIcon />} placeholder="Password" />
|
|
28
|
+
```
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Label — AI Cheat Sheet
|
|
2
|
+
> Quick reference for Claude / Cursor / Copilot
|
|
3
|
+
|
|
4
|
+
**Accessible form label. Associate with input via htmlFor.**
|
|
5
|
+
|
|
6
|
+
```ts
|
|
7
|
+
import { Label } from "@usevyre/react"
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Valid Props
|
|
11
|
+
|
|
12
|
+
| Prop | Values | Default |
|
|
13
|
+
|------|--------|---------|
|
|
14
|
+
| `required` | `true` \| `false` | `false` |
|
|
15
|
+
|
|
16
|
+
## Examples
|
|
17
|
+
|
|
18
|
+
**Label with input**
|
|
19
|
+
```tsx
|
|
20
|
+
<Label htmlFor="email">Email address</Label>
|
|
21
|
+
<Input id="email" type="email" />
|
|
22
|
+
```
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Modal — AI Cheat Sheet
|
|
2
|
+
> Quick reference for Claude / Cursor / Copilot
|
|
3
|
+
|
|
4
|
+
**Dialog overlay for confirmations, forms, or focused content.**
|
|
5
|
+
|
|
6
|
+
```ts
|
|
7
|
+
import { Modal, ModalHeader, ModalBody, ModalFooter } from "@usevyre/react"
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Valid Props
|
|
11
|
+
|
|
12
|
+
| Prop | Values | Default |
|
|
13
|
+
|------|--------|---------|
|
|
14
|
+
| `size` | `"sm"` \| `"md"` \| `"lg"` \| `"full"` | `md` |
|
|
15
|
+
| `open` | `true` \| `false` | — |
|
|
16
|
+
|
|
17
|
+
## Common AI Mistakes
|
|
18
|
+
|
|
19
|
+
- ❌ `size="xl"`
|
|
20
|
+
→ Use size="lg" or size="full"
|
|
21
|
+
|
|
22
|
+
## Examples
|
|
23
|
+
|
|
24
|
+
**Confirmation modal**
|
|
25
|
+
```tsx
|
|
26
|
+
<Modal open={isOpen} onClose={() => setIsOpen(false)} title="Confirm Delete" size="sm">
|
|
27
|
+
<ModalBody>Are you sure you want to delete this item?</ModalBody>
|
|
28
|
+
<ModalFooter>
|
|
29
|
+
<Button variant="ghost" onClick={() => setIsOpen(false)}>Cancel</Button>
|
|
30
|
+
<Button variant="danger" onClick={handleDelete}>Delete</Button>
|
|
31
|
+
</ModalFooter>
|
|
32
|
+
</Modal>
|
|
33
|
+
```
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Pagination — AI Cheat Sheet
|
|
2
|
+
> Quick reference for Claude / Cursor / Copilot
|
|
3
|
+
|
|
4
|
+
**Page navigation for paginated lists or tables.**
|
|
5
|
+
|
|
6
|
+
```ts
|
|
7
|
+
import { Pagination } from "@usevyre/react"
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Examples
|
|
11
|
+
|
|
12
|
+
**Basic pagination**
|
|
13
|
+
```tsx
|
|
14
|
+
<Pagination page={currentPage} total={totalPages} onChange={setCurrentPage} />
|
|
15
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Popover — AI Cheat Sheet
|
|
2
|
+
> Quick reference for Claude / Cursor / Copilot
|
|
3
|
+
|
|
4
|
+
**Floating content panel anchored to a trigger element. For simple labels use Tooltip instead.**
|
|
5
|
+
|
|
6
|
+
```ts
|
|
7
|
+
import { Popover } from "@usevyre/react"
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Valid Props
|
|
11
|
+
|
|
12
|
+
| Prop | Values | Default |
|
|
13
|
+
|------|--------|---------|
|
|
14
|
+
| `placement` | `"top"` \| `"top-start"` \| `"top-end"` \| `"bottom"` \| `"bottom-start"` \| `"bottom-end"` \| `"left"` \| `"left-start"` \| `"left-end"` \| `"right"` \| `"right-start"` \| `"right-end"` | `bottom` |
|
|
15
|
+
| `open` | `true` \| `false` | — |
|
|
16
|
+
| `closeOnOutside` | `true` \| `false` | `true` |
|
|
17
|
+
|
|
18
|
+
## Common AI Mistakes
|
|
19
|
+
|
|
20
|
+
- ❌ `placement="top-center"`
|
|
21
|
+
→ Use placement="top" for centered placement
|
|
22
|
+
|
|
23
|
+
## Examples
|
|
24
|
+
|
|
25
|
+
**Popover with custom content**
|
|
26
|
+
```tsx
|
|
27
|
+
<Popover trigger={<Button variant="secondary">More info</Button>} placement="bottom-start">
|
|
28
|
+
<div style={{ padding: 'var(--vyre-spacing-4)' }}>
|
|
29
|
+
<p>Detailed information here.</p>
|
|
30
|
+
</div>
|
|
31
|
+
</Popover>
|
|
32
|
+
```
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Progress — AI Cheat Sheet
|
|
2
|
+
> Quick reference for Claude / Cursor / Copilot
|
|
3
|
+
|
|
4
|
+
**Visual progress indicator for tasks, uploads, or completion status.**
|
|
5
|
+
|
|
6
|
+
```ts
|
|
7
|
+
import { Progress } from "@usevyre/react"
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Valid Props
|
|
11
|
+
|
|
12
|
+
| Prop | Values | Default |
|
|
13
|
+
|------|--------|---------|
|
|
14
|
+
| `size` | `"sm"` \| `"md"` \| `"lg"` | `md` |
|
|
15
|
+
| `variant` | `"default"` \| `"accent"` \| `"teal"` \| `"success"` \| `"danger"` | `default` |
|
|
16
|
+
|
|
17
|
+
## Common AI Mistakes
|
|
18
|
+
|
|
19
|
+
- ❌ `value > 100`
|
|
20
|
+
→ Normalize your value to 0–100 range before passing
|
|
21
|
+
|
|
22
|
+
## Examples
|
|
23
|
+
|
|
24
|
+
**Upload progress**
|
|
25
|
+
```tsx
|
|
26
|
+
<Progress value={uploadPercent} variant="accent" size="sm" />
|
|
27
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Select — AI Cheat Sheet
|
|
2
|
+
> Quick reference for Claude / Cursor / Copilot
|
|
3
|
+
|
|
4
|
+
**Dropdown for selecting one option from a list.**
|
|
5
|
+
|
|
6
|
+
```ts
|
|
7
|
+
import { Select } from "@usevyre/react"
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Valid Props
|
|
11
|
+
|
|
12
|
+
| Prop | Values | Default |
|
|
13
|
+
|------|--------|---------|
|
|
14
|
+
| `size` | `"sm"` \| `"md"` \| `"lg"` | `md` |
|
|
15
|
+
| `disabled` | `true` \| `false` | `false` |
|
|
16
|
+
|
|
17
|
+
## Common AI Mistakes
|
|
18
|
+
|
|
19
|
+
- ❌ `Passing strings directly as children`
|
|
20
|
+
→ Pass options={[{ value: 'a', label: 'Option A' }]}
|
|
21
|
+
|
|
22
|
+
## Examples
|
|
23
|
+
|
|
24
|
+
**Controlled select**
|
|
25
|
+
```tsx
|
|
26
|
+
<Select
|
|
27
|
+
options={[{ value: 'react', label: 'React' }, { value: 'vue', label: 'Vue' }]}
|
|
28
|
+
value={framework}
|
|
29
|
+
onChange={setFramework}
|
|
30
|
+
placeholder="Choose framework"
|
|
31
|
+
/>
|
|
32
|
+
```
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Separator — AI Cheat Sheet
|
|
2
|
+
> Quick reference for Claude / Cursor / Copilot
|
|
3
|
+
|
|
4
|
+
**Horizontal or vertical divider line.**
|
|
5
|
+
|
|
6
|
+
```ts
|
|
7
|
+
import { Separator } from "@usevyre/react"
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Valid Props
|
|
11
|
+
|
|
12
|
+
| Prop | Values | Default |
|
|
13
|
+
|------|--------|---------|
|
|
14
|
+
| `orientation` | `"horizontal"` \| `"vertical"` | `horizontal` |
|
|
15
|
+
|
|
16
|
+
## Examples
|
|
17
|
+
|
|
18
|
+
**Horizontal separator**
|
|
19
|
+
```tsx
|
|
20
|
+
<Separator />
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**Vertical separator**
|
|
24
|
+
```tsx
|
|
25
|
+
<Separator orientation="vertical" />
|
|
26
|
+
```
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Sheet — AI Cheat Sheet
|
|
2
|
+
> Quick reference for Claude / Cursor / Copilot
|
|
3
|
+
|
|
4
|
+
**Side panel (drawer) that slides in from the edge. For forms, detail views, or settings.**
|
|
5
|
+
|
|
6
|
+
```ts
|
|
7
|
+
import { Sheet, SheetHeader, SheetBody, SheetFooter } from "@usevyre/react"
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Valid Props
|
|
11
|
+
|
|
12
|
+
| Prop | Values | Default |
|
|
13
|
+
|------|--------|---------|
|
|
14
|
+
| `size` | `"sm"` \| `"md"` \| `"lg"` \| `"full"` | `md` |
|
|
15
|
+
| `side` | `"left"` \| `"right"` | `right` |
|
|
16
|
+
| `open` | `true` \| `false` | — |
|
|
17
|
+
|
|
18
|
+
## Examples
|
|
19
|
+
|
|
20
|
+
**Settings sheet from the right**
|
|
21
|
+
```tsx
|
|
22
|
+
<Sheet open={isOpen} onClose={() => setIsOpen(false)} title="Settings" side="right">
|
|
23
|
+
<SheetBody>Settings content here.</SheetBody>
|
|
24
|
+
<SheetFooter>
|
|
25
|
+
<Button variant="accent">Save</Button>
|
|
26
|
+
</SheetFooter>
|
|
27
|
+
</Sheet>
|
|
28
|
+
```
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Sidebar — AI Cheat Sheet
|
|
2
|
+
> Quick reference for Claude / Cursor / Copilot
|
|
3
|
+
|
|
4
|
+
**App navigation sidebar. Use AppLayout as the root layout wrapper.**
|
|
5
|
+
|
|
6
|
+
```ts
|
|
7
|
+
import { AppLayout, Sidebar, SidebarHeader, SidebarContent, SidebarSection, SidebarItem, SidebarFooter } from "@usevyre/react"
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Valid Props
|
|
11
|
+
|
|
12
|
+
| Prop | Values | Default |
|
|
13
|
+
|------|--------|---------|
|
|
14
|
+
| `variant` | `"default"` \| `"floating"` | `default` |
|
|
15
|
+
|
|
16
|
+
## Examples
|
|
17
|
+
|
|
18
|
+
**App layout with sidebar**
|
|
19
|
+
```tsx
|
|
20
|
+
<AppLayout>
|
|
21
|
+
<Sidebar>
|
|
22
|
+
<SidebarHeader>Logo</SidebarHeader>
|
|
23
|
+
<SidebarContent>
|
|
24
|
+
<SidebarSection heading="Main">
|
|
25
|
+
<SidebarItem href="/" active>Dashboard</SidebarItem>
|
|
26
|
+
<SidebarItem href="/settings">Settings</SidebarItem>
|
|
27
|
+
</SidebarSection>
|
|
28
|
+
</SidebarContent>
|
|
29
|
+
<SidebarFooter><Avatar fallback="JD" size="sm" /></SidebarFooter>
|
|
30
|
+
</Sidebar>
|
|
31
|
+
<main>Page content</main>
|
|
32
|
+
</AppLayout>
|
|
33
|
+
```
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Skeleton — AI Cheat Sheet
|
|
2
|
+
> Quick reference for Claude / Cursor / Copilot
|
|
3
|
+
|
|
4
|
+
**Loading placeholder that mimics the shape of content while data loads.**
|
|
5
|
+
|
|
6
|
+
```ts
|
|
7
|
+
import { Skeleton } from "@usevyre/react"
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Valid Props
|
|
11
|
+
|
|
12
|
+
| Prop | Values | Default |
|
|
13
|
+
|------|--------|---------|
|
|
14
|
+
| `variant` | `"rect"` \| `"circle"` \| `"text"` | `rect` |
|
|
15
|
+
|
|
16
|
+
## Examples
|
|
17
|
+
|
|
18
|
+
**Avatar skeleton**
|
|
19
|
+
```tsx
|
|
20
|
+
<Skeleton variant="circle" width={40} height={40} />
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**Text line skeletons**
|
|
24
|
+
```tsx
|
|
25
|
+
<Skeleton variant="text" width="100%" />
|
|
26
|
+
<Skeleton variant="text" width="60%" />
|
|
27
|
+
```
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Slider — AI Cheat Sheet
|
|
2
|
+
> Quick reference for Claude / Cursor / Copilot
|
|
3
|
+
|
|
4
|
+
**Range input for selecting a numeric value within a range.**
|
|
5
|
+
|
|
6
|
+
```ts
|
|
7
|
+
import { Slider } from "@usevyre/react"
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Valid Props
|
|
11
|
+
|
|
12
|
+
| Prop | Values | Default |
|
|
13
|
+
|------|--------|---------|
|
|
14
|
+
| `size` | `"sm"` \| `"md"` | `md` |
|
|
15
|
+
| `disabled` | `true` \| `false` | `false` |
|
|
16
|
+
|
|
17
|
+
## Examples
|
|
18
|
+
|
|
19
|
+
**Volume slider**
|
|
20
|
+
```tsx
|
|
21
|
+
<Slider value={volume} onChange={setVolume} min={0} max={100} step={5} />
|
|
22
|
+
```
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Switch — AI Cheat Sheet
|
|
2
|
+
> Quick reference for Claude / Cursor / Copilot
|
|
3
|
+
|
|
4
|
+
**Toggle switch for boolean on/off settings.**
|
|
5
|
+
|
|
6
|
+
```ts
|
|
7
|
+
import { Switch } from "@usevyre/react"
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Valid Props
|
|
11
|
+
|
|
12
|
+
| Prop | Values | Default |
|
|
13
|
+
|------|--------|---------|
|
|
14
|
+
| `size` | `"sm"` \| `"md"` | `md` |
|
|
15
|
+
| `checked` | `true` \| `false` | — |
|
|
16
|
+
| `disabled` | `true` \| `false` | `false` |
|
|
17
|
+
|
|
18
|
+
## Examples
|
|
19
|
+
|
|
20
|
+
**Notifications toggle**
|
|
21
|
+
```tsx
|
|
22
|
+
<label style={{ display: 'flex', alignItems: 'center', gap: 'var(--vyre-spacing-2)' }}>
|
|
23
|
+
<Switch checked={notifications} onChange={setNotifications} />
|
|
24
|
+
Enable notifications
|
|
25
|
+
</label>
|
|
26
|
+
```
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Table — AI Cheat Sheet
|
|
2
|
+
> Quick reference for Claude / Cursor / Copilot
|
|
3
|
+
|
|
4
|
+
**Data table with optional sorting. Compose with TableHeader, TableRow, TableCell.**
|
|
5
|
+
|
|
6
|
+
```ts
|
|
7
|
+
import { Table, TableHead, TableBody, TableRow, TableHeader, TableCell } from "@usevyre/react"
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Examples
|
|
11
|
+
|
|
12
|
+
**Basic data table**
|
|
13
|
+
```tsx
|
|
14
|
+
<Table>
|
|
15
|
+
<TableHead>
|
|
16
|
+
<TableRow>
|
|
17
|
+
<TableHeader>Name</TableHeader>
|
|
18
|
+
<TableHeader>Status</TableHeader>
|
|
19
|
+
</TableRow>
|
|
20
|
+
</TableHead>
|
|
21
|
+
<TableBody>
|
|
22
|
+
<TableRow>
|
|
23
|
+
<TableCell>Alice</TableCell>
|
|
24
|
+
<TableCell><Badge variant="success">Active</Badge></TableCell>
|
|
25
|
+
</TableRow>
|
|
26
|
+
</TableBody>
|
|
27
|
+
</Table>
|
|
28
|
+
```
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Tabs — AI Cheat Sheet
|
|
2
|
+
> Quick reference for Claude / Cursor / Copilot
|
|
3
|
+
|
|
4
|
+
**Tabbed navigation for switching between content panels.**
|
|
5
|
+
|
|
6
|
+
```ts
|
|
7
|
+
import { Tabs, TabList, Tab, TabPanels, TabPanel } from "@usevyre/react"
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Examples
|
|
11
|
+
|
|
12
|
+
**Basic tabs**
|
|
13
|
+
```tsx
|
|
14
|
+
<Tabs defaultIndex={0}>
|
|
15
|
+
<TabList>
|
|
16
|
+
<Tab>Overview</Tab>
|
|
17
|
+
<Tab>Settings</Tab>
|
|
18
|
+
</TabList>
|
|
19
|
+
<TabPanels>
|
|
20
|
+
<TabPanel>Overview content</TabPanel>
|
|
21
|
+
<TabPanel>Settings content</TabPanel>
|
|
22
|
+
</TabPanels>
|
|
23
|
+
</Tabs>
|
|
24
|
+
```
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Toast — AI Cheat Sheet
|
|
2
|
+
> Quick reference for Claude / Cursor / Copilot
|
|
3
|
+
|
|
4
|
+
**Transient notification. Use the useToast hook to trigger toasts imperatively.**
|
|
5
|
+
|
|
6
|
+
```ts
|
|
7
|
+
import { useToast, ToastProvider } from "@usevyre/react"
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Valid Props
|
|
11
|
+
|
|
12
|
+
| Prop | Values | Default |
|
|
13
|
+
|------|--------|---------|
|
|
14
|
+
| `variant` | `"default"` \| `"success"` \| `"warning"` \| `"danger"` | `default` |
|
|
15
|
+
|
|
16
|
+
## Common AI Mistakes
|
|
17
|
+
|
|
18
|
+
- ❌ `Rendering <Toast> directly in JSX`
|
|
19
|
+
→ Use: const { toast } = useToast(); then toast({ title, variant })
|
|
20
|
+
- ❌ `variant="error"`
|
|
21
|
+
→ Use variant="danger"
|
|
22
|
+
- ❌ `variant="info"`
|
|
23
|
+
→ Use variant="default"
|
|
24
|
+
|
|
25
|
+
## Examples
|
|
26
|
+
|
|
27
|
+
**Trigger a success toast**
|
|
28
|
+
```tsx
|
|
29
|
+
const { toast } = useToast();
|
|
30
|
+
|
|
31
|
+
<Button onClick={() => toast({ title: 'Saved!', variant: 'success', duration: 3000 })}>
|
|
32
|
+
Save
|
|
33
|
+
</Button>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**Setup: wrap app with ToastProvider**
|
|
37
|
+
```tsx
|
|
38
|
+
<ToastProvider>
|
|
39
|
+
<App />
|
|
40
|
+
</ToastProvider>
|
|
41
|
+
```
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Tooltip — AI Cheat Sheet
|
|
2
|
+
> Quick reference for Claude / Cursor / Copilot
|
|
3
|
+
|
|
4
|
+
**Short label that appears on hover/focus. For rich content use Popover instead.**
|
|
5
|
+
|
|
6
|
+
```ts
|
|
7
|
+
import { Tooltip } from "@usevyre/react"
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Valid Props
|
|
11
|
+
|
|
12
|
+
| Prop | Values | Default |
|
|
13
|
+
|------|--------|---------|
|
|
14
|
+
| `placement` | `"top"` \| `"bottom"` \| `"left"` \| `"right"` | `top` |
|
|
15
|
+
|
|
16
|
+
## Common AI Mistakes
|
|
17
|
+
|
|
18
|
+
- ❌ `Using Tooltip for rich content (forms, buttons, etc.)`
|
|
19
|
+
→ Use Popover for rich interactive content
|
|
20
|
+
|
|
21
|
+
## Examples
|
|
22
|
+
|
|
23
|
+
**Tooltip on an icon button**
|
|
24
|
+
```tsx
|
|
25
|
+
<Tooltip content="Close dialog" placement="bottom">
|
|
26
|
+
<Button variant="ghost" size="icon" aria-label="Close">
|
|
27
|
+
<X size={16} />
|
|
28
|
+
</Button>
|
|
29
|
+
</Tooltip>
|
|
30
|
+
```
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Typography — AI Cheat Sheet
|
|
2
|
+
> Quick reference for Claude / Cursor / Copilot
|
|
3
|
+
|
|
4
|
+
**Text rendering components with semantic scale. Includes Text, Heading, Lead, Code, Blockquote.**
|
|
5
|
+
|
|
6
|
+
```ts
|
|
7
|
+
import { Text, Heading, Lead, Code, Blockquote } from "@usevyre/react"
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Common AI Mistakes
|
|
11
|
+
|
|
12
|
+
- ❌ `Using raw <h1>, <p> tags instead of Typography components`
|
|
13
|
+
→ Use <Heading>, <Text>, <Lead> from @usevyre/react
|
|
14
|
+
|
|
15
|
+
## Examples
|
|
16
|
+
|
|
17
|
+
**Page heading and body text**
|
|
18
|
+
```tsx
|
|
19
|
+
<Heading size="2xl" as="h1">Dashboard</Heading>
|
|
20
|
+
<Lead>Welcome back. Here's what's happening today.</Lead>
|
|
21
|
+
<Text size="sm" style={{ color: 'var(--vyre-color-semantic-text-muted)' }}>Last updated 5 minutes ago.</Text>
|
|
22
|
+
```
|