# `jsx()` Addon `jsx()` is a [5th generation](https://github.com/streamich/freestyler/blob/master/docs/en/generations.md#5th-generation) interface for creating styling blocks — components similar to *"styled components"*, but which are more powerful. ```jsx const Button = jsx('button', { display: 'inline-block', borderRadius: '3px', padding: '0.5rem 0', margin: '0.5rem 1rem', width: '11rem', background: 'transparent', color: 'white', border: '2px solid white', }); ``` --- > __Nota Bene__ > > To use this interface you need to provide the hyperscript function `h` of your virtual > DOM library when creating a `nano-css` instance. In case of React, > this is the `createElement` function: > > ```js > import {create} from 'nano-css'; > import {createElement} from 'react'; > > const nano = create({ > h: createElement > }); > ``` --- Optionally, you can name your styling block: ```js const Button = jsx('button', css, 'MyButton'); ``` Styling blocks pass all their props to the underlying element: ```jsx ``` However, some props have special meaning and are not passed through: - `css` — a CSS-like object of dynamic style overrides - `$as` — allows to overwrite the underlying element type - `$ref` — allows to pass a `ref` to the underlying element Add custom styling: ```jsx ``` Overwrite underlying element type: ```jsx // Click me! ``` ## Component as a Type You can pass components as an element type. ```js const Button = jsx(MyComp, css); ``` where ```jsx const MyComp = (props) => { return