### Initialize Project with Starwind CLI Source: https://starwind.dev/docs/getting-started/cli Initializes project configuration, creates the `starwind.config.json` file, and installs necessary dependencies. This command guides the user through project setup questions. ```bash pnpx starwind@latest init ``` ```bash npx starwind@latest init ``` ```bash yarn dlx starwind@latest init ``` -------------------------------- ### Tooltip Alignment Examples (React) Source: https://starwind.dev/docs/components/tooltip Demonstrates how to control the alignment of the tooltip relative to its trigger using the `align` prop. It shows examples for 'start', 'center', and 'end' alignments, as well as 'bottom start' and 'bottom end'. ```jsx import { Tooltip, TooltipTrigger, TooltipContent } from "@/components/starwind/tooltip"; import { Button } from "@/components/starwind/button"; // Example 1: Horizontal alignment
Aligned to start Aligned to center Aligned to end
// Example 2: Vertical and horizontal alignment
Bottom aligned to start Bottom aligned to end
``` -------------------------------- ### Combobox Component Setup in Astro Source: https://starwind.dev/llms-full.txt Demonstrates how to set up and use the Combobox component in Astro, which is built upon the Select component. This example shows how to configure the search input and populate the dropdown with items. ```astro --- import { Select, SelectContent, SelectGroup, SelectItem, SelectSearch, SelectTrigger, SelectValue, } from "@/components/starwind/select"; --- ``` -------------------------------- ### Starwind Setup Options Source: https://starwind.dev/docs/getting-started/cli Provides details on the available options for the `starwind setup` command. These include skipping prompts, specifying a package manager, and enabling Starwind Pro setup. ```bash Usage: starwind setup [options] Setup Starwind Pro in your project Options: -y, --yes Skip confirmation prompts -m, --package-manager Package manager to use (choices: "npm", "pnpm", "yarn") -p, --pro Setup Starwind Pro (default) -h, --help display help for command ``` -------------------------------- ### InputGroup with Textarea and Buttons Example Source: https://starwind.dev/docs/components/input-group Shows a complex InputGroup setup featuring a Textarea for code input, along with addons for status text and action buttons like 'Run' and 'Copy'. This example utilizes components such as InputGroupTextarea, InputGroupText, and InputGroupButton, along with icons for visual cues. Dependencies include '@/components/starwind/input-group' and icons from '@tabler/icons'. ```astro ---import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupText, InputGroupTextarea,} from "@/components/starwind/input-group";import ArrowRight from "@tabler/icons/outline/arrow-right.svg";import Code from "@tabler/icons/outline/code.svg";import Copy from "@tabler/icons/outline/copy.svg";--- Line 1, Column 1 Run script.js ``` -------------------------------- ### Starwind UI Pagination Component Example Source: https://starwind.dev/llms-full.txt Demonstrates the usage of the Pagination component, showcasing its structure with PaginationContent, PaginationItem, and various link/navigation elements. ```astro Prev 1 2 3 Next ``` -------------------------------- ### Tooltip Component Setup and Usage (Astro) Source: https://starwind.dev/llms-full.txt Illustrates the setup and usage of the Tooltip component in Astro, including Tooltip, TooltipTrigger, and TooltipContent. This allows for displaying contextual information on hover with customizable delays and animations. ```astro --- import { Tooltip, TooltipTrigger, TooltipContent } from "@/components/starwind/tooltip"; import { Button } from "@/components/starwind/button"; --- Add to library ``` -------------------------------- ### Initialize Starwind Project with CLI Source: https://starwind.dev/docs/getting-started/cli Initializes a new Starwind project by setting up configuration files, installing dependencies, and configuring Tailwind CSS. It prompts the user for project-specific details like component directory and Tailwind base color. This command is essential for starting a new project with Starwind. ```bash npx starwind@latest init ``` ```bash ┌ Welcome to the Starwind CLI │◇ What is your components directory? │ src/components │◇ Where would you like to add the Tailwind .css file? │ src/styles/starwind.css │◇ What Tailwind base color would you like to use? │ Neutral (default) │◇ Select your preferred package manager │ pnpm │◇ Install tailwindcss@^4, @tailwindcss/vite@^4, @tailwindcss/forms@^0.5, tw-animate-css@^1, tailwind-variants@^3, tailwind-merge@^3, @tabler/icons@^3 using pnpm? │ Yes │◇ Packages installed successfully │◇ Created project structure │◇ Astro config setup completed │◇ TypeScript path aliases configured │◇ Created Tailwind configuration │◇ CSS import added to layout │◇ Updated project starwind configuration │◇ Next steps ─────────────────────────────────────────────────────╮ │ │ │ Make sure your layout imports the src/styles/starwind.css file │ │ │├──────────────────────────────────────────────────────────────────╯ │└ Enjoy using Starwind UI 🚀 ``` -------------------------------- ### Create starwind.config.json Source: https://starwind.dev/docs/getting-started/installation This is an example of the `starwind.config.json` file that should be created in your project root when performing a manual installation of Starwind UI. The content of this file is not provided in the input, but its existence is required. ```json { // Add your Starwind UI configuration here } ``` -------------------------------- ### Full Sheet Example Source: https://starwind.dev/docs/components/sheet An example demonstrating the integration of all Sheet component parts to create a functional sheet. ```APIDOC ## Full Sheet Example ### Description An example demonstrating the integration of all Sheet component parts to create a functional sheet. ### Method N/A (Component Usage) ### Endpoint N/A (Component Usage) ### Parameters N/A ### Request Example ```astro --- import { Button } from "@/components/starwind/button"; import { Input } from "@/components/starwind/input"; import { Label } from "@/components/starwind/label"; import { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, } from "@/components/starwind/sheet"; --- Edit Profile Make changes to your profile here. Click save when you're done.
``` ### Response N/A (Component Usage) ### Response Example N/A (Component Usage) ``` -------------------------------- ### Basic Input OTP Setup Source: https://starwind.dev/docs/components/input-otp Demonstrates the fundamental setup of the Input OTP component using Astro. It includes importing necessary components and structuring the OTP input with slots. ```astro ---import { InputOtp, InputOtpGroup, InputOtpSlot, } from "@/components/starwind/input-otp";--- ``` -------------------------------- ### Alert Component Example Astro Source: https://starwind.dev/llms-full.txt Shows an example of the Alert component in Astro, including its variants. It demonstrates how to import and use Alert, AlertTitle, and AlertDescription with a 'variant' prop. ```astro --- import { Alert, AlertDescription, AlertTitle } from "@/components/starwind/alert"; --- Heads up! A simple alert with an "AlertTitle" and an "AlertDescription". ``` -------------------------------- ### Initialize Starwind Project Source: https://starwind.dev/docs/getting-started/cli Initializes a new project with Starwind. Supports default values and a Pro setup. Use `-h` for help. ```bash starwind init [options] Initialize your project with Starwind Options: -d, --defaults Use default values for all prompts -p, --pro Initialize with Starwind Pro setup -h, --help display help for command ``` -------------------------------- ### Input OTP API Reference Example Source: https://starwind.dev/docs/components/input-otp Provides an example of using the InputOtp component with specific API props like `name`, `maxLength`, and `pattern`. It demonstrates how to configure the component for alphanumeric input. ```astro ``` -------------------------------- ### PopoverContent Placement and Animation Example (Vue) Source: https://starwind.dev/docs/components/popover Shows how to configure the PopoverContent component with specific placement ('side', 'align') and animation timing ('sideOffset', 'animationDuration'). This example sets the content to appear below and aligned to the start of the trigger. ```vue Popover content ``` -------------------------------- ### Starwind UI CLI Installation (Shell) Source: https://starwind.dev/docs/getting-started/installation These commands demonstrate how to install Starwind UI using its CLI. The process involves creating a new Astro project (if one doesn't exist) and then running the 'starwind init' command to configure the project, set up necessary files, and install dependencies. ```bash pnpm create astro@latest npx starwind@latest init ``` ```bash npm create astro@latest npx starwind@latest init ``` ```bash yarn create astro yarn dlx starwind@latest init ``` -------------------------------- ### Example Button with API Props (Astro) Source: https://starwind.dev/docs/components/button Provides a concrete example of using the Button component with specific `variant` and `size` props, demonstrating how to configure its appearance and behavior. ```astro ``` -------------------------------- ### Checkbox Component Usage in Astro Source: https://starwind.dev/llms-full.txt Provides an example of using the Checkbox component in Astro. It shows the necessary import and how to render a basic checkbox with an ID and label. ```astro --- import { Checkbox } from "@/components/starwind/checkbox"; --- ``` -------------------------------- ### Starwind UI Input Component API Reference Example Source: https://starwind.dev/docs/components/input An example showcasing the Input component with specified size, type, and placeholder, aligning with API reference. ```astro ``` -------------------------------- ### Toggle Component API Reference Example Source: https://starwind.dev/docs/components/toggle An example demonstrating the usage of the Toggle component with various API props like 'variant', 'size', 'defaultPressed', and 'syncGroup'. ```astro Toggle filters ``` -------------------------------- ### Button Component in Astro Source: https://starwind.dev/llms-full.txt Provides an example of the Button component from Starwind UI. This component is customizable with different variants and sizes, suitable for various user interactions. ```astro ``` -------------------------------- ### Accordion Component Example Astro Source: https://starwind.dev/llms-full.txt Demonstrates the usage of the Accordion component in Astro. It shows how to import and use Accordion, AccordionItem, AccordionTrigger, and AccordionContent with basic props. ```astro --- import { Accordion, AccordionContent, AccordionItem, AccordionTrigger, } from "@/components/starwind/accordion"; --- What is Astro? Astro is an web framework for building fast, scalable, and secure websites. Why should I use Astro? Astro provides a set of features that make it an ideal choice for building fast, scalable, and secure websites. How do I get started with Astro? To get started with Astro, follow the instructions in the documentation. ``` -------------------------------- ### Initialize Starwind UI CLI Source: https://starwind.dev/llms-full.txt Initializes Starwind UI in your Astro project using the provided CLI command. This setup is recommended for integrating the component library. ```bash pnpx starwind@latest init # or npx starwind@latest init # or yarn dlx starwind@latest init ``` -------------------------------- ### Starwind CLI init Command Options Source: https://starwind.dev/docs/getting-started/cli Provides options for the `starwind init` command to customize the initialization process. The `--defaults` option uses predefined values, while `--pro` enables Starwind Pro setup. The `-h` or `--help` option displays usage information. ```bash Usage: starwind init [options] Initialize your project with Starwind Options: -d, --defaults Use default values for all prompts -p, --pro Initialize with Starwind Pro setup -h, --help display help for command ``` -------------------------------- ### Input OTP Component Source: https://starwind.dev/docs/components/input-otp Documentation for the Input OTP component, covering its installation, general usage, and specific examples like using separators and alphanumeric patterns. ```APIDOC ## Input OTP Component ### Description The Input OTP component provides a user-friendly way to input one-time passwords and verification codes. It supports keyboard navigation, paste handling, and pattern validation. The essential components are `InputOtp`, `InputOtpGroup`, and `InputOtpSlot`. The `InputOtpSeparator` provides visual separation between groups of slots. ### Installation ```bash npx starwind@latest add input-otp ``` ### Usage Examples #### Basic Usage ```astro --- import { InputOtp, InputOtpGroup, InputOtpSlot, } from "@/components/starwind/input-otp"; --- ``` #### With Separator Use `InputOtpSeparator` to visually group slots, commonly used for phone verification codes or formatted inputs. ```astro --- import { InputOtp, InputOtpGroup, InputOtpSeparator, InputOtpSlot, } from "@/components/starwind/input-otp"; --- ``` #### Alphanumeric Pattern Use the `pattern` prop with `REGEXP_ONLY_DIGITS_AND_CHARS` to allow both letters and numbers. ```astro --- import { InputOtp, InputOtpGroup, InputOtpSlot, REGEXP_ONLY_DIGITS_AND_CHARS, } from "@/components/starwind/input-otp"; --- ``` #### Sizes The `InputOtpSlot` component supports three sizes: `sm`, `md` (default), and `lg`. ```astro --- import { InputOtp, InputOtpGroup, InputOtpSlot, } from "@/components/starwind/input-otp"; --- {/* Example for different sizes would go here */} ``` ### API Reference #### InputOtp * **maxLength** (number) - Required - The maximum number of characters the OTP input can hold. * **pattern** (RegExp) - Optional - A regular expression to validate the input characters. #### InputOtpGroup This component groups `InputOtpSlot` components. #### InputOtpSlot * **index** (number) - Required - The index of the slot. * **size** (string) - Optional - The size of the slot ('sm', 'md', 'lg'). Defaults to 'md'. #### InputOtpSeparator This component is used for visual separation between `InputOtpGroup` components. #### Exported Constants * **REGEXP_ONLY_DIGITS_AND_CHARS**: A RegExp constant for alphanumeric input. ### Events * **onComplete** (value: string) - Triggered when the OTP input is complete. ### Changelog * (Details about changes would be listed here) ``` -------------------------------- ### InputGroup with Spinner Example Source: https://starwind.dev/docs/components/input-group Illustrates how to integrate the Spinner component within an InputGroup for visual feedback during loading or processing states. This example showcases different placements of the Spinner using InputGroupAddon. It depends on components from '@/components/starwind/input-group' and '@/components/starwind/spinner'. ```astro ---import { InputGroup, InputGroupAddon, InputGroupInput, InputGroupText,} from "@/components/starwind/input-group";import { Spinner } from "@/components/starwind/spinner";---
Saving...
``` -------------------------------- ### Popover Alignment Options in Astro Source: https://starwind.dev/docs/components/popover Illustrates how to control the horizontal alignment of the PopoverContent relative to its trigger using the `align` prop in Astro. Examples show 'start', 'center', and 'end' alignments. ```astro ---import { Button } from "@/components/starwind/button";import { Popover, PopoverContent, PopoverTrigger } from "@/components/starwind/popover";--- Aligned to start. Aligned to center. Aligned to end. ``` -------------------------------- ### Starwind UI Tooltip Component Example Source: https://starwind.dev/llms-full.txt Illustrates the compound component pattern using the Tooltip component. It shows how TooltipTrigger and TooltipContent work together to create a tooltip. ```astro Add to library ``` -------------------------------- ### Aspect Ratio Component Usage Examples (Astro) Source: https://starwind.dev/docs/components/aspect-ratio Demonstrates how to use the AspectRatio component in Astro with different aspect ratios. It shows examples for default 16:9, 4:3, 1:1, 21:9, and embedding a YouTube video. ```astro ---import { AspectRatio } from "@/components/starwind/aspect-ratio";--- Photo by Drew Beamer ``` ```astro ---import { AspectRatio } from "@/components/starwind/aspect-ratio";---
16:9 Aspect Ratio
``` ```astro ---import { AspectRatio } from "@/components/starwind/aspect-ratio";--- Photo by Kari Shea ``` ```astro ---import { AspectRatio } from "@/components/starwind/aspect-ratio";--- Photo by Ayo Ogunseinde ``` ```astro ---import { AspectRatio } from "@/components/starwind/aspect-ratio";--- Photo by Simon Berger ``` ```astro ---import { AspectRatio } from "@/components/starwind/aspect-ratio";--- ``` -------------------------------- ### Switch API Reference Example Source: https://starwind.dev/docs/components/switch An example demonstrating the usage of the Switch component with its primary props: id, label, variant, size, and checked. This serves as a practical illustration of how to integrate the Switch into an application according to its API definition. ```jsx import { Switch } from "@/components/starwind/switch"; ``` -------------------------------- ### Textarea Component Usage Examples Source: https://starwind.dev/docs/components/textarea Examples demonstrating how to use the Textarea component with different sizes and states. ```APIDOC ## Textarea Component Usage ### Basic Usage ```astro ---import { Textarea } from "@/components/starwind/textarea";---