Interactive documentation generator for React components with live preview and prop controls.
- 🎯 Interactive Props Control: Modify component props in real-time
- 📝 Live Preview: See changes instantly as you modify props
- 🎨 Built-in Components: Includes Button, Input, Card, and Badge components
- 💎 TypeScript Support: Full TypeScript support with type definitions
- 🎊 Code Highlighting: Syntax highlighting for code examples
npm install autoui-docs
import { DocumentViewer } from 'autoui-docs';
import { YourComponent } from './YourComponent';
// Your component documentation
const componentDoc = {
name: 'YourComponent',
description: 'Description of your component',
props: [
{
name: 'propName',
type: 'string',
required: true,
defaultValue: '',
description: 'Description of the prop'
}
]
};
// Using the DocumentViewer
function App() {
return (
<DocumentViewer component={componentDoc} />
);
}
import { Button } from 'autoui-docs';
<Button
variant="primary"
size="medium"
onClick={() => alert('Clicked!')}
>
Click me
</Button>
import { Input } from 'autoui-docs';
<Input
type="text"
size="medium"
placeholder="Enter text..."
onChange={(e) => console.log(e.target.value)}
/>
import { Card } from 'autoui-docs';
<Card
variant="elevated"
size="medium"
header="Card Title"
footer="Card Footer"
>
Card content goes here
</Card>
import { Badge } from 'autoui-docs';
<Badge
variant="success"
size="medium"
rounded
>
New
</Badge>
Contributions are always welcome! Please read our contributing guide first.
This project is licensed under the MIT License - see the LICENSE file for details.