1. Docs
  2. AstroJS Guide

AstroJS Guide

This guide will show How to install Flexilla In your AstroJS Project

This guide will help you to use Flexilla in your new or existing AstroJs Project

Install via npm

  1. Create a new Project

    Create a new project if not having one.
    icon shell Shell
    npm create astro@latest astro-example
    cd astro-example
    
  2. Install flexilla

  3. Usage

    icon js script
    import {Accordion, Tabs} from "@flexilla/flexilla"
    
    const accordion = new Accordion("#my-accordion")
    
    const tabs = new  Tabs("#my-tabs",{ 
        // options
    })
    

Using CDN

  1. Import the library via CDN

    .../SomeComponent.astro
    <script type="module"> 
      import * as Flexilla from 'https://esm.run/@flexilla/flexilla'; 
    </script>
    
  2. Usage

    .../SomeComponent.astro
    <script type="module">
      new Flexilla.Tabs("[data-tabs-el]") 
      Flexilla.Accordion.AutoInit(".accordion-el") 
    </script>
    

Quick Start Examples

Checkout these quick start examples to get a feel of Flexilla + Astro here