Close Docs

App

App-level orchestrator for themes, splash flow, and navigation startup.

Usage

import { DiscoApp } from 'discoui';

DiscoApp.ready(() => {
  const app = new DiscoApp({
    splash: 'auto',
    statusBarColor: 'black',
    navBarColor: 'rgba(0, 0, 0, 0.5)'
  });
  const frame = document.getElementById('appFrame');
  app.launch(frame);
});

API

Theme getters/setters

These properties let you read the current theme values and update them at runtime.

Safe area insets

Use disco-inset-* attributes on <html> or the helper to define safe area insets (values in px).

<html
  disco-inset-top="47"
  disco-inset-bottom="34"
  disco-inset-left="0"
  disco-inset-right="0">
app.setInsets({ top: 47, bottom: 34, left: 0, right: 0 });

Inset bar colors can be provided through app options or root attributes: