Auspice

Auspice

  • Docs

›Customisations

Introduction

  • Overview
  • Installing auspice
  • Input file formats

Customisations

  • Extending Auspice
  • Customising the Client

    • Injecting custom components
    • Sidebar theming

    Customising the Server

    • Auspice Server API
    • Deploying auspice without a server
  • Authentication

Tutorial

  • Auspice functionality

Injecting custom components

These interfaces are very experimental and will change frequently. Documentation is somewhat incomplete. Please contact us (links at the bottom of the page) if you are using these customisations as we would like to develop them in a collaborative fashion.

One way to extend auspice is by replacing react components with your own custom components. These custom components will receive props defined here, which can be used to update the rendering of the component using the normal react lifecycle methods. Right now this is only available for the splash page and nav-bar components, whose interfaces are defined here.

Each component must be the default export of a javascript file which is specified in the (client) config JSON passed to auspice at build time (auspice build or auspice develop).

Splash component

Build config property:

{
  "splashComponent": "<javascript file>"
}

Available Props:

  • isMobile boolean
  • available available datasets and narratives
  • browserDimensions broswer width & height
  • dispatch callback
  • errorMessage callback
  • changePage callback

Nav-bar component

Build config property:

{
  "navbarComponent": "<javascript file>"
}

Available props:

  • narrativeTitle string
  • sidebar boolean. Is it to be displayed in the sidebar?

The navbar also receives the (possibly customised) sidebar theme which can be used to style components.

Last updated on 1/2/2019
← Extending AuspiceSidebar theming →
  • Splash component
  • Nav-bar component
Auspice
Docs
Splash PageOverview
Links
GitHubNPMNextstrain
Contact
emailtwitter
If you use auspice, please cite Hadfield et al., 2018
Copyright © 2014-2019 Richard Neher & Trevor Bedford