Skip to content

Laravel Theme Controller Component

Free · MIT

Light, dark, or whatever the operating system says — with system as a real third state.

A Theme Controller built for the TALL stack — Blade, Livewire 3 & 4, Alpine.js and Tailwind CSS 4. Server-rendered by default and dark-mode ready. Aura's solid-background and border colours are contrast-tested against WCAG 2.1 AA/UI in CI, in both themes — see what's covered. Drop it in with a single Blade tag: <x-aura::theme-controller>

Installation

composer require bluestarsystem/aura-ui

Usage

<x-aura::theme-controller />

See the full API, props and live examples in the Theme Controller documentation.

Overview

<x-aura::theme-controller> switches the theme and remembers the choice.

System is a real third state, not the absence of a choice. Someone who has never touched the control should follow their operating system; someone who chose light should stay on light when the OS flips at sunset. Two buttons cannot express that, which is why this is a three-way radio group.

Props

Prop Type Default Description
label string|null null Names the group. Defaults to the translated "Theme".
storageKey string 'aura-theme' The localStorage key.

See more examples and every variant in the Theme Controller documentation.

Laravel-native
No JavaScript framework. Pure Blade, Livewire & Alpine.
Dark mode & themeable
Tailwind 4 CSS variables and a visual Theme Studio.
Accessible
Colour contrast tested against WCAG 2.1 AA/UI in CI; ARIA attributes on select components.