Skip to content

patryk0493/svelte-epic-accordion

Repository files navigation

🪗 Svelte Epic Accordion 🪗

Svelte component inspired by Visual Studio Code

Project is still in beta!

npm version Release Tests

📔 Installation

npm install -D svelte-epic-accordion

pnpm i -D svelte-epic-accordion

yarn add -D svelte-epic-accordion

❓ How to use❓

Basic setup:

<script>
  import Accordion from "svelte-epic-accordion";
</script>

<Accordion let:Section>
  <Section id="one">Section one</Section>
  <Section id="two">Section two</Section>
</Accordion>

✏️ Examples

With aside slot (icons displayed after a hover)

<script>
  import Accordion from "svelte-epic-accordion";
</script>

<Accordion let:Section>
  <Section id="one">
    <span slot="aside">🚀</span>
    Section one
  </Section>
</Accordion>

Loader for a section

<script>
  import Accordion from "svelte-epic-accordion";
</script>

<Accordion let:Section>
  <Section id="one" isLoading />
</Accordion>

🎯 Goal :

See TODO list

License

MIT