Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Budget Allocation Onboarding Block for Vue

A setup panel that splits an editable monthly total across four categories with linked sliders that stop at what is unassigned, and a share bar with percents that add to 100.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

Split a monthly budget at the start, with this budgets step for Vue with Ark UI. It is a setup panel of Pursemoor, a freelancer finance app: a compact header over one framed panel in four bands. A toolbar holds the monthly total (Number Input, $10,000 to start) and Share evenly. Four cells on shared hairlines each hold a Slider (Infrastructure, Marketing, Tools and Team) that stops when nothing more is unassigned, so the four can never add up to more than the total. A share bar splits the total by largest remainder, so the percents always add to 100, with the unassigned part hatched beside a sliding figure. The one Shine Button is Set budgets, which waits until every dollar is assigned.

FAQ

How are the sliders linked?

Each slider runs from $0 to the total, in $50 steps, but a thumb can't pass what is unassigned: pushing it further leaves it where it stopped. To give one category more, lower another first. The figure beside the bar always says how much is still unassigned.

What happens when I change the total?

A new total takes effect as you type, as long as it is a whole amount up to $1,000,000 and not below what the categories already add up to; otherwise the old total stays and a sentence under the box says why. The sliders' range, the share bar and the percents all follow the total.

Why do the percents always add to 100?

They are worked out by largest remainder: every share is rounded down, and the leftover points go to the shares with the biggest fractions. The unassigned part counts as a share too, so a half-assigned budget still adds to 100.

What stays local in the demo, and how do I wire it?

Everything: Set budgets says "Saved in this demo." and nothing leaves the page. In your app send total and budgets from confirm once nothing is unassigned, and load saved amounts into START. The four categories are typed in CATEGORIES.

How does the total box behave?

It takes whole numbers only, with no limit enforced as you type. The sliders' range follows as you type. Arabic-Indic digits typed on a right-to-left page are read as ordinary digits.

How does it look on a phone?

The four cells stack in one column with full-width sliders, the share list wraps in two columns under the bar, and Set budgets pins to the bottom of the screen with its status line.