A lightweight, responsive component for combining text and media content with various layout options.
npm install text-mediaA lightweight, responsive component for combining text and media content with various layout options.
- Responsive design
- Multiple layout options
- Support for images and videos
- Customizable themes
- Lightweight (2.5KB gzipped)
- No dependencies
- React version available
``bash`
npm install text-media
` Your content goes here.html`
Your Title

The component is also available as a React component. You can use it in your React applications:
`jsx
import { TextMedia } from 'text-media-react';
function MyComponent() { Your content goes here.
return (
Your Title

);
}
`
Check out the live demo at https://example.com/demo
A React version of the demo is available in the demo directory. To run it:
1. Start a local server:
`bash`
python3 -m http.server 8000
2. Open http://localhost:8000/demo/react-demo.html
The React demo showcases:
- Component integration with React
- Responsive layout
- Image handling
- Custom styling
- text-media--reverse: Reverses the order of text and mediatext-media--stack
- : Stacks text and media verticallytext-media--center
- : Centers content vertically
- text-media--light: Light themetext-media--dark
- : Dark themetext-media--purple-background
- : Purple background theme
1. Clone the repository
2. Install dependencies: npm installnpm test
3. Run tests: npm run build`
4. Build:
MIT