### Example AI Prompts for MCP Source: https://context7.com/keenthemes/reui/llms.txt Example prompts to guide AI-assisted component generation after setting up the MCP server. ```text Example AI prompts after MCP setup: - "Create a responsive dashboard with Cards, Chart, Data Grid, Filters, and Sidebar" - "Generate a User Management interface with Data Grid, Forms, and Modals" - "Build a multi-step onboarding form using Stepper with form validation" ``` -------------------------------- ### Installation Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/radix/timeline.mdx Instructions for installing the Timeline component. ```APIDOC ## Installation ### CLI ```bash npx shadcn@latest add @reui/r-timeline ``` ### Manual 1. Install the following dependencies: ```bash npm install radix-ui ``` 2. Copy and paste the following code into your project: ```tsx // components/reui/timeline.tsx // [Component Source Code Here] ``` ``` -------------------------------- ### Installation Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/base/frame.mdx Instructions for installing the Frame component using CLI or manually. ```APIDOC ## Installation ### CLI ```bash npx shadcn@latest add @reui/frame ``` ### Manual 1. Install the following dependencies: ```bash npm install @base-ui/react ``` 2. Copy and paste the following code into your project: ```tsx // components/reui/frame.tsx (content to be provided by ComponentSource) ``` ``` -------------------------------- ### Installation Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/base/timeline.mdx Instructions for installing the Timeline component using CLI or manual methods. ```APIDOC ## Installation ### CLI ```bash npx shadcn@latest add @reui/timeline ``` ### Manual 1. Install the following dependencies: ```bash switch npm install @base-ui/react ``` 2. Copy and paste the following code into your project: ```typescript // components/reui/timeline.tsx // [ComponentSource content would go here if available] ``` ``` -------------------------------- ### Alert Installation Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/base/alert.mdx Instructions for installing the Alert component using CLI or manual steps. ```APIDOC ## Installation CLI Manual ```bash component npx shadcn@latest add @reui/alert ``` Import the following variables into your CSS file ```css @theme inline { --color-destructive-foreground: var(--destructive-foreground); --color-info: var(--info); --color-info-foreground: var(--info-foreground); --color-success: var(--success); --color-success-foreground: var(--success-foreground); --color-warning: var(--warning); --color-warning-foreground: var(--warning-foreground); --color-invert: var(--invert); --color-invert-foreground: var(--invert-foreground); } :root { --destructive-foreground: var(--color-red-800); --success: var(--color-emerald-500); --success-foreground: var(--color-emerald-900); --info: var(--color-violet-500); --info-foreground: var(--color-violet-900); --warning: var(--color-yellow-500); --warning-foreground: var(--color-yellow-900); --invert: var(--color-zinc-900); --invert-foreground: var(--color-zinc-50); } .dark { --destructive-foreground: var(--color-red-600); --success: var(--color-emerald-500); --success-foreground: var(--color-emerald-600); --info: var(--color-violet-500); --info-foreground: var(--color-violet-600); --warning: var(--color-yellow-500); --warning-foreground: var(--color-yellow-600); --invert: var(--color-zinc-700); --invert-foreground: var(--color-zinc-50); } ``` Copy and paste the following code into your project. ``` -------------------------------- ### Install Dependencies Source: https://github.com/keenthemes/reui/blob/main/CONTRIBUTING.md Install all necessary project dependencies using npm. ```sh npm install ``` -------------------------------- ### Frame Installation Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/radix/frame.mdx Instructions for installing the Reui Frame component. ```APIDOC ## Installation ### CLI ```bash npx shadcn@latest add @reui/frame ``` ### Manual 1. Install the following dependencies: ```bash npm install @base-ui/react ``` 2. Copy and paste the following code into your project. ```typescript // components/reui/frame.tsx (content to be provided by ComponentSource) ``` ``` -------------------------------- ### Install use-file-upload via CLI Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/base/file-upload.mdx Use this command to install the use-file-upload hook using the shadcn CLI. ```bash npx shadcn@latest add @reui/use-file-upload ``` -------------------------------- ### Data Grid Usage Example Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/radix/data-grid.mdx Basic usage example demonstrating how to import and set up the Data Grid component with pagination and a custom footer. ```tsx import { DataGrid, DataGridContainer, DataGridPagination, DataGridTable, DataGridTableFootRow, DataGridTableFootRowCell, } from "@/components/reui/data-grid" const footer = ( Showing {data.length} rows ) const table = useReactTable({ data, columns, getCoreRowModel: getCoreRowModel(), }) return ( ) ``` -------------------------------- ### Stepper Installation Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/base/stepper.mdx Instructions for installing the Stepper component using either the CLI or manual methods. ```APIDOC ## Installation ### CLI ```bash npx shadcn@latest add @reui/stepper ``` ### Manual Copy and paste the following code into your project: ```tsx // components/reui/stepper.tsx (example path) // ... component source code ... ``` ``` -------------------------------- ### Install Virtualization Dependencies Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/base/data-grid.mdx Install the @tanstack/react-virtual package to enable virtualization and infinite scroll features. ```bash npm install @tanstack/react-virtual ``` -------------------------------- ### Alert Component Installation Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/radix/alert.mdx Install the Alert component using the shadcn-ui CLI or manually by importing the necessary files. ```bash npx shadcn@latest add @reui/alert ``` ```css @theme inline { --color-destructive-foreground: var(--destructive-foreground); --color-info: var(--info); --color-info-foreground: var(--info-foreground); --color-success: var(--success); --color-success-foreground: var(--success-foreground); --color-warning: var(--warning); --color-warning-foreground: var(--warning-foreground); --color-invert: var(--invert); --color-invert-foreground: var(--invert-foreground); } :root { --destructive-foreground: var(--color-red-800); --success: var(--color-emerald-500); --success-foreground: var(--color-emerald-900); --info: var(--color-violet-500); --info-foreground: var(--color-violet-900); --warning: var(--color-yellow-500); --warning-foreground: var(--color-yellow-900); --invert: var(--color-zinc-900); --invert-foreground: var(--color-zinc-50); } .dark { --destructive-foreground: var(--color-red-600); --success: var(--color-emerald-500); --success-foreground: var(--color-emerald-600); --info: var(--color-violet-500); --info-foreground: var(--color-violet-600); --warning: var(--color-yellow-500); --warning-foreground: var(--color-yellow-600); --invert: var(--color-zinc-700); --invert-foreground: var(--color-zinc-50); } ``` -------------------------------- ### Usage Example Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/base/timeline.mdx Example code demonstrating how to use the Timeline component. ```APIDOC ## Usage ### Importing Components ```tsx import { Timeline, TimelineContent, TimelineDate, TimelineHeader, TimelineIndicator, TimelineItem, TimelineSeparator, TimelineTitle, } from "@/components/reui/timeline" ``` ### Basic Timeline ```tsx March 2024 Project Initialized Successfully set up the project repository and initial architecture. ``` ``` -------------------------------- ### Install Sortable Dependencies Manually Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/base/sortable.mdx Manually install the necessary dependencies for the Sortable component. Ensure you have @dnd-kit/core, @dnd-kit/sortable, and @base-ui/react installed. ```bash npm install @dnd-kit/core @dnd-kit/sortable @base-ui/react ``` -------------------------------- ### Frame Usage Example Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/radix/frame.mdx Example of how to use the Frame component and its sub-components in your project. ```APIDOC ## Usage ```tsx import { Frame, FrameDescription, FrameFooter, FrameHeader, FramePanel, FrameTitle, } from "@/components/reui/frame" ``` ```tsx Frame Title Frame Description
Frame Content
Frame Footer
``` ``` -------------------------------- ### Install Date Selector Dependencies Manually Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/radix/date-selector.mdx Manually install the necessary dependencies for the Date Selector component. Ensure you have npm or yarn installed. ```bash npm install date-fns react-day-picker radix-ui ``` -------------------------------- ### Timeline Usage Example Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/radix/timeline.mdx Example of how to use the Timeline component in your project. ```APIDOC ## Usage Import the necessary components: ```tsx import { Timeline, TimelineContent, TimelineDate, TimelineHeader, TimelineIndicator, TimelineItem, TimelineSeparator, TimelineTitle, } from "@/components/reui/r-timeline" ``` Basic Timeline structure: ```tsx March 2024 Project Initialized Successfully set up the project repository and initial architecture. ``` ``` -------------------------------- ### Install Core Dependencies Manually Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/radix/data-grid.mdx Manually install the core dependencies required for the Data Grid component. ```bash npm install radix-ui @tanstack/react-table class-variance-authority ``` -------------------------------- ### Install Kanban via CLI Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/base/kanban.mdx Use this command to add the Kanban component to your project using the CLI. ```bash npx shadcn@latest add @reui/kanban ``` -------------------------------- ### Install Data Grid via CLI Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/base/data-grid.mdx Use the shadcn-ui CLI to add the @reui/data-grid package to your project. ```bash npx shadcn@latest add @reui/data-grid ``` -------------------------------- ### Install Drag-and-Drop Dependencies Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/base/data-grid.mdx Install the necessary @dnd-kit packages to enable drag-and-drop functionality for column or row reordering. ```bash npm install @dnd-kit/core @dnd-kit/modifiers @dnd-kit/sortable @dnd-kit/utilities ``` -------------------------------- ### Manual Installation of use-file-upload Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/base/file-upload.mdx Copy and paste the provided hook code directly into your project's hooks directory. ```typescript import { useState, useRef, useCallback } from "react" import type { ChangeEvent, DragEvent } from "react" interface FileMetadata { id: string file: File } interface FileWithPreview extends FileMetadata { preview: string } interface UseFileUploadOptions { maxFiles?: number maxSize?: number accept?: string multiple?: boolean initialFiles?: FileMetadata[] onFilesChange?: (files: FileWithPreview[]) => void onFilesAdded?: (files: FileWithPreview[]) => void onError?: (errors: string[]) => void } interface UseFileUploadState { files: FileWithPreview[] isDragging: boolean errors: string[] } interface UseFileUploadActions { openFileDialog: () => void handleDragEnter: () => void handleDragLeave: () => void handleDragOver: (event: DragEvent) => void handleDrop: (event: DragEvent) => void handleInputChange: (event: ChangeEvent) => void removeFile: (id: string) => void } export function useFileUpload({ maxFiles = Infinity, maxSize = Infinity, accept = "*", multiple = false, initialFiles = [], onFilesChange, onFilesAdded, onError, }: UseFileUploadOptions = {}): [UseFileUploadState, UseFileUploadActions] { const [files, setFiles] = useState(() => initialFiles.map((fileMetadata) => ({ ...fileMetadata, preview: URL.createObjectURL(fileMetadata.file), })) ) const [isDragging, setIsDragging] = useState(false) const [errors, setErrors] = useState([]) const fileInputRef = useRef(null) const validateFile = useCallback( (file: File): string | null => { if (file.size > maxSize) { return `File is too large. Maximum size is ${maxSize} bytes.` } if (accept !== "*" && !file.type.match(accept.replace(/\./g, "")) && !accept.split(",").some(type => file.type === type || file.name.endsWith(type))) { return `File type not accepted. Accepted types are ${accept}.` } return null }, [maxSize, accept] ) const addFiles = useCallback( (newFiles: File[]) => { const validFiles: FileWithPreview[] = [] const encounteredErrors: string[] = [] newFiles.forEach((file) => { const validationError = validateFile(file) if (validationError) { encounteredErrors.push(validationError) return } if (!multiple && files.length >= 1) { encounteredErrors.push("Only one file is allowed.") return } if (multiple && files.length + validFiles.length >= maxFiles) { encounteredErrors.push("Maximum number of files reached.") return } validFiles.push({ id: crypto.randomUUID(), file, preview: URL.createObjectURL(file), }) }) setFiles((prevFiles) => [...prevFiles, ...validFiles]) setErrors((prevErrors) => [...prevErrors, ...encounteredErrors]) if (encounteredErrors.length > 0) { onError?.(encounteredErrors) } if (validFiles.length > 0) { onFilesAdded?.(validFiles) onFilesChange?.([...files, ...validFiles]) } }, [files, multiple, maxFiles, validateFile, onFilesAdded, onFilesChange, onError] ) const removeFile = useCallback((id: string) => { setFiles((prevFiles) => { const updatedFiles = prevFiles.filter((file) => file.id !== id) onFilesChange?.(updatedFiles) return updatedFiles }) }, [onFilesChange]) const openFileDialog = useCallback(() => { fileInputRef.current?.click() }, []) const handleInputChange = useCallback( (event: ChangeEvent) => { if (!event.target.files) return addFiles(Array.from(event.target.files)) event.target.value = "" }, [addFiles] ) const handleDragEnter = useCallback(() => { setIsDragging(true) }, []) const handleDragLeave = useCallback(() => { setIsDragging(false) }, []) const handleDragOver = useCallback((event: DragEvent) => { event.preventDefault() }, []) const handleDrop = useCallback( (event: DragEvent) => { event.preventDefault() setIsDragging(false) if (!event.dataTransfer.files) return addFiles(Array.from(event.dataTransfer.files)) }, [addFiles] ) return [ { files, isDragging, errors }, { openFileDialog, handleDragEnter, handleDragLeave, handleDragOver, handleDrop, handleInputChange, removeFile, getInputProps: () => ({ ref: fileInputRef, type: "file", accept, multiple, onChange: handleInputChange, className: "sr-only", }), }, ] } ``` -------------------------------- ### Install Autocomplete Dependencies Manually Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/base/autocomplete.mdx Install the necessary base-UI React package before copying the Autocomplete component code. ```bash npm install @base-ui/react ``` -------------------------------- ### Frame Customization Example Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/radix/frame.mdx Example demonstrating how to customize the Frame component's radius. ```APIDOC ### Customizing Radius You can customize the border radius of the frame and its panels using the `--frame-radius` CSS variable. ```tsx ... ``` ``` -------------------------------- ### Manual Installation Dependencies Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/base/tree.mdx Install the necessary dependencies for the Tree component manually using npm. ```bash npm install @headless-tree/core @headless-tree/react @base-ui/react ``` -------------------------------- ### Alert Usage Example Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/base/alert.mdx Demonstrates how to import and use the Alert component in your project. ```APIDOC ## Usage ```tsx import { Alert, AlertAction, AlertDescription, AlertTitle, } from "@/components/reui/alert" ``` ```tsx Security Update Update your password and enable 2FA. ``` ``` -------------------------------- ### Install ReUI Components via shadcn CLI Source: https://context7.com/keenthemes/reui/llms.txt Use the shadcn CLI with the `@reui/` prefix to install individual in-house components or composed blocks. ```bash # Install in-house components npx shadcn@latest add @reui/data-grid npx shadcn@latest add @reui/filters npx shadcn@latest add @reui/stepper npx shadcn@latest add @reui/kanban npx shadcn@latest add @reui/timeline npx shadcn@latest add @reui/tree npx shadcn@latest add @reui/sortable npx shadcn@latest add @reui/rating npx shadcn@latest add @reui/alert npx shadcn@latest add @reui/badge # Install composed blocks (catalog examples use c- prefix) npx shadcn@latest add @reui/c-button-10 npx shadcn@latest add @reui/c-data-grid-9 npx shadcn@latest add @reui/c-filters-5 npx shadcn@latest add @reui/c-accordion-1 ``` -------------------------------- ### Install Phone Input Dependencies Manually Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/base/phone-input.mdx Manually install the necessary npm packages for the Phone Input component. ```bash npm install @base-ui/react react-phone-number-input ``` -------------------------------- ### Install Core Dependencies Manually Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/base/data-grid.mdx Manually install the core dependencies for the data grid, including @tanstack/react-table and class-variance-authority. ```bash npm install @tanstack/react-table class-variance-authority ``` -------------------------------- ### Install Timeline via CLI Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/base/timeline.mdx Use this command to add the Timeline component to your project using the CLI. ```bash npx shadcn@latest add @reui/timeline ``` -------------------------------- ### Install Autocomplete via CLI Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/base/autocomplete.mdx Use this command to add the Autocomplete component to your project using the shadcn CLI. ```bash npx shadcn@latest add @reui/autocomplete ``` -------------------------------- ### Install Radix UI Dependency Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/radix/badge.mdx Install the radix-ui package, which is a required dependency for the Badge component. ```bash npm install radix-ui ``` -------------------------------- ### Install Phone Input via CLI Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/base/phone-input.mdx Use this command to add the Phone Input component to your project using the CLI. ```bash npx shadcn@latest add @reui/phone-input ``` -------------------------------- ### Install Filters via CLI Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/base/filters.mdx Use this command to install the @reui/filters package using the shadcn CLI. ```bash npx shadcn@latest add @reui/filters ``` -------------------------------- ### Basic Data Grid Usage with Pagination and Footer Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/base/data-grid.mdx Example of setting up a DataGrid with a custom footer and pagination. Ensure a stable getRowId is provided when rows can be pinned or virtualized. ```tsx const footer = ( Showing {data.length} rows ) const table = useReactTable({ data, columns, getCoreRowModel: getCoreRowModel(), }) return ( ) ``` -------------------------------- ### Install Alert Component via CLI Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/base/alert.mdx Use this command to add the Alert component to your project using the CLI. ```bash npx shadcn@latest add @reui/alert ``` -------------------------------- ### Example Commit Message Source: https://github.com/keenthemes/reui/blob/main/CONTRIBUTING.md Follow this format for commit messages to categorize changes. ```sh feat(components): add new prop to the avatar component ``` -------------------------------- ### Frame Component Usage Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/base/frame.mdx Example of how to import and use the Frame component and its sub-components. ```APIDOC ### Import ```tsx import { Frame, FrameDescription, FrameFooter, FrameHeader, FramePanel, FrameTitle, } from "@/components/reui/frame" ``` ### Basic Usage ```tsx Frame Title Frame Description
Frame Content
Frame Footer
``` ### Customizing Radius ```tsx ... ``` ``` -------------------------------- ### Kanban Component Usage Example Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/base/kanban.mdx Render the Kanban component with columns and items. This example demonstrates how to structure the data and map it to the Kanban components for display and interaction. ```tsx item.id} > {Object.entries(columns).map(([id, items]) => (

