shadcn.io is not affiliated with official shadcn/ui
Tax Assistant Chat Block for Svelte
An accountant's chat with a Your return pane: income and tax withheld, five deductions each showing what it saves at your top band, tax in three made-up bands and an estimated refund or amount owed.
Installation
Overview
Show an accountant working through a return with a client, with this tax assistant chat for Svelte with Ark UI. A hairline frame with a plus mark on each corner holds a window of fixed height for Ledgerfern, an accountant's chat: the top bar names Petra Ostby and carries a "Not tax advice" badge, the thread is Message and Bubble rows, and a pane at the end, "Your return", holds two Input fields (income and tax withheld), five deductions as Checkbox rows with the saving each makes at your top band, and a list of taxable income, tax in three made-up bands of a fictional Tarnfold and "Estimated refund" or "Estimated owed". Ticking a deduction posts a quiet line in the thread and every figure re-derives. The composer's Shine Button, the only colored control, sends, and the frame is ruled by Guides. For an accounting firm, a payroll tool or any assistant that shows what a choice changes.
FAQ
What stays in the page, and how do I make it real?
Everything. The bands, the deductions and the figures are made up and worked out in the browser; nothing is sent and no model runs. The accountant's answers are a short script keyed on words such as "worked", "most" and "refund". To make it real, replace the bands with your jurisdiction's rules where taxByBand is defined and send messages from post to your own team.
How is the estimate worked out?
Taxable income is your income minus the deductions you tick. taxByBand taxes each slice at its own rate (10, 22 and 32 percent), adds them up in whole cents, and the result is set against what was withheld: more withheld is an estimated refund, less is an amount owed. A deduction saves its amount times the rate of the band your taxable income reaches.
Is this tax advice?
No, and it says so in the top bar, the pane and the replies. The bands belong to a fictional place and the figures are examples. Use a qualified adviser and your own country's rules for a real return.
What happens with an income that isn't a number?
Whole numbers only, with commas allowed. Anything else counts as zero, so the pane shows nothing owed instead of a wrong figure. Ticks, fields and the result stay on the page while you switch between Chat and Your return on a phone.
Is it usable with a keyboard and a screen reader?
Each deduction is one labelled checkbox that also reads its saving, such as "Saves 384 at your top band". The result is a sentence, "Estimated owed 180", and the thread gets a quiet line for every change, which the log announces. Nothing relies on color.