### Install Shiki Syntax Highlighter Source: https://skeleton.dev/llms-svelte.txt Installs the Shiki syntax highlighter using npm. This package provides accurate and fast syntax highlighting for various programming languages. ```bash npm install -D shiki ``` -------------------------------- ### Basic Menu Example Source: https://skeleton.dev/llms-svelte.txt Demonstrates the basic implementation of a dropdown menu with several action items. ```APIDOC ## Menu Component Usage ### Description Standard dropdown menu implementation. ### Method N/A (Component Usage) ### Endpoint N/A ### Parameters None ### Request Example ```svelte Open Menu New File Open File Save Export ``` ### Response N/A ``` -------------------------------- ### Skeleton UI Button Presets Example (Astro) Source: https://skeleton.dev/llms-svelte.txt Provides an example of using Skeleton UI's preset utility classes for styling buttons and other interface elements within an Astro component. It showcases filled, tonal, and outlined button presets with color variations. ```astro --- const diagramCircle = 'preset-tonal w-8 aspect-square flex justify-center items-center rounded-full'; ---
1
2
3
``` -------------------------------- ### Install Radix UI Component Package Source: https://skeleton.dev/llms-svelte.txt Installs the Radix UI component package using npm. This is a prerequisite for using Radix components in your project. ```bash npm install @radix-ui/react-toggle-group ``` -------------------------------- ### Astro Kitchen Sink Form Example Source: https://skeleton.dev/llms-svelte.txt A comprehensive example of various input types in Astro, including date, file, range, progress, and color pickers. ```astro
``` -------------------------------- ### Outlined Presets Example (Astro) Source: https://skeleton.dev/llms-svelte.txt Demonstrates applying 'preset-outlined' classes to buttons in Astro, showing different color and shade combinations. ```astro
{/* Neutral */} {/* Colors */}
``` -------------------------------- ### Outlined Presets Example (TXT) Source: https://skeleton.dev/llms-svelte.txt Defines the naming convention for outlined presets in TXT format, including variations for color and shade. ```txt preset-outlined preset-outlined-{color}-{shade}-{shade} ``` -------------------------------- ### Responsive Grid Layout Example (HTML) Source: https://skeleton.dev/llms-svelte.txt This example demonstrates how to create a responsive grid layout using Tailwind CSS. It shows a two-column layout on medium screens and larger, collapsing to a single column on smaller screens. The sidebar is hidden on small screens and displayed from the medium breakpoint upwards. ```html
(main)
``` -------------------------------- ### Install Bits UI and Date Formatting Package Source: https://skeleton.dev/llms-svelte.txt Installs the core Bits UI package and the Adobe Internationalized Date package for date/time formatting. These are essential for using Bits UI components like the Calendar. ```bash npm install bits-ui npm i -D @internationalized/date ``` -------------------------------- ### Install Custom Font with npm Source: https://skeleton.dev/llms-svelte.txt Install a custom font package using npm. This example shows how to install the 'Open Sans' font from the Fontsource library. ```bash npm install @fontsource/open-sans ``` -------------------------------- ### Basic Accordion Example Source: https://skeleton.dev/llms-svelte.txt A fundamental example of the Accordion component, displaying content in collapsible sections. It uses Svelte and the Skeleton UI library, along with icons from Lucide. ```svelte {#each items as item, i (item)} {#if i !== 0}
{/if}

{item.title}

{#snippet element(attributes)} {#if !attributes.hidden}
{item.description}
{/if} {/snippet}
{/each}
``` -------------------------------- ### Configure Toast Placement Source: https://skeleton.dev/llms-svelte.txt Shows how to initialize the toaster with a specific `placement` option to control the global screen position of toast notifications. This example sets the toasts to appear at the 'bottom-end'. ```svelte {#snippet children(toast)} {toast.title} {toast.description} {/snippet} ``` -------------------------------- ### Astro Checkboxes Example Source: https://skeleton.dev/llms-svelte.txt Demonstrates how to create a set of checkboxes in Astro. Each checkbox is wrapped in a label for accessibility. ```astro
``` -------------------------------- ### Carousel Usage Example Source: https://skeleton.dev/llms-svelte.txt Demonstrates how to implement the Carousel component with slides, controls, and indicators. ```APIDOC ## Carousel Usage Example This example showcases the implementation of the Carousel component. ### Code ```svelte Back Toggle Autoplay Next {#each slides as slide, i} {slide.title} {/each} {#snippet children(carousel)} {#each carousel().pageSnapPoints as _, index} {/each} {/snippet} ``` ### Notes This component adopts a headless design, meaning default styles are not applied, allowing for maximum user control over styling. ``` -------------------------------- ### Basic Tags Input Example - Skeleton Svelte Source: https://skeleton.dev/llms-svelte.txt Demonstrates the fundamental usage of the TagsInput component in Skeleton Svelte, allowing users to input a list of predefined values. ```svelte Flavors {#snippet children(tagsInput)} {#each tagsInput().value as value, index (index)} {value} {/each} {/snippet} Clear All ``` -------------------------------- ### Complete Skeleton Calendar Example (Svelte) Source: https://skeleton.dev/llms-svelte.txt A full example of the Skeleton Calendar component in Svelte, demonstrating its integration with internationalization libraries for date handling and custom configuration for date unavailability. It includes styling for headers, navigation, and the calendar grid. ```svelte {#each collection.items as item (item.value)} {item.label} {/each} ``` -------------------------------- ### Enable Date Range Selection with Skeleton React DatePicker Source: https://skeleton.dev/llms-react.txt Demonstrates how to configure the DatePicker component for range selection by setting `selectionMode='range'` and associating two input fields for start and end dates. This setup allows users to pick a date interval. ```tsx import { DatePicker, Portal } from '@skeletonlabs/skeleton-react'; export default function Range() { return ( Select Date Range {(datePicker) => ( <> {datePicker.weekDays.map((weekDay, id) => ( {weekDay.short} ))} {datePicker.weeks.map((week, id) => ( {week.map((day, id) => ( {day.day} ))} ))} <> {datePicker.weeks.map((week, id) => ( {week.map((day, id) => ( {day.day} ))} ))} )} {(datePicker) => ( <> {datePicker.getMonthsGrid({ columns: 4, format: 'short' }).map((months, id) => ( {months.map((month, id) => ( {month.label} ))} ))} )} {(datePicker) => ( <> {datePicker.getYearsGrid({ columns: 4 }).map((years, id) => ( {years.map((year, id) => ( {year.label} ))} ))} )} ); } ``` -------------------------------- ### Display Inline Calendar with Skeleton Svelte DatePicker Source: https://skeleton.dev/llms-svelte.txt This Svelte code snippet demonstrates how to render the Skeleton DatePicker component in inline mode. By adding the 'inline' prop to the root DatePicker component, it displays the calendar directly on the page without a popover. The example includes the necessary script setup and the structure for day, month, and year views, along with navigation elements. ```svelte Choose Date {#snippet children(datePicker)} {#each datePicker().weekDays as weekDay, id (id)} {weekDay.short} {/each} {#each datePicker().weeks as week, id (id)} {#each week as day, id (id)} {day.day} {/each} {/each} {/snippet} {#snippet children(datePicker)} {#each datePicker().getMonthsGrid({ columns: 4, format: 'short' }) as months, id (id)} {#each months as month, id (id)} {month.label} {/each} {/each} {/snippet} {#snippet children(datePicker)} {#each datePicker().getYearsGrid({ columns: 4 }) as years, id (id)} {#each years as year, id (id)} {year.label} {/each} {/each} {/snippet} ``` -------------------------------- ### Basic Switch Usage with State Management Source: https://skeleton.dev/llms-svelte.txt Demonstrates the fundamental usage of the Switch component, including state binding and handling the checked state change. It shows how to integrate the Switch with a label and display the current checked state. ```svelte
(checked = details.checked)}> Label

Checked: {checked}

``` -------------------------------- ### Creating a List of Switches Source: https://skeleton.dev/llms-svelte.txt Shows how to render multiple Switch components within a list layout using Svelte's `#each` block. This example demonstrates assigning unique labels to each switch and separating them with horizontal rules. ```svelte
{#each ['Label 1', 'Label 2', 'Label 3'] as label, i (label)} {label} {#if i < 2}
{/if} {/each}
``` -------------------------------- ### Install Melt UI Package Source: https://skeleton.dev/llms-svelte.txt Installs the Melt UI package using npm. This is a prerequisite for using Melt UI components in your Svelte project. ```bash npm install melt ``` -------------------------------- ### Responsive AppBar Layout with Skeleton Svelte Source: https://skeleton.dev/llms-svelte.txt Demonstrates how to create a responsive AppBar layout using Skeleton Svelte components. It utilizes conditional classes to adjust the grid columns for mobile and desktop views, ensuring optimal display across devices. Dependencies include '@lucide/svelte' for icons and '@skeletonlabs/skeleton-svelte' for the AppBar. ```svelte

Headline

``` -------------------------------- ### Install Tailwind Forms Plugin (npm) Source: https://skeleton.dev/llms-svelte.txt Command to install the official Tailwind Forms plugin, which is a prerequisite for using Skeleton's form styling utilities. ```sh npm install -D @tailwindcss/forms ``` -------------------------------- ### Basic App Bar Layout with Skeleton UI Source: https://skeleton.dev/llms-svelte.txt Demonstrates a standard App Bar layout with a menu icon, page title, and action icons. This example utilizes Svelte and the Skeleton UI library, importing necessary icons from '@lucide/svelte'. The layout is defined using Tailwind CSS grid classes within AppBar.Toolbar. ```svelte

Skeleton

``` -------------------------------- ### Display Direct Use, Presets, and Pairings of Contrast Colors Source: https://skeleton.dev/llms-svelte.txt This Astro component example showcases how to utilize Skeleton's contrast colors. It includes sections for 'Direct Use' (applying color and contrast shades directly), 'Presets' (using predefined color combinations), and 'Preset + Pairings' (combining presets with inverse contrast shades). This is useful for creating accessible text and icons across different themes and dark mode settings. ```astro --- import { SwatchBookIcon } from 'lucide-react'; ---

Direct Use

Primary
Secondary
Tertiary

Presets

Primary
Secondary
Tertiary

Preset + Pairings

Primary
Secondary
Tertiary
``` -------------------------------- ### Basic Collapsible Component in Svelte Source: https://skeleton.dev/llms-svelte.txt A foundational example of the Collapsible component in Svelte. It requires importing the component and its sub-components like Trigger and Content. The example shows a collapsible section with a title and navigation links. ```svelte

Design System

``` -------------------------------- ### Basic Steps Implementation in Svelte Source: https://skeleton.dev/llms-svelte.txt Demonstrates the fundamental usage of the Steps component. It requires the '@skeletonlabs/skeleton-svelte' library and defines an array of step objects, each with a title and content. The component then renders these steps, including navigation buttons. ```svelte {#each steps as item, index} {index + 1} {item.title} {#if index < steps.length - 1} {/if} {/each} {#each steps as item, index} {item.content} {/each} All done!
Back Next
``` -------------------------------- ### Install Tailwind Forms Plugin using npm Source: https://skeleton.dev/llms-react.txt Command to install the `@tailwindcss/forms` package as a development dependency. This plugin is essential for normalizing form styling within a Tailwind CSS project. ```sh npm install -D @tailwindcss/forms ``` -------------------------------- ### Create a Drawer with Skeleton Dialog Source: https://skeleton.dev/llms-svelte.txt This example demonstrates repurposing the Skeleton UI Dialog component to function as a side-panel drawer. It imports necessary components from '@lucide/svelte' and '@skeletonlabs/skeleton-svelte'. Optional animations are defined for visual effects. ```svelte Trigger
Drawer

A slide out drawer panel.

``` -------------------------------- ### Installing and Importing Custom Fonts with NPM Source: https://skeleton.dev/llms-react.txt Shows the process of installing a custom font using npm and then importing it into your global stylesheet. This is a prerequisite for applying custom fonts via theme properties. ```bash npm install @fontsource/open-sans ``` ```css @import '@fontsource/open-sans'; ```