![A screenshot of the WordPress Gutenberg component "FontSizePicker".](https://wp-gb.com/wp-content/uploads/2021/01/component-FontSizePicker.png)
Used for font sizes. Can be used to set a custom font size or a font size from a list.
<FontSizePicker
fontSizes={[
{
name: __( 'Small' ),
slug: 'small',
size: 12,
},
{
name: __( 'Big' ),
slug: 'big',
size: 26,
},
]}
value={ 26 }
fallbackFontSize={ 12 }
onChange={ ( newFontSize ) => console.log(newFontSize) }
withSlider
/>