@jswork/react-questkit
v1.0.4
Published
Mobile-first React component library for interactive homework experiences.
Readme
react-questkit
Mobile-first React component library for interactive homework experiences.
installation
pnpm add @jswork/react-questkitusage
import { QuestConfigProvider, SingleChoice } from '@jswork/react-questkit';
import '@jswork/react-questkit/style.css';
export function Question() {
return (
<QuestConfigProvider config={{ sound: false }}>
<SingleChoice
data={{
stem: 'I have ___ apple.',
options: [{ text: 'a' }, { text: 'an' }, { text: 'the' }],
answer: 1,
}}
onSubmit={(result) => console.log(result)}
/>
</QuestConfigProvider>
);
}13 题型、三态矩阵、数据模型与样式定制见 docs/questkit/usage.md。
license
Code released under the MIT license.
