PHPackages                             smronju/nativephp-appearance - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. smronju/nativephp-appearance

ActiveNativephp-plugin

smronju/nativephp-appearance
============================

Force the app into light or dark mode independent of the system setting, or release it back to following the system automatically.

1.0.0(yesterday)03↑2900%MITPHPPHP ^8.2

Since Aug 16Pushed yesterdayCompare

[ Source](https://github.com/smronju/nativephp-appearance)[ Packagist](https://packagist.org/packages/smronju/nativephp-appearance)[ Docs](https://github.com/smronju/nativephp-appearance)[ RSS](/packages/smronju-nativephp-appearance/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (2)Versions (2)Used By (0)

NativePHP Appearance
====================

[](#nativephp-appearance)

Forces a [NativePHP Mobile](https://nativephp.com) app into light or dark mode independent of the OS setting, or releases it back to following the system automatically.

`bg-theme-*`/`text-theme-*` classes already resolve their dark companion natively based on the OS color scheme — there is no PHP-facing API to override that, only to read it (`Native\Mobile\Facades\System::appearance()`). This plugin adds the missing write side.

Requirements
------------

[](#requirements)

- `nativephp/mobile` ^3.0 or ^4.0
- iOS 15.0+ — fully supported via `UIWindow.overrideUserInterfaceStyle`.
- Android — requires **API 31+** (`UiModeManager.setApplicationNightMode`, the only per-app override Android exposes outside of `AppCompatActivity`). Below API 31, `setMode()` silently no-ops rather than partially applying.

Installation
------------

[](#installation)

```
composer require smronju/nativephp-appearance
php artisan vendor:publish --tag=nativephp-plugins-provider
php artisan native:plugin:register smronju/nativephp-appearance
```

Then rebuild: `php artisan native:run`.

Usage
-----

[](#usage)

```
use Smronju\NativephpAppearance\Facades\NativephpAppearance;

NativephpAppearance::setMode('dark');   // force dark
NativephpAppearance::setMode('light');  // force light
NativephpAppearance::setMode('system'); // follow the OS again
```

Fire-and-forget: there's no event to listen for, and no result to branch on — either the override applies (iOS always; Android on API 31+) or the call is a safe no-op (Android below API 31).

License
-------

[](#license)

MIT

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance100

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/465434?v=4)[Mohammad Shoriful Islam Ronju](/maintainers/smronju)[@smronju](https://github.com/smronju)

---

Top Contributors

[![smronju](https://avatars.githubusercontent.com/u/465434?v=4)](https://github.com/smronju "smronju (1 commits)")

---

Tags

laravelmobilethemenativephpdark-modeappearance

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/smronju-nativephp-appearance/health.svg)

```
[![Health](https://phpackages.com/badges/smronju-nativephp-appearance/health.svg)](https://phpackages.com/packages/smronju-nativephp-appearance)
```

###  Alternatives

[nativephp/mobile-starter

The skeleton application for NativePHP for Mobile.

233.0k](/packages/nativephp-mobile-starter)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
