Get started with radium CDN

MIT licensed

Radium is a library for writing composable, reusable, and self-jailing React components.

Tags:
  • react
  • style
  • inline

Stable version

Copied!

How to start using radium CDN


import Radium from 'radium';
import React from 'react';
import ReactDOM from 'react-dom';

const MyComponent = Radium(class MyComponent extends React.Component {
  render() {
    return (
      <div style={[
        Radium.style.display('flex'),
        Radium.style.justifyContent('center'),
        Radium.style.alignItems('center'),
        Radium.style.height('100vh'),
        Radium.style.backgroundColor('#f5f5f5'),
      ]}>
        <h1 style={[Radium.style.fontSize(48), Radium.style.color('blue')]}>
          Hello, Radium!
        </h1>
      </div>
    );
  }
});

ReactDOM.render(<MyComponent />, document.getElementById('root'));
Copied!
Copied!

All versions