1. Docs
  2. Vite Guide

Vite Guide

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

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

Install via npm

  1. Create a new Project

    Create a new project if not having one.
    icon shell Shell
    npm create vite@latest vite-example -- --template vanilla-ts
    cd vite-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

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

    icon html index.html
    <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 + ViteJS here