swup swup Gia Plugin
GitHub swup on GitHub

Gia Plugin

Swup plugin for simple implementation with Gia framework. Plugin automatically reloads components when it's needed only for the replaced containers.


This plugin can be installed with npm

npm install @swup/gia-plugin

and included with import

import SwupGiaPlugin from '@swup/gia-plugin';

or included from the dist folder

<script src="./dist/SwupGiaPlugin.js"></script>


To run this plugin, include an instance in the swup options.

const swup = new Swup({
  plugins: [new SwupGiaPlugin()]



Defines components object to be used for mount/unmount. Defaults to empty object.

import Component from 'gia/Component'

class SampleComponent extends Component {
    // ...

const components = {
    SampleComponent: SampleComponent
new SwupGiaPlugin({components: components});


Defines whether plugin should load the component on start. Defaults to true.

new SwupGiaPlugin({firstLoad: true});


Defines whether plugin should let Gia report info on mounting/unmounting of components (like setting log variable with Gia config). Defaults to false.

new SwupGiaPlugin({log: false});