npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@qiiqa/bob-ui-react-themes

v0.6.0

Published

React theming and context for Qiiqa UI

Downloads

420

Readme

@qiiqa/bob-ui-react-themes

The theming and customization layer for Qiiqa React applications.


Concept: Themes vs Variants

Bob UI separates appearance into two distinct concerns:

Theme (Developer's choice)

A theme defines the structural UX style of your app — border rendering, shadow depth, density, and can include custom fonts, background images, and icon styles. The developer picks one theme for their entire app and it stays fixed.

Bob UI ships two built-in themes:

  • clean — Minimal, modern. Interactive elements have no visible borders by default; only the active state shows a bottom underline.
  • pragmatic — Traditional, clear. All buttons and tabs always show a 1px border.

Developers can also supply a fully custom theme — a CSS file with their own fonts, images, and --q-* variable overrides.

Variant (User's choice)

A variant is a color palette and light/dark mood that the end user can switch between at runtime. Each variant is a CSS file setting --q-* color variables (primaries, backgrounds, text, etc.).

Bob UI ships these built-in variants: moonlit, ocean, dark, green, light.

Users can also create and save their own custom variants via BobVariantDesigner.


Features

  • Two-tier separation: Developer chooses the theme; users choose their variant.
  • Dynamic variant loading: Variant CSS files are fetched at runtime — no bundle-time coupling.
  • System-aware: Can auto-detect OS dark/light preference via BobThemeProvider.
  • Persistent: Remembers user variant choices in localStorage.
  • Custom variants: Users can create, save, and delete their own color variants via BobVariantDesigner.

⚠️ Required: Copy Variant CSS Files to Your Public Folder

The provider loads variant CSS files dynamically from browser-accessible URLs. These files ship with this package under themes/, but must be served as static files by your app.

Copy from:

node_modules/@qiiqa/bob-ui-react-themes/themes/

To your app's public/themes/ folder:

your-app/public/themes/
  ├── theme-moonlit.css    ← "moonlit" color variant
  ├── theme-ocean.css      ← "ocean" color variant
  ├── theme-dark.css       ← "dark" color variant
  ├── theme-green.css      ← "green" color variant
  └── theme-original.css   ← "original" color variant

Without this step, variant switching will silently fail with no visual error.


Usage

Prefer using @qiiqa/bob-ui-react (the aggregate package). It re-exports everything from this package, so you rarely need to import directly from @qiiqa/bob-ui-react-themes.

BobThemeProvider

Wrap your application root. The themes array uses the format '{variant} {theme}':

import { BobThemeProvider } from '@qiiqa/bob-ui-react';

const App = () => (
    <BobThemeProvider
        themes={[
            // '{variant} {theme}' — variant = color palette, theme = clean or pragmatic
            { name: 'moonlit clean',     label: 'Moonlit',      url: '/themes/theme-moonlit.css' },
            { name: 'moonlit pragmatic', label: 'Moonlit Pro',  url: '/themes/theme-moonlit.css' },
            { name: 'ocean clean',       label: 'Ocean',        url: '/themes/theme-ocean.css' },
            { name: 'ocean pragmatic',   label: 'Ocean Pro',    url: '/themes/theme-ocean.css' },
            { name: 'dark clean',        label: 'Dark',         url: '/themes/theme-dark.css' },
            { name: 'dark pragmatic',    label: 'Dark Pro',     url: '/themes/theme-dark.css' },
        ]}
        defaultLight="moonlit clean"
        defaultDark="dark pragmatic"
    >
        <YourApp />
    </BobThemeProvider>
);

BobVariantSelector

A compact two-dropdown selector for users to pick their preferred variant at runtime. Place it in a header or toolbar:

import { BobVariantSelector } from '@qiiqa/bob-ui-react';

function Header() {
    return (
        <header>
            <h1>My App</h1>
            <BobVariantSelector />
        </header>
    );
}
  • First dropdown → Theme (clean / pragmatic) — the structural style
  • Second dropdown → Variant (moonlit, ocean, etc.) — the color palette

BobThemeSelector

Identical to BobVariantSelector but uses BobBoxSelect for visual consistency with the Bob component system:

import { BobThemeSelector } from '@qiiqa/bob-ui-react';
<BobThemeSelector />

BobVariantDesigner

A full design panel for users/admins to live-edit CSS color variables and save named custom variants:

import { BobVariantDesigner, BobDialogBase } from '@qiiqa/bob-ui-react';
import { useState } from 'react';

const [open, setOpen] = useState(false);

<BobDialogBase id="variant-designer" isOpen={open} onClose={() => setOpen(false)}>
    {open && <BobVariantDesigner onClose={() => setOpen(false)} />}
</BobDialogBase>

useBobTheme

Hook to read or control the current selection:

import { useBobTheme } from '@qiiqa/bob-ui-react';

const { currentTheme, setTheme, isAuto, setAuto } = useBobTheme();
// currentTheme: e.g. 'moonlit clean'

Built-in Variants

| Variant name | Mood | CSS file | |---|---|---| | moonlit | Dark blue | theme-moonlit.css | | ocean | Deep navy | theme-ocean.css | | dark | Pure dark | theme-dark.css | | green | Dark green | theme-green.css | | light | Light | theme-light.css |

Each can be combined with clean or pragmatic in the themes array.


See apps/bob-ui-demo for live visual verification of all themes and variants.