Scriptō: A beautiful and simple markdown viewer component for React.
npm install @jojovms/scripto.md files instantly.
bash
npm install @jojovms/scripto
`
🚀 Usage
Import the component and the styles in your React application:
`jsx
import React from 'react';
import { Scripto } from '@jojovms/scripto';
import '@jojovms/scripto/dist/style.css'; // Don't forget the styles!
function App() {
return (
{/ Basic Usage /}
{/ Or load a file from a URL /}
${window.location.origin}/docs/walkthrough.md} />
or
);
}
export default App;
`
> Note: The Scripto component is designed to take up the full height of its container. Ensure the parent container has a defined height (e.g., 100vh).
🛠️ Props
| Prop | Type | Description |
|------|------|-------------|
| url | string` | Optional. A direct URL to a Markdown file to load on mount. Supports raw URLs or GitHub blob URLs. |