shadcn.io is not affiliated with official shadcn/ui
Tutor Chat AI Block for Vue
A maths tutor window that explains three fraction concepts, asks one multiple-choice question for each with Check and up to two counted hints, and tracks progress in dots and a level badge.
Installation
Overview
Teach in small steps and check understanding, with this AI tutor chat for Vue with Ark UI. A hairline frame with a plus mark on each corner holds a window of fixed height for Tutorloft, a maths tutor: the top bar names the topic, Fractions, with "1 of 3 done" and a level Badge, and a row of three dots with the concept names shows where you are. The tutor explains one concept in the log with a Collapsible "Show working", then a quiz card asks one question with four answers. Check says in words whether you are correct and why, a wrong answer can be tried again, Hint shows up to two hints and counts them, and "Next concept" brings the next explanation once you are correct. You can also type to the tutor, which replies from a short script. The composer's Shine Button is the only colored control, and everything moves with CSS only. For learning products, homework helpers and any chat that should check before it moves on.
FAQ
What stays in the page, and how do I make it real?
Everything. The topic, the three concepts, their questions, answers, hints and explanations are typed at the top of the file, and typed messages get one of a few scripted replies. Nothing is sent and no model runs. To make it real, generate or load each concept's content on the server and send check to a service that grades the answer; keep the card as it is.
How does the quiz card work?
Choose one of four answers and press Check. A correct answer shows its reason and locks the card; a wrong one says so and lets you try again. Hint is a button you can press twice, each press adds a line and the card counts "Hints used: 1 of 2". Once you are correct, the "Next concept" button appears in a slot the card already reserved, so nothing moves.
How are the dots and the level worked out?
From the cards: a dot is filled when its question was answered correctly, the current concept has a ring, and the level badge follows the number of correct concepts (Beginner, Steady, Confident). Nothing is typed twice, and each dot also has a hidden word for a screen reader ("done", "now", "next").
Is it usable with a keyboard and a screen reader?
The log is a focusable region announced as a log. The answers are a native radio group with a visible question as its legend, arrow keys move between them, and the result is also written to the status line under the composer. Enter sends typed text while Shift and Enter add a line.