### PNPM Workspace Configuration Example Source: https://skeleton.dev/llms-svelte.txt An example snippet showing how to define a package catalog in a 'pnpm-workspace.yaml' file for managing shared dependency versions across a monorepo. ```yaml catalog: # ... : ``` -------------------------------- ### Install Shiki Syntax Highlighter Source: https://skeleton.dev/llms-svelte.txt Command to install Shiki, a syntax highlighter, as a development dependency in a Node.js project. This is the first step for integrating code highlighting. ```bash npm install -D shiki ``` -------------------------------- ### Starting Local Dev Server with PNPM Source: https://skeleton.dev/llms-react.txt Illustrates how to start a local development server for a specific project within a PNPM monorepo. This command should be run from within the target project's directory. ```shell pnpm dev ``` -------------------------------- ### HTML Skeleton Placeholder Examples Source: https://skeleton.dev/llms-svelte.txt Provides examples of skeleton placeholders using plain HTML and CSS classes. These are designed to display a placeholder UI while actual content is loading, often with animation to indicate activity. ```html
``` ```html
...
``` -------------------------------- ### PNPM Monorepo Dependency Installation Source: https://skeleton.dev/llms-react.txt Shows the command to install all project dependencies within a PNPM monorepo. This assumes PNPM is installed and configured for workspaces. ```shell pnpm i ``` -------------------------------- ### Skeleton Switch List Example Source: https://skeleton.dev/llms-svelte.txt Illustrates how to render multiple Skeleton Switch components within a list using Svelte's `#each` block. This example demonstrates iterating over labels and applying basic grid layout and separators. ```svelte
{#each ['Label 1', 'Label 2', 'Label 3'] as label, i (label)} {label} {#if i < 2}
{/if} {/each}
``` -------------------------------- ### Start Specific Development Server Sub-commands Source: https://skeleton.dev/llms-react.txt Starts a development server for a more limited set of packages or specific applications within the monorepo. This allows for targeted development and testing of individual parts like documentation, themes, or specific framework playgrounds (Svelte, React). ```shell pnpm dev:{command} ``` -------------------------------- ### Astro Input Element Examples Source: https://skeleton.dev/llms-svelte.txt A comprehensive example in Astro showcasing various form input types including date, file, range, progress, and color pickers. It demonstrates basic styling and structure for these elements within a form. ```astro
``` -------------------------------- ### Start Development Server (Shell) Source: https://skeleton.dev/llms-svelte.txt Initiates the development server for all packages and playgrounds in watch mode. Specific sub-commands are available to run dependencies for individual sites or playgrounds. ```shell pnpm dev ``` ```shell pnpm dev:{command} ``` ```shell # Example sub-commands: # pnpm dev:docs # pnpm dev:themes # pnpm dev:svelte # pnpm dev:react ``` -------------------------------- ### HTML Example: Color Pairings (Tailwind) Source: https://skeleton.dev/llms-svelte.txt Provides an HTML example demonstrating how color pairings can be applied using Tailwind CSS utilities, specifically leveraging the `dark:` variant for dark mode styles. This is a more compact alternative to the CSS `light-dark()` function. ```html
...
``` -------------------------------- ### Complete Melt UI Accordion Example with Skeleton and Svelte Source: https://skeleton.dev/llms-svelte.txt A full Svelte component demonstrating the Melt UI Accordion, integrated with Skeleton UI and Tailwind CSS. Includes script setup for item data, Accordion builder instantiation, and template for rendering items with transitions. ```svelte
{#each items as i, index} {@const item = accordion.getItem(i)}

{#if item.isExpanded}
{item.item.description}
{/if} {#if index < items.length - 1}
{/if} {/each}
``` -------------------------------- ### Skeleton CSS Custom Variant Example (CSS) Source: https://skeleton.dev/llms-svelte.txt An example of defining a custom CSS variant (`skb`) for Skeleton components, targeting the base layer and slots for customization. ```css @custom-variant skb { @layer base { @slot; } } ``` -------------------------------- ### Install Floating UI Source: https://skeleton.dev/llms-svelte.txt Installs the core Floating UI library using npm. This is a prerequisite for using Floating UI in your Svelte project for advanced attachment creation. ```console npm install @floating-ui/dom ``` -------------------------------- ### Complete Radix ToggleGroup Component Example Source: https://skeleton.dev/llms-svelte.txt A full React component example demonstrating the integration of Radix UI ToggleGroup within a SvelteKit application using Skeleton UI. It includes state management for the selected value and basic configuration. ```tsx import * as RadixToggleGroup from '@radix-ui/react-toggle-group'; import { useState, type FC } from 'react'; interface ToggleGroupProps { /* ... */ } export const ToggleGroup: FC = () => { const [value, setValue] = useState('left'); return ( { if (value) setValue(value); }} aria-label="Text alignment" > Left Center Right ); }; ``` -------------------------------- ### HTML Skeleton Placeholders Example Source: https://skeleton.dev/llms-react.txt Provides examples of HTML structure for creating skeleton loading placeholders. These use simple `div` elements with specific classes and animate-pulse for visual feedback. This is purely for front-end display and does not involve any dynamic data fetching logic. ```html
``` -------------------------------- ### Component File Structure (Example) Source: https://skeleton.dev/llms-svelte.txt Demonstrates the standard directory and file naming convention for Skeleton components, showcasing the organization within the anatomy and modules folders. ```plaintext avatar/ ├── anatomy/ │ ├── fallback.{tsx|svelte} │ ├── image.{tsx|svelte} │ ├── root-context.{tsx|svelte} │ ├── root-provider.{tsx|svelte} │ └── root.{tsx|svelte} ├── modules/ │ ├── anatomy.ts │ ├── provider(.svelte).ts │ └── root-context.ts └── index.ts ``` -------------------------------- ### Install Tailwind Forms Plugin Source: https://skeleton.dev/llms-svelte.txt Provides instructions for installing the `@tailwindcss/forms` package using npm. This is a prerequisite for using Skeleton's form utility classes. The plugin normalizes form styling across different browsers. ```sh npm install -D @tailwindcss/forms ``` -------------------------------- ### Navigation Bar Example in React (TypeScript) Source: https://skeleton.dev/llms-react.txt A React component demonstrating the usage of the Skeleton Navigation Bar. This example is recommended for small screens and vertical layouts, supporting 3-5 navigation items. ```tsx import { Navigation } from '@skeletonlabs/skeleton-react'; import { BookIcon } from 'lucide-react'; import { HouseIcon } from 'lucide-react'; import { PopcornIcon } from 'lucide-react'; import { TvIcon } from 'lucide-react'; export default function Default() { const links = [ { label: 'Home', href: '#', icon: HouseIcon }, { label: 'Books', href: '#', icon: BookIcon }, { label: 'Movies', href: '#', icon: PopcornIcon }, { label: 'Television', href: '#', icon: TvIcon }, ]; let anchorBar = 'btn hover:preset-tonal flex-col items-center gap-1'; return (

Contents

{links.map((link) => { const Icon = link.icon; return ( {link.label} ); })}
); } ``` -------------------------------- ### Server-Side Pagination Count Example Source: https://skeleton.dev/llms-svelte.txt This example shows how to specify the total number of records for server-side pagination using the `count` property in Skeleton UI's Pagination component. This is crucial when the data source is truncated and doesn't return the full dataset. ```json { "data": [...], "pagination": { "page": 1, "limit": 10, "count": 500, } } ``` -------------------------------- ### Astro Form Elements (Kitchen Sink) Example Source: https://skeleton.dev/llms-react.txt A comprehensive example in Astro showcasing various form input types including date, file, range, progress, and color pickers. This snippet demonstrates how to structure different input fields within a form, using standard HTML input types. Styling classes are applied for presentation. ```astro
``` -------------------------------- ### Complete Melt UI Accordion Example with Skeleton and Svelte Source: https://skeleton.dev/llms-react.txt A full Svelte component example demonstrating the integration of Melt UI's Accordion builder with Skeleton UI and Tailwind CSS for styling. Includes data structure, component instantiation, and dynamic rendering with transitions. ```svelte
{#each items as i, index} {@const item = accordion.getItem(i)}

{#if item.isExpanded}
{item.item.description}
{/if} {#if index < items.length - 1}
{/if} {/each}
``` -------------------------------- ### Astro Input Groups with Lucide Icons Example Source: https://skeleton.dev/llms-react.txt Demonstrates complex input group configurations in Astro, utilizing Lucide React icons. This example shows how to combine text prefixes, icon elements, input fields, select dropdowns, and buttons within a single input group structure. It requires `lucide-react` for icon components. ```astro --- import { CheckIcon, CircleDollarSignIcon, SearchIcon } from 'lucide-react'; ---
https://
``` -------------------------------- ### Astro Chip Component Examples Source: https://skeleton.dev/llms-svelte.txt Illustrates the creation of interactive chip components using Astro, including variations with icons, text, and combined text with icons. It utilizes 'lucide-react' for icon integration. ```astro --- import { CheckIcon } from 'lucide-react'; ---
``` -------------------------------- ### Astro Button Example with Lucide React Icons Source: https://skeleton.dev/llms-svelte.txt Provides examples of creating various button styles in Astro, including icon-only, standard text buttons, and buttons with both text and icons. It utilizes lucide-react for icons and Tailwind CSS classes for styling, with a preset-filled style applied. ```astro --- import { ArrowRightIcon } from 'lucide-react'; ---
``` -------------------------------- ### Astro Example: Filled Button Presets with Color Variations Source: https://skeleton.dev/llms-svelte.txt This Astro code snippet demonstrates the usage of 'filled' presets for buttons. It shows how to apply different shades of primary colors for both light and dark modes, providing visual examples of the 'preset-filled-{color}-{lightModeShade}-{darkModeShade}' pattern. ```astro
{/* Neutral */}
(neutral)
{/* Colors */}
950-50
900-100
800-200
700-300
600-400
500
400-600
300-700
200-800
100-900
50-950
``` -------------------------------- ### Astro Example: Tonal Button Presets with Various Colors Source: https://skeleton.dev/llms-svelte.txt This Astro code snippet illustrates the use of 'tonal' presets for buttons. It displays examples using different color categories such as primary, secondary, tertiary, success, warning, error, and surface, following the 'preset-tonal-{color}' convention. ```astro
{/* Neutral */}
(neutral)
{/* Colors */}
primary
secondary
tertiary
success
warning
error
surface
``` -------------------------------- ### Component Anatomy Example (HTML) Source: https://skeleton.dev/llms-svelte.txt Illustrates the typical DOM structure for a component, exemplified by the Zag Avatar component. This structure serves as a blueprint for implementing component parts in Skeleton. ```html
...
``` -------------------------------- ### Astro Basic List Source: https://skeleton.dev/llms-react.txt A basic list example in Astro with no specific list styling applied via Tailwind CSS classes, resulting in a plain list structure. ```astro
  • Id maxime optio soluta placeat ea eaque similique consectetur dicta tempore.
  • Repellat veritatis et harum ad sint reprehenderit tenetur, possimus tempora.
  • Lorem ipsum dolor sit amet consectetur adipisicing elit harum ad sint.
``` -------------------------------- ### Segmented Control with Icons in React Source: https://skeleton.dev/llms-react.txt Shows how to use icons within the SegmentedControl items, enhancing visual representation. This example utilizes 'lucide-react' for icons. Ensure both '@skeletonlabs/skeleton-react' and 'lucide-react' are installed. ```tsx import { SegmentedControl } from '@skeletonlabs/skeleton-react'; import { AlignStartVerticalIcon, AlignCenterVerticalIcon, AlignEndVerticalIcon } from 'lucide-react'; export default function Icons() { return ( ); } ``` -------------------------------- ### Create Component Preview with Source Code Source: https://skeleton.dev/llms-svelte.txt Illustrates the use of the `Preview` component to display an example component and its corresponding source code. The `client:load` directive ensures client-side hydration. The `slot` props are used to inject the component preview and its raw code. ```astro ``` -------------------------------- ### Responsive AppBar Example with SkeletonUI Source: https://skeleton.dev/llms-svelte.txt This Svelte component demonstrates a responsive AppBar layout using SkeletonUI. It dynamically adjusts spacing and layout based on screen size (mobile vs. desktop) and includes navigation icons. Dependencies: '@lucide/svelte', '@skeletonlabs/skeleton-svelte'. ```svelte

Headline

``` -------------------------------- ### Provider Pattern: Tooltip Example (Svelte) Source: https://skeleton.dev/llms-react.txt Demonstrates the Provider Pattern in Svelte using Skeleton's Tooltip components. It shows how to set up a tooltip with a provider, trigger, positioner, and content, and how to control its visibility programmatically. ```svelte Anchor Content ``` -------------------------------- ### Collapsible Component Example - React Source: https://skeleton.dev/llms-react.txt A basic example of the Collapsible component, demonstrating how to use Collapsible.Trigger and Collapsible.Content to create an expandable and collapsible section. Requires the Collapsible component from '@skeletonlabs/skeleton-react'. ```tsx import { Collapsible } from '@skeletonlabs/skeleton-react'; export default function Default() { return ( Toggle Lorem ipsum dolor sit amet consectetur, adipisicing elit. Velit pariatur error soluta voluptate, accusantium modi repudiandae omnis eligendi, suscipit repellat impedit architecto neque sequi mollitia autem dicta quae ipsum et? ); } ``` -------------------------------- ### Astro Example: Contrast Colors Source: https://skeleton.dev/llms-svelte.txt Demonstrates the usage of standard contrast color utility classes within an Astro component. It shows how to apply background and text colors using Skeleton's contrast color system. ```astro

Standard Colors

Color Pairings

``` -------------------------------- ### Astro Divider Component Example Source: https://skeleton.dev/llms-svelte.txt Provides an example of implementing a horizontal divider using an `
` tag with the 'hr' class in Astro. This is useful for visually separating content sections. ```astro

Above the divider.


Below the divider.

``` -------------------------------- ### Default RatingGroup Example (React) Source: https://skeleton.dev/llms-react.txt Demonstrates the basic implementation of the RatingGroup component. It requires importing RatingGroup from '@skeletonlabs/skeleton-react'. This example renders a 5-star rating system where users can select a full star. ```tsx import { RatingGroup } from '@skeletonlabs/skeleton-react'; export default function Default() { return ( {(ratingGroup) => ratingGroup.items.map((index) => )} ); } ``` -------------------------------- ### Slider Component Usage Example - Skeleton React Source: https://skeleton.dev/llms-react.txt Demonstrates how to use the Slider component from '@skeletonlabs/skeleton-react'. This example shows a basic slider with a default value, a label, a control with a track and thumb, and marker points. ```tsx import { Slider } from '@skeletonlabs/skeleton-react'; export default function Default() { return ( Label ); } ``` -------------------------------- ### Run Automated Skeleton Migration Source: https://skeleton.dev/llms-svelte.txt Initiates an automated migration process to Skeleton v4 using the npx command. This command handles initial package and stylesheet updates. ```bash npx skeleton migrate skeleton-4 ``` -------------------------------- ### Run Local Commands (Shell) Source: https://skeleton.dev/llms-svelte.txt Execute local instances of commands like 'format' and 'lint' using pnpm from the monorepo root. This ensures consistency across the project by drawing from the root package.json. ```shell pnpm -w ``` -------------------------------- ### Complete Radix ToggleGroup Example (TSX) Source: https://skeleton.dev/llms-react.txt A full example of a functional Radix UI ToggleGroup component in React, including state management for the selected value and all necessary imports and props. It demonstrates basic configuration and styling. ```tsx import * as RadixToggleGroup from '@radix-ui/react-toggle-group'; import { useState, type FC } from 'react'; interface ToggleGroupProps { /* ... */ } export const ToggleGroup: FC = () => { const [value, setValue] = useState('left'); return ( { if (value) setValue(value); }} aria-label="Text alignment"> Left Center Right ); }; ``` -------------------------------- ### Astro Card Presets Example Source: https://skeleton.dev/llms-svelte.txt Demonstrates the usage of predefined card styles using Astro components and Tailwind CSS classes. These presets apply consistent styling across different card variations. ```astro
Card
Card
Card
Card
Card
Card
Card
Card
Card
Card
Card
Card
Card
Card
Card
Card
Card
Card
Card
Card
Card
``` -------------------------------- ### Astro Checkbox Examples Source: https://skeleton.dev/llms-svelte.txt Demonstrates how to create a list of checkboxes using Astro. Each checkbox is wrapped in a label for accessibility, allowing users to click the text to toggle the checkbox. It includes options for pre-checked states. ```astro
``` -------------------------------- ### Complete Calendar Component Example in Svelte Source: https://skeleton.dev/llms-svelte.txt A comprehensive example of a Svelte Calendar component, integrating styling, date logic (disabling specific dates), and binding to a state variable. It includes header, grid, and day cell components. ```svelte {#snippet children({ months, weekdays })}
{#each months as month, i (i)} {#each weekdays as day}
{day.slice(0, 2)}
{/each}
{#each month.weeks as weekDates} {#each weekDates as date} {date.day} {/each} {/each}
{/each}
{/snippet}
``` -------------------------------- ### Import Component and Raw Code for Preview Source: https://skeleton.dev/llms-svelte.txt Shows how to import a default component and its raw source code using Vite's `?raw` import. This is typically used in conjunction with a `Preview` component to display both the component's output and its source. ```ts import Default from '@/components/examples/foo/default'; import DefaultRaw from '@/components/examples/foo/default?raw'; ``` -------------------------------- ### Install Custom Fonts for Skeleton Themes Source: https://skeleton.dev/llms-svelte.txt Install custom fonts using npm packages like Fontsource. Import the font in your global stylesheet and then set the `font-family` theme properties for headings and base text within the desired theme scope. ```bash npm install @fontsource/open-sans ``` -------------------------------- ### Example Branch Naming Conventions Source: https://skeleton.dev/llms-svelte.txt Demonstrates the recommended naming conventions for pull request branches in the Skeleton project. These conventions help categorize the purpose of the branch, such as documentation updates, new features, tasks, or bug fixes. It emphasizes using short, semantic names and snake_case. ```shell docs/get-started-typo-fix bugfix/accordion-render-issue ``` -------------------------------- ### RatingGroup with Half-Star Selection (React) Source: https://skeleton.dev/llms-react.txt This example shows how to enable half-star selections in the RatingGroup component by using the 'allowHalf' prop. Users can select portions of a star, providing more granular rating options. It uses the same import and basic structure as the default example. ```tsx import { RatingGroup } from '@skeletonlabs/skeleton-react'; export default function Half() { return ( {(ratingGroup) => ratingGroup.items.map((index) => )} ); } ```