{id}

{items.map((item) => ( {item.content} ))}
))}
``` -------------------------------- ### Install ReUI Accordion Component Source: https://github.com/keenthemes/reui/blob/main/content/docs/(root)/registry.mdx Use the shadcn CLI to add the accordion component from the ReUI registry. Ensure the registry is configured in `components.json`. ```bash npx dlx shadcn@latest add @reui/c-accordion-1 ``` -------------------------------- ### Install Tree Component Dependencies Manually Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/radix/tree.mdx Manually install the necessary dependencies for the Reui Tree component if not using a CLI. ```bash npm install @headless-tree/core @headless-tree/react radix-ui ``` -------------------------------- ### Install Timeline Component via CLI Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/radix/timeline.mdx Use this command to add the Timeline component to your project using the CLI. ```bash npx shadcn@latest add @reui/r-timeline ``` -------------------------------- ### Install Sortable via CLI Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/base/sortable.mdx Use this command to add the Sortable component to your project using the CLI. ```bash npx shadcn@latest add @reui/sortable ``` -------------------------------- ### Install Stepper via CLI Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/base/stepper.mdx Use this command to add the Stepper component to your project using the Reui CLI. ```bash npx shadcn@latest add @reui/stepper ``` -------------------------------- ### Install Badge Component via CLI Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/base/badge.mdx Use this command to add the Badge component to your project using the shadcn CLI. ```bash npx shadcn@latest add @reui/badge ``` -------------------------------- ### Sortable Menu Items Example Source: https://context7.com/keenthemes/reui/llms.txt Create a sortable list of menu items using the Sortable component. This example demonstrates vertical layout and uses GripVertical icon for drag handles. ```tsx import { Sortable, SortableItem, SortableItemHandle, } from "@/components/reui/sortable" import { useState } from "react" import { GripVertical } from "lucide-react" type MenuItem = { id: string label: string order: number } export function SortableMenuItems() { const [items, setItems] = useState([ { id: "1", label: "Dashboard", order: 1 }, { id: "2", label: "Users", order: 2 }, { id: "3", label: "Settings", order: 3 }, { id: "4", label: "Reports", order: 4 }, ]) return ( item.id} layout="vertical" > {items.map((item) => ( {item.label} ))} ) } ``` -------------------------------- ### Install ReUI Filters Component Source: https://github.com/keenthemes/reui/blob/main/content/docs/(root)/registry.mdx Use the shadcn CLI to add the filters component from the ReUI registry. Ensure the registry is configured in `components.json`. ```bash npx dlx shadcn@latest add @reui/filters ``` -------------------------------- ### Basic Alert Usage Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/base/alert.mdx A simple example of how to render an Alert component with an icon, title, description, and action buttons. ```tsx Security Update Update your password and enable 2FA. ``` -------------------------------- ### Install Rating Component via CLI Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/base/rating.mdx Use this command to add the Rating component to your project using the CLI. ```bash npx shadcn@latest add @reui/rating ``` -------------------------------- ### Install Frame Component via CLI Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/base/frame.mdx Use this command to add the Frame component to your project using the shadcn CLI. ```bash npx shadcn@latest add @reui/frame ``` -------------------------------- ### Install ReUI Components with shadcn CLI Source: https://github.com/keenthemes/reui/blob/main/README.md Use the shadcn CLI to add ReUI components directly into your project. Components are prefixed with 'c-'. ```bash npx shadcn@latest add @reui/c-button-10 npx shadcn@latest add @reui/c-data-grid-9 npx shadcn@latest add @reui/c-filters-5 ``` -------------------------------- ### Install Tree Component via CLI Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/base/tree.mdx Use this command to add the @reui/tree package to your project using the shadcn-ui CLI. ```bash npx shadcn@latest add @reui/tree ``` -------------------------------- ### Basic Frame Component Usage Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/base/frame.mdx A basic example demonstrating the structure of the Frame component with a header, content, and footer. ```tsx Frame Title Frame Description
Frame Content
Frame Footer
``` -------------------------------- ### Install Date Selector via CLI Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/radix/date-selector.mdx Use this command to add the Date Selector component to your project using the shadcn CLI. ```bash npx shadcn@latest add @reui/r-date-selector ``` -------------------------------- ### Import Data Grid Components Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/base/data-grid.mdx Import the necessary components from the @reui/data-grid package for basic data grid setup. ```tsx import { DataGrid, DataGridContainer, DataGridPagination, DataGridTable, DataGridTableFootRow, DataGridTableFootRowCell, } from "@/components/reui/data-grid" ``` -------------------------------- ### Install Tree Component via CLI Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/radix/tree.mdx Use this command to add the Reui Tree component to your project using the shadcn-ui CLI. ```bash npx shadcn@latest add @reui/r-tree ``` -------------------------------- ### Install Date Selector via CLI Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/base/date-selector.mdx Use this command to add the Date Selector component to your project using the command-line interface. ```bash npx shadcn@latest add @reui/date-selector ``` -------------------------------- ### Install Sortable Dependencies Manually Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/radix/sortable.mdx Manually install the necessary npm packages for the Sortable component. Ensure you have @dnd-kit/core, @dnd-kit/sortable, and radix-ui installed. ```bash npm install @dnd-kit/core @dnd-kit/sortable radix-ui ``` -------------------------------- ### Install Date Selector Dependencies Manually Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/base/date-selector.mdx Manually install the required npm packages for the Date Selector component. Ensure you have date-fns, @base-ui/react, and react-day-picker installed. ```bash npm install date-fns @base-ui/react date-fns react-day-picker ``` -------------------------------- ### Initialize MCP Server Source: https://github.com/keenthemes/reui/blob/main/content/docs/(root)/mcp.mdx Run this command to configure the MCP server. You will be prompted to select your MCP client and enable the MCP server. ```bash npx dlx shadcn@latest mcp init ``` -------------------------------- ### Initialize MCP Server for AI Component Generation Source: https://context7.com/keenthemes/reui/llms.txt Initialize the Model Context Protocol server for AI-assisted component generation using the `dlx` command. ```bash # Initialize MCP server npx dlx shadcn@latest mcp init ``` -------------------------------- ### Scrollspy Component Manual Installation Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/base/scrollspy.mdx Copy and paste this code into your project for manual installation of the Scrollspy component. ```tsx import { Scrollspy } from "@/components/reui/scrollspy" const YourComponent = () => { const containerRef = React.useRef(null) return ( <> Section 1 Section 2
Content 1
Content 2
) } ``` -------------------------------- ### Onboarding Wizard Stepper Implementation Source: https://context7.com/keenthemes/reui/llms.txt Shows how to implement a horizontal Stepper component for multi-step processes like onboarding. Includes custom indicators and navigation between steps. ```tsx import { Stepper, StepperContent, StepperIndicator, StepperItem, StepperNav, StepperPanel, StepperSeparator, StepperTitle, StepperDescription, StepperTrigger, } from "@/components/reui/stepper" import { useState } from "react" import { CheckCircle, Circle, Loader2 } from "lucide-react" export function OnboardingWizard() { const [currentStep, setCurrentStep] = useState(1) return ( , completed: , inactive: , loading: , }} > 1 Account Create your account 2 Profile Add personal info 3 Complete Review and finish

