diff --git a/app/javascript/controllers/transaction_type_tabs_controller.js b/app/javascript/controllers/transaction_type_tabs_controller.js
new file mode 100644
index 000000000..e347121de
--- /dev/null
+++ b/app/javascript/controllers/transaction_type_tabs_controller.js
@@ -0,0 +1,21 @@
+import { Controller } from "@hotwired/stimulus"
+
+const ACTIVE_CLASSES = ["bg-container", "text-primary", "shadow-sm"]
+const INACTIVE_CLASSES = ["hover:bg-container", "text-subdued", "hover:text-primary", "hover:shadow-sm"]
+
+export default class extends Controller {
+ static targets = ["tab", "natureField"]
+
+ selectTab(event) {
+ event.preventDefault()
+
+ const selectedTab = event.currentTarget
+ this.natureFieldTarget.value = selectedTab.dataset.nature
+
+ this.tabTargets.forEach(tab => {
+ const isActive = tab === selectedTab
+ tab.classList.remove(...(isActive ? INACTIVE_CLASSES : ACTIVE_CLASSES))
+ tab.classList.add(...(isActive ? ACTIVE_CLASSES : INACTIVE_CLASSES))
+ })
+ }
+}
diff --git a/app/views/shared/_transaction_type_tabs.html.erb b/app/views/shared/_transaction_type_tabs.html.erb
index 720960871..dbb1f6b55 100644
--- a/app/views/shared/_transaction_type_tabs.html.erb
+++ b/app/views/shared/_transaction_type_tabs.html.erb
@@ -2,7 +2,7 @@