))
}
```
### Checkbox
- **Documentation**: https://starwind.dev/docs/components/checkbox
- **Import pattern**: `import { Checkbox } from "@/components/starwind/checkbox";`
- **Key props**:
- `id`: string - The required ID attribute
- `variant`: "default" | "primary" | "secondary" | "info" | "success" | "warning" | "error" (default: "default")
- `size`: "sm" | "md" | "lg" (default: "md")
- All standard HTML attributes for are supported
- **Example usage**:
```astro
---
import { Checkbox } from "@/components/starwind/checkbox";
---
```
### Combobox
- **Documentation**: https://starwind.dev/docs/components/combobox
- **Description**: A searchable select component that combines an input field with a dropdown list. Built using the Select component with the SelectSearch sub-component.
- **Import pattern**: `import { Select, SelectContent, SelectGroup, SelectItem, SelectSearch, SelectTrigger, SelectValue } from "@/components/starwind/select";`
- **Key props**:
- `SelectSearch`:
- `placeholder`: string - Placeholder text for the search input
- `emptyText`: string - Text to display when no results are found
- **Example usage**:
```astro
---
import {
Select,
SelectContent,
SelectGroup,
SelectItem,
SelectSearch,
SelectTrigger,
SelectValue,
} from "@/components/starwind/select";
---
```
### Collapsible
- **Documentation**: https://starwind.dev/docs/components/collapsible
- **Description**: An interactive component that expands and collapses content. Useful for FAQs, expandable sections, and progressive disclosure patterns.
- **Import pattern**: `import { Collapsible, CollapsibleTrigger, CollapsibleContent } from "@/components/starwind/collapsible";`
- **Key props**:
- ``
- `defaultOpen`: boolean - When true, content is visible on initial render (default: false)
- `disabled`: boolean - When true, the trigger cannot be clicked (default: false)
- ``
- `asChild`: boolean - When true, renders as a wrapper allowing a custom trigger element (default: false)
- ``: Standard HTML attributes for div elements
- **Example usage**:
```astro
---
import { Button } from "@/components/starwind/button";
import {
Collapsible,
CollapsibleContent,
CollapsibleTrigger,
} from "@/components/starwind/collapsible";
import IconSelector from "@tabler/icons/outline/selector.svg";
---
@starwind-ui starred 3 repositories
astro
tailwindcss
starwind-ui
```
### Dialog
- **Documentation**: https://starwind.dev/docs/components/dialog
- **Import pattern**: `import { Dialog, DialogTrigger, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter, DialogClose } from "@/components/starwind/dialog";`
- **Key props**:
- See the documentation for the props for each component
- **Example usage**:
```astro
---
import {
Dialog,
DialogTrigger,
DialogContent,
DialogHeader,
DialogFooter,
DialogTitle,
DialogDescription,
DialogClose,
} from "@/components/starwind/dialog";
import { Button } from "@/components/starwind/button";
---
```
### Dropdown
- **Documentation**: https://starwind.dev/docs/components/dropdown
- **Import pattern**: `import { Dropdown, DropdownTrigger, DropdownContent, DropdownItem, DropdownLabel, DropdownSeparator } from "@/components/starwind/dropdown";`
- **Key props**:
- `Dropdown`: `openOnHover` (boolean), `closeDelay` (number)
- `DropdownTrigger`: `asChild` (boolean)
- `DropdownContent`: `side` ("top" | "bottom"), `align` ("start" | "center" | "end"), `sideOffset` (number)
- `DropdownItem`: `as` (HTMLTag), `inset` (boolean), `disabled` (boolean)
- `DropdownLabel`: `inset` (boolean)
- **Example usage**:
```astro
---
import {
Dropdown,
DropdownTrigger,
DropdownContent,
DropdownItem,
DropdownLabel,
DropdownSeparator,
} from "@/components/starwind/dropdown";
import { Button } from "@/components/starwind/button";
---
My AccountProfileSettingsHelpSign out
```
### Dropzone
- **Documentation**: https://starwind.dev/docs/components/dropzone
- **Import pattern**: `import { Dropzone, DropzoneFilesList, DropzoneLoadingIndicator, DropzoneUploadIndicator } from "@/components/starwind/dropzone";`
- **Key props**:
- `Dropzone`: `accept` (string), `multiple` (boolean), `disabled` (boolean), `required` (boolean), `name` (string), `isUploading` (boolean)
- `DropzoneFilesList`: Standard HTML attributes for div elements
- `DropzoneUploadIndicator`: Provides a slot for custom content
- `DropzoneLoadingIndicator`: Provides a slot for custom content
- **Example usage**:
```astro
---
import {
Dropzone,
DropzoneFilesList,
DropzoneLoadingIndicator,
DropzoneUploadIndicator,
} from "@/components/starwind/dropzone";
---
Drop files here or click to upload
```
### Image
- **Documentation**: https://starwind.dev/docs/components/image
- **Description**: A wrapper around Astro's built-in Image component with automatic dimension inference for remote images.
- **Import pattern**: `import { Image } from "@/components/starwind/image";`
- **Key props**:
- `src`: string | ImageMetadata - Image source (local import or remote URL)
- `alt`: string - Alt text for accessibility (required)
- `inferSize`: boolean - Automatically infer dimensions for remote images (default: true)
- All standard Astro Image component props
- **Example usage**:
```astro
---
import { Image } from "@/components/starwind/image";
import myImage from "@/assets/images/example.jpg";
---
```
### Input
- **Documentation**: https://starwind.dev/docs/components/input
- **Import pattern**: `import { Input } from "@/components/starwind/input";`
- **Key props**:
- `size`: "sm" | "md" | "lg" (default: "md")
- All standard HTML input attributes
- **Example usage**:
```astro
---
import { Input } from "@/components/starwind/input";
---
```
### Input OTP
- **Documentation**: https://starwind.dev/docs/components/input-otp
- **Description**: A one-time password input component for verification codes. Supports keyboard navigation, paste handling, and pattern validation.
- **Import pattern**: `import { InputOtp, InputOtpGroup, InputOtpSlot, InputOtpSeparator, REGEXP_ONLY_DIGITS_AND_CHARS } from "@/components/starwind/input-otp";`
- **Key props**:
- ``
- `maxLength`: number - Total characters allowed (default: 6)
- `pattern`: RegExp | string - Validation pattern (default: `\d` for digits only)
- `name`: string - For form submission
- `disabled`: boolean - Prevents interaction
- ``
- `index`: number - Position in the OTP sequence (0-indexed)
- `size`: "sm" | "md" | "lg" (default: "md")
- ``: Visual separator between groups
- **Events**: `starwind-input-otp:change` - Fires when value changes with `{ value, inputOtpId }`
- **Example usage**:
```astro
---
import {
InputOtp,
InputOtpGroup,
InputOtpSeparator,
InputOtpSlot,
} from "@/components/starwind/input-otp";
---
```
### Item
- **Documentation**: https://starwind.dev/docs/components/item
- **Description**: A flexible item component with multiple sub-components for building rich content blocks. Commonly used for lists, notifications, and card-like content.
- **Import pattern**: `import { Item, ItemContent, ItemTitle, ItemDescription, ItemActions, ItemMedia, ItemHeader, ItemFooter, ItemGroup, ItemSeparator } from "@/components/starwind/item";`
- **Key props**:
- `` (Root component)
- `variant`: "default" | "outline" | "muted" (default: "default")
- `size`: "default" | "sm" (default: "default")
- `as`: HTMLTag - The HTML element to render as (default: "div")
- All standard HTML attributes for the element specified by the `as` prop
- ``
- `variant`: "default" | "icon" | "image" (default: "default")
- All standard HTML attributes for div elements
- ``, ``, ``, ``, ``, ``: Standard HTML attributes for their respective elements
- ``: Container for grouping multiple items with semantic list markup
- ``: Separator for use within ItemGroup
- `orientation`: "horizontal" | "vertical" (default: "horizontal")
- **Example usage**:
```astro
---
import {
Item,
ItemContent,
ItemTitle,
ItemDescription,
ItemActions,
ItemMedia,
ItemGroup,
ItemSeparator,
} from "@/components/starwind/item";
import { Avatar, AvatarImage, AvatarFallback } from "@/components/starwind/avatar";
import { Button } from "@/components/starwind/button";
import Plus from "@tabler/icons/outline/plus.svg";
---
Basic ItemA simple item with title and description.WRWeb ReaperCreator of Starwind UIFirst ItemDescription for first itemSecond ItemDescription for second item
```
### Label
- **Documentation**: https://starwind.dev/docs/components/label
- **Import pattern**: `import { Label } from "@/components/starwind/label";`
- **Key props**:
- `size`: "sm" | "md" | "lg" (default: "md")
- All standard HTML label attributes
- **Example usage**:
```astro
---
import { Label } from "@/components/starwind/label";
import { Input } from "@/components/starwind/input";
---
```
### Pagination
- **Documentation**: https://starwind.dev/docs/components/pagination
- **Import pattern**: `import { Pagination, PaginationContent, PaginationItem, PaginationLink, PaginationPrevious, PaginationNext, PaginationEllipsis } from "@/components/starwind/pagination";`
- **Key props**:
- ``
- `isActive`: boolean - Highlights the current page
- `href`: string - Link target
- `size`: `"sm" \| "md" \| "lg"` - element size
- ``
- `href`: string - Link target
- `size`: `"sm" \| "md" \| "lg"` - element size
- ``
- `href`: string - Link target
- `size`: `"sm" \| "md" \| "lg"` - element size
- **Example usage**:
```astro
---
import {
Pagination,
PaginationEllipsis,
PaginationContent,
PaginationItem,
PaginationLink,
PaginationNext,
PaginationPrevious,
} from "@/components/starwind/pagination";
---
Prev123Next
```
### Progress
- **Documentation**: https://starwind.dev/docs/components/progress
- **Import pattern**: `import { Progress } from "@/components/starwind/progress";`
- **Key props**:
- `value`: number - Current progress value
- `max`: number - Maximum value (default: 100)
- `variant`: "default" | "primary" | "secondary" | "info" | "success" | "warning" | "error" (default: "default")
- Standard HTML attributes for div elements
- **Example usage**:
```astro
---
import { Progress } from "@/components/starwind/progress";
---
```
### Prose
- **Documentation**: https://starwind.dev/docs/components/prose
- **Description**: Typography styles for rendering markdown and rich text content. Handles headings, paragraphs, lists, blockquotes, code blocks, tables, and more. Sizing is em-based, scaling with inherited font-size.
- **Import pattern**: `import { Prose } from "@/components/starwind/prose";`
- **Key props**:
- `class`: string - Use Tailwind text utilities like `text-sm md:text-base` to control size
- **Usage notes**:
- Works great with Astro's content collections
- Override styles using CSS variables with `--prose-` prefix
- Use `not-sw-prose` class to exclude elements from prose styling
- **Example usage**:
```astro
---
import { Prose } from "@/components/starwind/prose";
---
Welcome to Starwind
Starwind UI is a beautiful component library designed for the modern web. It provides
accessible, customizable components that work seamlessly with Astro and Tailwind CSS.
Getting Started
Fully accessible components following WAI-ARIA guidelines
Customizable via CSS variables and Tailwind classes
Build beautiful interfaces without the complexity.
```
### Radio Group
- **Documentation**: https://starwind.dev/docs/components/radio-group
- **Import pattern**: `import { RadioGroup, RadioGroupItem } from "@/components/starwind/radio-group";`
- **Key props**:
- `RadioGroup`:
- `name`: string - Name for the radio group inputs (required)
- `value`: string - Current value of the radio group
- `defaultValue`: string - Default value if `value` not provided
- `legend`: string - Screen reader label for the group
- `orientation`: "vertical" | "horizontal" (default: "vertical")
- `RadioGroupItem`:
- `value`: string - Value of the radio item (required)
- `id`: string - ID for the radio input
- `size`: "sm" | "md" | "lg" (default: "md")
- `variant`: "default" | "primary" | "secondary" | "info" | "success" | "warning" | "error" (default: "default")
- **Example usage**:
```astro
---
import { RadioGroup, RadioGroupItem } from "@/components/starwind/radio-group";
import { Label } from "@/components/starwind/label";
---
```
### Select
- **Documentation**: https://starwind.dev/docs/components/select
- **Import pattern**: `import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem, SelectGroup, SelectLabel, SelectSeparator } from "@/components/starwind/select";`
- **Key props**:
- ``
- `size`: "sm" | "md" | "lg" (default: "md")
- `required`: boolean - Enables form validation (default: false)
- `disabled`: boolean - Disables the trigger (default: false)
- ``
- `size`: "sm" | "md" | "lg" (default: "md")
- `side`: "top" | "bottom" (default: "bottom")
- `align`: "start" | "center" | "end" (default: "start")
- `sideOffset`: number - Offset distance in pixels (default: 4)
- `animationDuration`: number - Duration of the content animation in ms (default: 150)
- ``
- `value`: string - Value of the item (required)
- `disabled`: boolean - Disables the item (default: false)
- ``
- `placeholder`: string - Placeholder text for the search input (default: "Search...")
- `emptyText`: string - Text to display when no results are found (default: "No results found.")
- **Example usage**:
```astro
---
import {
Select,
SelectContent,
SelectGroup,
SelectItem,
SelectLabel,
SelectSeparator,
SelectTrigger,
SelectValue,
} from "@/components/starwind/select";
---
```
### Separator
- **Documentation**: https://starwind.dev/docs/components/separator
- **Import pattern**: `import { Separator } from "@/components/starwind/separator";`
- **Key props**:
- `orientation`: "horizontal" | "vertical" (default: "horizontal")
- All standard HTML attributes for div elements (excluding `role` and `aria-orientation` which are set automatically)
- **Example usage**:
```astro
---
import { Separator } from "@/components/starwind/separator";
---