# elementor/3.7.0/packages/elementor-ui/components/ui/heading.js

Elementor Website Builder – more than just a page builder, version 3.7.0. 22 lines.

- Page: https://pluginprobe.com/plugins/elementor/3.7.0/code/packages/elementor-ui/components/ui/heading.js
- Raw: https://pluginprobe.com/plugins/elementor/3.7.0/raw/packages/elementor-ui/components/ui/heading.js
- Modified: 2021-11-17T08:27:36+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/elementor/3.7.0/code/packages/elementor-ui/components/ui/heading.js#L10-L20`.

```javascript
import styled from 'styled-components';
import { getStyle } from 'e-utils';
import styles from 'e-styles/heading';

const SharedHeading = styled.h1.attrs( ( props ) => ( { as: props.tag } ) )`${ ( props ) => getStyle( styles, props, 'shared' ) }`;

const Heading = styled( SharedHeading )`${ ( props ) => getStyle( styles, props, 'unique' ) }`;

Heading.propTypes = {
	className: PropTypes.string,
	children: PropTypes.any,
	tag: PropTypes.oneOf( [ 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' ] ),
	variant: PropTypes.oneOf( [ 'display-1', 'display-2', 'display-3', 'display-4', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' ] ).isRequired,
};

Heading.defaultProps = {
	className: '',
	tag: 'h1',
};

export default Heading;

```
