@responsive-ui/accordion

A accordion component of responsive-ui.

Usage no npm install needed!

<script type="module">
  import responsiveUiAccordion from 'https://cdn.skypack.dev/@responsive-ui/accordion';
</script>

README

@responsive-ui/accordion

A accordion component of responsive-ui.

Svelte v3 npm Bundle Size download LICENCE

Install

npm install @responsive-ui/accordion

or

yarn add @responsive-ui/accordion

Look and Feel

@responsive-ui/accordion

Properties, Events & Slots

interface AccordionItem {
  label: string;
  content: string | SvelteComponentDev;
}

interface AccordionProps {
  class?: string;
  items: AccordionItem[];
  multiple?: boolean;
  style?: string;
}

interface AccordionEvents {}

interface AccordionSlots {}

declare class Accordion extends SvelteComponentTyped<
  AccordionProps,
  AccordionEvents,
  AccordionSlots
> {}

Example

<script>
  import Accordion from '@responsive-ui/accordion';

  const accordionItems = [
    {
      label: "label 1",
      content:
        "Lorem ipsum dolor sit amet consectetur adipisicing elit. A, in!",
    },
    {
      label: "label 2",
      content:
        "Lorem ipsum dolor sit amet consectetur adipisicing elit. B, in!",
    },
  ];
</script>

<Accordion items={accordionItems} multiple={true} />

Try it yourself in Svelte Repl

Sponsors

WeTix

License

@responsive-ui/accordion is 100% free and open-source, under the MIT license.

Big Thanks To

Thanks to these awesome companies for their support of Open Source developers ❤

GitHub NPM