Questions
@sushindustries/uiThe questions a page expects to be asked, written beside the prose that provokes them and answerable in place.
Examples are the tab where the component is shown doing a job, not demonstrating a prop. The API tab already lists the props.
tanstacktanstack add https://adamjurek.com/r/tanstack/questions.jsonpnpm dlx shadcn@latest add https://adamjurek.com/r/shadcn/questions.jsonPress Compare. The frames are real viewports, so a layout that breaks at 320 breaks here too rather than in somebody's hands.
In a page
import { Questions } from "@sushindustries/ui";
import { useAssistant } from "../hooks/use-assistant";
export function DocsFooter() {
const { ask } = useAssistant();
return (
<footer className="container mt-12">
<Questions
heading="Try asking"
questions={[
"What does renderLink do?",
"How do I add a package to the registry?",
]}
onAsk={ask}
/>
</footer>
);
}tsx
What this example is not
Wired to a real assistant. useAssistant here stands in for whatever puts a
question in front of one - this component only calls onAsk, it never
answers anything itself.