# Melt UI An open-source Svelte library for building high-quality, accessible design systems and web apps. banner {

Melt UI empowers developers to create accessible UIs that embody their unique style. With a strong focus on accessibility, limitless customization options, and an overall delightful developer experience, Melt UI strives to be the de-facto headless UI library for Svelte.

}
View Melt UI Docs
At minimum, we recommend you read the following documentation before you start this integration guide. - [Styling](https://next.melt-ui.com/guides/styling) - [How to Use](https://next.melt-ui.com/guides/how-to-use) ## Requirements | Tooling | Minimum Supported | | ------------------------------------ | ------------------ | | [Svelte](https://svelte.dev/) | 5 | | [Skeleton](https://skeleton.dev) | 3 | | [Tailwind](https://tailwindcss.com/) | 4 | | [Melt UI](https://next.melt-ui.com/) | (Svelte 5 version) | ## Introduction In this guide we'll implement the following Melt UI `` component. This will showcase the bare minimum requirements for integrating Skeleton with Melt UI. banner
Accordion Documentation
## Get Started ### Create a SvelteKit Project To begin, we'll setup a new SvelteKit project, including Skeleton v3 and Tailwind v4. Setup SvelteKit App ### Install Melt UI Install the Melt UI package via your package manager of choice. ```console npm install melt ``` ### Component Boilerplate Create a new component in `/lib/components/Accordion/Accordion.svelte` and insert the following markup. This will generate an unstyled version of the component. ```svelte
{#each items as i} {@const item = accordion.getItem(i)}

{item.item.description}
{/each}
```
### Add the Component Finally, let's add our new component to the root `+page.svelte` so that we may preview it. ```svelte
```
## Styling Melt UI builders are made up of native HTML elements, meaning you can implement classes directly. Use this to provide Tailwind and Skeleton utility classes. ### Basic Styles Styling the root element. ```svelte
``` Styling the trigger button element. ```svelte ``` Styling content element, including animations based on the `data-state` value. ```svelte
``` Before the close of the `#each` block, insert the follow to insert a `
` divider. ```svelte {#if index < items.length - 1}
{/if} ``` ### Complete Example Below is a complete example showing the entire component with styles, transitions, and some basic configuration. ```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}
``` ## Going Further If you wish to match Skeleton component conventions, view our [contributor component guidelines](/docs/resources/contribute/components). ## Attribution Melt UI is created and maintained by [TGlide](https://github.com/TGlide). Consider [sponsoring him](https://github.com/sponsors/TGlide) to support this open source project.