Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions sites/skeleton.dev/src/components/docs/Header.astro
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,5 @@ const versionLinks = [
</div>
</div>
</header>

<div class="preset-tonal text-center p-4">You are viewing the archived Skeleton v3.0 documentation.</div>
10 changes: 0 additions & 10 deletions sites/skeleton.dev/src/components/homepage/HomeHero.astro
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,6 @@ import { ChevronRight as IconChevron } from 'lucide-react';
</div>
<!-- Hero Text -->
<div class="self-center space-y-4">
<!-- Announcement -->
<a
class="btn btn-sm preset-filled-primary-500 gap-2 shadow"
href="https://github.com/skeletonlabs/skeleton/discussions/3844"
target="_blank"
>
<span>🎉</span>
<span>Skeleton v4 RC now available!</span>
<IconChevron className="size-4" />
</a>
<!-- Text -->
<h1 class="heading-font-family text-4xl md:text-5xl font-bold xl:text-balance">An adaptive design system powered by Tailwind CSS.</h1>
<p class="xl:text-balance">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,26 @@ As we prepare for the upcoming release of Skeleton v4, we will introduce new com

### Composed Pattern

The component structure will now be much more explicit and granular. While a bit more verbose, this offers direct access to all children within the component tree. Allowing you to pass pass arbitrary props and attributes directly to the the HTML template within. Including: `required`, `data-*`, `style`, `class`, and many others.
The component structure will now be much more explicit and granular. While a bit more verbose, this offers direct access to all children within the component tree. Allowing you to pass pass arbitrary props and attributes directly to the HTML template within. Including: `required`, `data-*`, `style`, `class`, and many others.

```svelte
<Accordion>
<Accordion.Item value="item-1">
<Accordion.ItemHeading>
<h3>
<Accordion.ItemTrigger>Item 1</Accordion.ItemTrigger>
</Accordion.ItemHeading>
</h3>
<Accordion.ItemContent>Content for Item 1</Accordion.ItemContent>
</Accordion.Item>
<Accordion.Item value="item-2">
<Accordion.ItemHeading>
<h3>
<Accordion.ItemTrigger>Item 2</Accordion.ItemTrigger>
</Accordion.ItemHeading>
</h3>
<Accordion.ItemContent>Content for Item 2</Accordion.ItemContent>
</Accordion.Item>
<Accordion.Item value="item-3">
<Accordion.ItemHeading>
<h3>
<Accordion.ItemTrigger>Item 3</Accordion.ItemTrigger>
</Accordion.ItemHeading>
</h3>
<Accordion.ItemContent>Content for Item 3</Accordion.ItemContent>
</Accordion.Item>
</Accordion>
Expand Down Expand Up @@ -90,9 +90,9 @@ export default function () {
<Accordion>
{/* ... */}
<Accordion.Item value="item-1">
<Accordion.ItemHeading>
<h3>
<Accordion.ItemTrigger element={(attributes) => <button {...attributes}>My Own Button</button>} />
</Accordion.ItemHeading>
</h3>
<Accordion.ItemContent>Content for Item 1</Accordion.ItemContent>
</Accordion.Item>
{/* ... */}
Expand All @@ -107,20 +107,20 @@ export default function () {
<Accordion>
<!-- ... -->
<Accordion.Item value="item-1">
<Accordion.ItemHeading>
<h3>
<Accordion.ItemTrigger>
{#snippet element(attributes)}
<button {...attributes}>My Own Button</button>
{/snippet}
</Accordion.ItemTrigger>
</Accordion.ItemHeading>
</h3>
<Accordion.ItemContent>Content for Item 1</Accordion.ItemContent>
</Accordion.Item>
<!-- ... -->
</Accordion>
```

By exposing the the the internal `attributes`, this enables you to take control and modify the template implementation.
By exposing the internal `attributes`, this enables you to take control and modify the template implementation.

### Custom Animations

Expand All @@ -134,9 +134,9 @@ import { slide } from 'svelte/transition';
<Accordion>
<!-- ... -->
<Accordion.Item value="item-1">
<Accordion.ItemHeading>
<h3>
<Accordion.ItemTrigger>Item 1</Accordion.ItemTrigger>
</Accordion.ItemHeading>
</h3>
<Accordion.ItemContent>
{#snippet element(attributes)}
{#if !attributes.hidden}
Expand Down Expand Up @@ -169,10 +169,10 @@ import AccordionContentAnimated from 'my/local/lib/AccordionContentAnimated.svel
<Accordion>
<!-- ... -->
<Accordion.Item value="item-1">
<Accordion.ItemHeading>
<h3>
<Accordion.ItemTrigger>Item 1</Accordion.ItemTrigger>
<AccordionContentAnimated>Content for Item 1</AccordionContentAnimated>
</Accordion.ItemHeading>
</h3>
<AccordionContentAnimated>Content for Item 1</AccordionContentAnimated>
</Accordion.Item>
<!-- ... -->
</Accordion>
Expand Down