### Install Project Dependencies Source: https://github.com/untitleduico/untitledui-vite-starter-kit/blob/main/_autodocs/README.md Run this command after cloning the repository to install all necessary npm packages. ```bash npm install ``` -------------------------------- ### Development Commands Source: https://github.com/untitleduico/untitledui-vite-starter-kit/blob/main/CLAUDE.md Commands to start the development server or build the project for production. ```bash # Development npm run dev # Start Vite development server (http://localhost:5173) npm run build # Build for production (TypeScript compilation + Vite build) ``` -------------------------------- ### Start Development Server Source: https://github.com/untitleduico/untitledui-vite-starter-kit/blob/main/_autodocs/README.md Launches the development server for local development. The application will be available at http://localhost:5173. ```bash npm run dev # Opens on http://localhost:5173 ``` -------------------------------- ### Primary Button Example Source: https://github.com/untitleduico/untitledui-vite-starter-kit/blob/main/_autodocs/README.md A basic example of rendering a primary button. This is the default button style. ```typescript // Primary button ``` -------------------------------- ### Environment Variables Configuration Source: https://github.com/untitleduico/untitledui-vite-starter-kit/blob/main/_autodocs/configuration.md Example of setting environment variables in .env files for different environments (development, production). ```bash # .env VITE_API_URL=https://api.example.com VITE_APP_NAME=Untitled UI # .env.development VITE_API_URL=http://localhost:3000 # .env.production VITE_API_URL=https://api.prod.example.com ``` -------------------------------- ### Run Development Server Source: https://github.com/untitleduico/untitledui-vite-starter-kit/blob/main/README.md Commands to start the development server for the Vite project. Open http://localhost:5173 to view the application. ```bash npm run dev # or yarn dev # or pnpm dev # or bun dev ``` -------------------------------- ### Example Usage of Integration Icons Source: https://github.com/untitleduico/untitledui-vite-starter-kit/blob/main/_autodocs/foundations.md Render Slack and GitHub icons with a specified size using the imported components. ```typescript import { SlackIcon, GithubIcon } from "@/components/foundations/integration-icons"; export function IntegrationIconsExample() { return (
); } ``` -------------------------------- ### Basic Button Example Source: https://github.com/untitleduico/untitledui-vite-starter-kit/blob/main/CLAUDE.md Renders a standard button with medium size. ```typescript ``` -------------------------------- ### TypeScript Path Alias Import Example Source: https://github.com/untitleduico/untitledui-vite-starter-kit/blob/main/_autodocs/configuration.md Example of how to import components using the '@/ ' path alias, which is configured in tsconfig.json. ```typescript import { Button } from "@/components/base/buttons/button"; ``` -------------------------------- ### DateRangePicker Example Source: https://github.com/untitleduico/untitledui-vite-starter-kit/blob/main/_autodocs/application-components.md Example of how to use the DateRangePicker component with state management for selected date ranges. ```typescript import { DateRangePicker } from "@/components/application/date-picker/date-range-picker"; import { useState } from "react"; export function DateRangePickerExample() { const [range, setRange] = useState({ start: parseDate("2024-07-01"), end: parseDate("2024-07-08"), }); return ( console.log("Applied range:", range)} /> ); } ``` -------------------------------- ### Responsive Utility Example Source: https://github.com/untitleduico/untitledui-vite-starter-kit/blob/main/_autodocs/styling-guide.md Demonstrates how to apply different styles based on screen breakpoints using Tailwind's responsive prefixes. Use `md:` for the primary breakpoint. ```typescript
``` -------------------------------- ### Theme Provider Setup Source: https://github.com/untitleduico/untitledui-vite-starter-kit/blob/main/_autodocs/README.md Shows how to set up the ThemeProvider for automatic light/dark mode switching via CSS variables. Ensure this is wrapped around your application's root. ```typescript import { ThemeProvider, useTheme } from "@/providers/theme-provider"; function App() { return ( {/* Your app */} ); } ``` -------------------------------- ### Tooltip Component Usage Example Source: https://github.com/untitleduico/untitledui-vite-starter-kit/blob/main/_autodocs/base-components.md Demonstrates how to use the Tooltip component with different placements and triggers, including basic buttons and icons. ```typescript import { Tooltip, TooltipTrigger } from "@/components/base/tooltip/tooltip"; import { HelpCircle } from "@untitledui/icons"; export function TooltipExamples() { return ( <> {/* Basic tooltip */} {/* Tooltip on icon */} {/* Tooltip with different placement */} ); } ``` -------------------------------- ### Table Component Example Usage Source: https://github.com/untitleduico/untitledui-vite-starter-kit/blob/main/_autodocs/application-components.md Demonstrates how to use the Table component with sample columns and data. Includes enabling selection and sorting, and logging sort changes. ```typescript import { Table } from "@/components/application/table/table"; const columns = [ { key: "name", label: "Name", sortable: true }, { key: "email", label: "Email" }, { key: "role", label: "Role", sortable: true }, { key: "status", label: "Status" }, ]; const data = [ { id: 1, name: "Olivia Rhye", email: "olivia@untitledui.com", role: "Admin", status: "Active" }, { id: 2, name: "Phoenix Baker", email: "phoenix@untitledui.com", role: "User", status: "Active" }, ]; export function TableExample() { return ( console.log(`Sort ${column} ${direction}`)} /> ); } ``` -------------------------------- ### Example Usage of Logo Component Source: https://github.com/untitleduico/untitledui-vite-starter-kit/blob/main/_autodocs/foundations.md Demonstrates how to use the Logo component within a header, specifying size and variant. ```typescript import { Logo } from "@/components/foundations/logo"; export function HeaderExample() { return (
{/* Navigation */}
); } ``` -------------------------------- ### FeaturedIcon Examples Source: https://github.com/untitleduico/untitledui-vite-starter-kit/blob/main/_autodocs/foundations.md Demonstrates various ways to use the FeaturedIcon component with different themes, colors, and sizes. Ensure necessary icon components are imported. ```typescript import { FeaturedIcon } from "@/components/foundations/featured-icon/featured-icon"; import { CheckCircle, AlertCircle, XCircle, Info } from "@untitledui/icons"; export function FeaturedIconExamples() { return ( <> {/* Light theme (default) */} {/* Gradient theme */} {/* Dark theme */} {/* Outline theme */} {/* Modern styles (gray only) */} {/* Different color combinations */} ); } ``` -------------------------------- ### Input Component Examples Source: https://github.com/untitleduico/untitledui-vite-starter-kit/blob/main/_autodocs/base-components.md Demonstrates various configurations of the Input component, including basic usage, with icons, validation, required fields, different sizes, tooltips, and disabled states. Ensure necessary icons are imported if used. ```typescript import { Input } from "@/components/base/input/input"; import { Mail01, Lock01, Eye, EyeOff } from "@untitledui/icons"; import { useState } from "react"; export function InputExamples() { const [email, setEmail] = useState(""); const [password, setPassword] = useState(""); return ( <> {/* Basic input * /} {/* With icon * /} {/* With validation * /} {/* Required field * / {/* Large size with tooltip * / {/* Disabled state * / ); } ``` -------------------------------- ### File Upload Component Example Source: https://github.com/untitleduico/untitledui-vite-starter-kit/blob/main/_autodocs/application-components.md Demonstrates how to use the FileUpload component with specified accepted file types, multiple file selection enabled, a maximum file size, and a handler for selected files. ```typescript import { FileUpload } from "@/components/application/file-upload/file-upload-base"; export function FileUploadExample() { const handleFileSelect = (files: File[]) => { files.forEach(file => { console.log(`Uploading: ${file.name} (${file.size} bytes)`); }); }; return ( ); } ``` -------------------------------- ### Vercel Deployment Configuration Source: https://github.com/untitleduico/untitledui-vite-starter-kit/blob/main/_autodocs/configuration.md Example Vercel configuration file specifying the build command, output directory, and environment variables. The VITE_API_URL is set using a Vercel variable. ```json { "buildCommand": "npm run build", "outputDirectory": "dist", "env": { "VITE_API_URL": "@vite_api_url" } } ``` -------------------------------- ### Badge Component Example Usage Source: https://github.com/untitleduico/untitledui-vite-starter-kit/blob/main/_autodocs/base-components.md Demonstrates various ways to use the Badge, BadgeWithDot, and BadgeWithIcon components, including different types, sizes, colors, and icon placements. ```typescript import { Badge, BadgeWithDot, BadgeWithIcon } from "@/components/base/badges/badges"; import { ArrowUp, Zap } from "@untitledui/icons"; export function BadgeExamples() { return ( <> {/* Basic badge */} New {/* Pill style (rounded) */} Active {/* Badge with dot indicator */} Online {/* Badge with icon */} 12% {/* Different color variants */} Error Warning Custom {/* Large badge */} Featured ); } ``` -------------------------------- ### Modal Example Source: https://github.com/untitleduico/untitledui-vite-starter-kit/blob/main/_autodocs/application-components.md Demonstrates the usage of the Modal component, including a trigger button and dialog content with action buttons. ```typescript import { ModalOverlay, Modal, Dialog, DialogTrigger } from "@/components/application/modals/modal"; import { Button } from "@/components/base/buttons/button"; export function ModalExample() { return ( {({ close }) => (

Confirm Action

Are you sure you want to proceed?

)}
); } ``` -------------------------------- ### Radio Button Example Usage Source: https://github.com/untitleduico/untitledui-vite-starter-kit/blob/main/_autodocs/base-components.md Demonstrates basic usage, horizontal layout, and disabled options for the RadioButtons component. ```typescript import { RadioButtons } from "@/components/base/radio-buttons/radio-buttons"; import { useState } from "react"; export function RadioButtonExamples() { const [selected, setSelected] = useState("monthly"); const pricingPlans = [ { id: "monthly", label: "Monthly", hint: "Billed monthly" }, { id: "yearly", label: "Yearly", hint: "Billed annually (20% off)" }, ]; return ( <> {/* Basic radio button group */} {/* Horizontal layout */} {/* With disabled option */} ); } ``` -------------------------------- ### Example Usage of Payment Icons Source: https://github.com/untitleduico/untitledui-vite-starter-kit/blob/main/_autodocs/foundations.md Display Visa, Mastercard, and Apple Pay icons with a size of 8 units. ```typescript import { VisaIcon, MastercardIcon, ApplePayIcon } from "@/components/foundations/payment-icons"; export function PaymentMethodsExample() { return (
); } ``` -------------------------------- ### Loading Indicator Component Example Source: https://github.com/untitleduico/untitledui-vite-starter-kit/blob/main/_autodocs/application-components.md Shows how to implement the LoadingIndicator component with a large size and an accessibility label for 'Loading data...'. ```typescript import { LoadingIndicator } from "@/components/application/loading-indicator/loading-indicator"; export function LoadingExample() { return ; } ``` -------------------------------- ### Toggle Component Example Usage Source: https://github.com/untitleduico/untitledui-vite-starter-kit/blob/main/_autodocs/base-components.md Demonstrates various ways to use the Toggle component, including basic toggles, toggles with labels and hints, and disabled toggles. ```typescript import { Toggle } from "@/components/base/toggle/toggle"; import { useState } from "react"; export function ToggleExamples() { const [darkMode, setDarkMode] = useState(false); const [notifications, setNotifications] = useState(true); return ( <> {/* Basic toggle */} {/* Toggle with label */} {/* Toggle with label and hint */} {/* Disabled toggle */} ); } ``` -------------------------------- ### Example Usage of RatingStars Source: https://github.com/untitleduico/untitledui-vite-starter-kit/blob/main/_autodocs/foundations.md Demonstrates how to use the RatingStars component for both static display and interactive rating. ```typescript import { RatingStars } from "@/components/foundations/rating-stars"; import { useState } from "react"; export function RatingStarsExample() { const [rating, setRating] = useState(4); return ( <> {/* Display only */} {/* Interactive rating */} ); } ``` -------------------------------- ### Button Examples Source: https://github.com/untitleduico/untitledui-vite-starter-kit/blob/main/_autodocs/base-components.md Demonstrates various ways to use the Button component, including different sizes, colors, icons, loading and disabled states, and link variants. Ensure necessary icons and React Router types are imported if using link-specific features. ```typescript import { Button } from "@/components/base/buttons/button"; import { Save, Trash02 } from "@/components/icons"; export function ButtonExamples() { return ( <> {/* Basic button */} {/* With leading icon */} {/* Loading state */} {/* Destructive action */} {/* Disabled state */} {/* As link */} {/* Icon only */} ); } ``` -------------------------------- ### Tailwind CSS Utility Class Source: https://github.com/untitleduico/untitledui-vite-starter-kit/blob/main/_autodocs/README.md Example of using Tailwind CSS utility classes for styling elements. This approach leverages a utility-first framework with custom design tokens. ```typescript className="flex items-center gap-4 px-6 py-4 bg-primary rounded-lg shadow-xs" ``` -------------------------------- ### Organizing Component Styles with sortCx Source: https://github.com/untitleduico/untitledui-vite-starter-kit/blob/main/_autodocs/README.md Illustrates how to organize component styles using style objects with the `sortCx` utility. This includes common styles, size variants, and color variants. ```typescript const styles = sortCx({ common: { root: "..." }, sizes: { sm: { root: "..." }, md: { root: "..." } }, colors: { primary: { root: "..." } }, }); ``` -------------------------------- ### CSS Border Utilities Source: https://github.com/untitleduico/untitledui-vite-starter-kit/blob/main/_autodocs/styling-guide.md Demonstrates how to apply border, ring, stroke, and fill styles using CSS utility classes. Ensure the appropriate border token is selected for the desired contrast and context. ```css /* Border */ border-2 border-primary /* Ring (outline) */ ring-2 ring-brand ring-inset /* Stroke (SVG) */ stroke-current text-brand-solid /* Fill */ fill-current text-error-primary ``` -------------------------------- ### Basic Textarea Usage Source: https://github.com/untitleduico/untitledui-vite-starter-kit/blob/main/_autodocs/base-components.md Demonstrates the basic usage of the Textarea component with a label, placeholder, and state management. ```typescript import { Textarea } from "@/components/base/textarea/textarea"; import { useState } from "react"; export function TextareaExamples() { const [message, setMessage] = useState(""); return ( <> {/* Basic textarea */}