Skip to content

Commit 0af1102

Browse files
Create README.md
1 parent 5290c0a commit 0af1102

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
![component-preview-compressed](https://github.com/user-attachments/assets/2f791123-8aa4-4118-b031-a087fcd70ebf)
2+
## React Create HTML Video
3+
A lightweight React component that programmatically generates and plays an HTML `<video>` element with a clean, reusable API. This library does not rely on CSS-in-JS, with styles are intentionally kept minimal. Created with Typescript support.
4+
5+
### 📦 Installation
6+
```console
7+
npm install react-create-html-video
8+
```
9+
10+
### 🎲 Features
11+
1. Built for modern React with support for Typescript
12+
2. A lightweight API surface that is easy to understand
13+
3. Helps render a native HTML `<video>` element on the browser
14+
4. Provides support for MP4 and Webm based Video displays
15+
16+
### 🔤 Example Usage
17+
```javascript
18+
/* node modules */
19+
import { ReactCreateHTMLVideo } from "react-create-html-video";
20+
21+
/* API Signature */
22+
// { mp4: string, webm: string }
23+
24+
/* module */
25+
function UIComponent() {
26+
return (
27+
{/* make sure your parent container is positioned: relative, imagine here min-height of 100vh */}
28+
<div className="heroSection positionRelative">
29+
<ReactCreateHTMLVideo
30+
mp4="/path/to/mp4/video.mp4"
31+
webm="/path/to/webm/video.webm"
32+
/>
33+
</div>
34+
)
35+
}
36+
37+
/* exports */
38+
export default UIComponent;
39+
```
40+
### 📘 Contributing
41+
Contributions, suggestions, and improvements are welcome.<br/>
42+
Feel free to open issues or pull requests.
43+
44+
### ❤️ Support
45+
Like this project? Support it with a github star, it would mean a lot to me! Cheers and Happy Coding.

0 commit comments

Comments
 (0)