Create Account

Enter your email and password to get started.

Profile Information

Tell us about yourself.

All Done!

Your account has been created successfully.

) } ``` -------------------------------- ### Initialize and Render Filters Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/radix/filters.mdx Set up initial filters and field configurations, then render the Filters component. The `onChange` prop handles filter updates. ```typescript const [filters, setFilters] = useState([ createFilter("priority", "is_any_of", ["low", "medium"]), ]) const fields: FilterFieldConfig[] = [ { key: "priority", label: "Priority", type: "multiselect", options: [ { value: "low", label: "Low" }, { value: "medium", label: "Medium" }, { value: "high", label: "High" }, ], }, ] return ``` -------------------------------- ### Rating Component Examples Source: https://context7.com/keenthemes/reui/llms.txt Illustrates the Rating component's functionality for displaying read-only ratings and handling interactive user input. Includes examples for average rating display, editable input, and compact display with review counts. ```tsx import { Rating } from "@/components/reui/rating" import { useState } from "react" export function ProductRating() { const [userRating, setUserRating] = useState(0) return (
{/* Read-only rating display */}

Average Rating

{/* Editable rating input */}

Your Rating

{ setUserRating(rating) console.log("User rated:", rating) }} />
{/* Small compact rating */}
(128 reviews)
) } ``` -------------------------------- ### Stepper Usage Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/radix/stepper.mdx Example of how to import and use the Stepper component in your React application. ```APIDOC ## Usage ### Importing Components ```tsx import { Stepper, StepperContent, StepperIndicator, StepperItem, StepperNav, StepperPanel, StepperSeparator, StepperTrigger, } from "@/components/reui/stepper" ``` ### Basic Stepper Example ```tsx 1 2 Content 1 Content 2 ``` ``` -------------------------------- ### Rating Component Usage Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/base/rating.mdx Example of how to import and use the Rating component in your project. ```typescript import { Rating } from "@/components/reui/rating" ``` -------------------------------- ### Install Scrollspy via CLI Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/base/scrollspy.mdx Use this command to add the Scrollspy component to your project using the CLI. ```bash npx shadcn@latest add @reui/scrollspy ``` -------------------------------- ### Basic Autocomplete Usage Source: https://github.com/keenthemes/reui/blob/main/content/docs/components/base/autocomplete.mdx Demonstrates how to set up a basic Autocomplete component with a list of items. Ensure your items have 'value' and 'label' properties. ```tsx const items = [ { value: "apple", label: "Apple" }, { value: "banana", label: "Banana" }, { value: "orange", label: "Orange" }, { value: "grape", label: "Grape" }, ] No results found. {(item) => {item.label}} ```