PHPackages                             heureka-agency/switcheroo - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. heureka-agency/switcheroo

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

heureka-agency/switcheroo
=========================

TALL-stack currency switcher for LiveWire.

1.2(1y ago)033MITPHPPHP ^8.2

Since Jul 18Pushed 1y agoCompare

[ Source](https://github.com/heureka-agency/switcheroo)[ Packagist](https://packagist.org/packages/heureka-agency/switcheroo)[ Docs](https://github.com/heureka-agency/switcheroo)[ RSS](/packages/heureka-agency-switcheroo/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (5)Versions (4)Used By (0)

A super simple TALL-stack currency switcher
===========================================

[](#a-super-simple-tall-stack-currency-switcher)

[![Latest Version on Packagist](https://camo.githubusercontent.com/4922e960f3f9585b0eb3fa574f53cbf615fdb6fd6c7e8cf38d18249380ecabd0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f68657572656b612d6167656e63792f73776974636865726f6f2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/heureka-agency/switcheroo)[![Total Downloads](https://camo.githubusercontent.com/7b1e92f56e40a9dc6fd3e2a23da90b904a23a99a70bb68eccfb97e4dff694265/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f68657572656b612d6167656e63792f73776974636865726f6f2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/heureka-agency/switcheroo)

Under the hood, Switcheroo is a single Livewire component with some AlpineJS magic sprinkled on top. The component uses and requires TailwindCss for it's styling, but you're free to change to any other CSS framework or even native CSS if you wish.

This package does not offer any currency conversion features yet.

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

[](#installation)

You can install the package via composer:

```
composer require heureka-agency/switcheroo
```

You will also need to install the `flag-icons` npm package to display currency flags:

```
npm install flag-icons
```

Usage
-----

[](#usage)

### Config

[](#config)

First, publish the Switcheroo config with the following command:

```
php artisan vendor:publish --tag=switcheroo-config
```

```
return [
    /**
     * Add any currencies you would like to handle with Switcheroo.
     * You can select all currencies using \HeurekaAgency\Switcheroo\Enums\Currency::all()
     */
    'enabled_currencies' => [
        \HeurekaAgency\Switcheroo\Enums\Currency::EUR,
        \HeurekaAgency\Switcheroo\Enums\Currency::USD,
        \HeurekaAgency\Switcheroo\Enums\Currency::GBP,
    ],

    /**
     * Set the default currency of the currency switcher.
     */
    'default_currency' => \HeurekaAgency\Switcheroo\Enums\Currency::EUR
];
```

### Including in your app

[](#including-in-your-app)

Make sure to import the Switcheroo CSS in your app.css:

```
@import "../../vendor/heureka-agency/switcheroo/resources/css/switcheroo.css";
```

Then simply include the Switcheroo component wherever you'd like:

```

```

### Events

[](#events)

Switcheroo sends a single Livewire event every time a currency is selected. You can freely access this event from any other Livewire component or even from Javascript.

```
#[On('currency-selected')]
public function yourCurrencySwitchHandler(string $currency): void
{
    $currency = Currency::from($currency);
    // any other business logic
}
```

The selected currency is also stored in local storage using `Alpine.$persist`.

### Views

[](#views)

You're free to publish the Switcheroo views to customize the look and feel of the currency switcher:

```
php artisan vendor:publish --tag=switcheroo-views
```

### Translations

[](#translations)

Switcheroo is multilingual ready! Not that it has any readable strings to translate, but nonetheless, you can publish the language files using:

```
php artisan vendor:publish --tag=switcheroo-translations
```

### Future plans

[](#future-plans)

- create a helper to automatically convert currencies based on the current selection
- add support for language and country selection
- add support for native language display of currencies/languages/countries

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Tristan Thar](https://github.com/heureka-agency)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity54

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

Every ~13 days

Total

3

Last Release

644d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2f06d798a945289807e94c24f587a50acc1ed6712416f947861a5e641361fa79?d=identicon)[heureka-dev](/maintainers/heureka-dev)

---

Top Contributors

[![tristan-thar](https://avatars.githubusercontent.com/u/48388454?v=4)](https://github.com/tristan-thar "tristan-thar (15 commits)")

---

Tags

currencylivewiretailwindalpinealpinejstall-stackheureka-agencyswitcheroo

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/heureka-agency-switcheroo/health.svg)

```
[![Health](https://phpackages.com/badges/heureka-agency-switcheroo/health.svg)](https://phpackages.com/packages/heureka-agency-switcheroo)
```

###  Alternatives

[laravel-frontend-presets/tall

TALL preset for Laravel.

2.6k692.9k1](/packages/laravel-frontend-presets-tall)[livewire/flux

The official UI component library for Livewire.

9475.0M86](/packages/livewire-flux)[bezhansalleh/filament-google-analytics

Google Analytics integration for FilamentPHP

205144.8k5](/packages/bezhansalleh-filament-google-analytics)[tanthammar/livewire-window-size

Laravel blade directives and php helpers for serverside rendered content, based on browser window size WITHOUT css. Requires Livewire and AlpineJS

2321.0k](/packages/tanthammar-livewire-window-size)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

116.6k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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