Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A swup plugin for integrating Gia frontend components 🏭

License

NotificationsYou must be signed in to change notification settings

swup/gia-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Aswup plugin for integratingGia frontend components.

Automatically reloads components when required only for the replaced containers.

Installation

Install the plugin from npm and import it into your bundle.

npm install @swup/gia-plugin
importSwupGiaPluginfrom'@swup/gia-plugin';

Or include the minified production file from a CDN:

<scriptsrc="https://unpkg.com/@swup/gia-plugin@2"></script>

Usage

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

constswup=newSwup({plugins:[newSwupGiaPlugin()]});

Options

components

Components to be used for mount/unmount. Defaults to an empty object.

importComponentfrom'gia/Component'classExampleComponentextendsComponent{// ...}constcomponents={  ExampleComponent}constswup=newSwup({plugins:[newSwupGiaPlugin({ components})]})

firstLoad

Whether the components should be loaded on start. Defaults totrue.

newSwupGiaPlugin({firstLoad:true});

log

Let Gia report info on mounting/unmounting of components. Corresponds to setting thelog variableofGia's config). Defaults tofalse.

newSwupGiaPlugin({log:false});

[8]ページ先頭

©2009-2025 Movatter.jp