Home Reference Source Repository
public class | source



react-native~Component → Subheader

Subheaders are special list tiles that delineate distinct sections of a list or grid list and are typically related to the current filtering or sorting criteria. Subheader tiles are either displayed inline with tiles or can be associated with content, for example, in an adjacent column.


import {TYPO, COLOR, Subheader } from 'react-native-material-design-components';


<Subheader text="Subheader normal"/>
<Subheader text="Subheader with color" primaryColor={COLOR[`${primary}500`].color}/>
<Subheader text="Subheader normal, inset" inset={true}/>
<Subheader text="Subheader with color, inset" primaryColor={COLOR[`${primary}500`].color}inset={true}/>

Constructor Summary

Public Constructor

Public Constructors

public constructor(props: object) source


props object
props.text string

Subheader text.

props.primaryColor string
  • optional
  • default: 'rgba(0,0,0,.54)'

Primary color of Subheader. Accept a color string such as RGBA,RGB,HEX.

props.inset boolean
  • optional
  • default: false

If true, Subheader is aligned with the text content with 72dp paddingLeft. Often with a left-aligned floating action button.

props.theme enum(THEME_NAME)
  • optional
  • default: 'light'

The theme of Subheader.