Skip to content

Simple Button

Here is a simple guide on how to use the SButton component, and it’s different props.

Calling the component

This component accepts a children prop of type string, which is the text that will be displayed on the button.

import { SButton } from 'simple-material-ui-library'
<SButton size="small">I'm a button</SButton>
<SButton size="medium">I'm a button</SButton>
<SButton size="large">I'm a button</SButton>

Props

Variants

The default value is outlined

<SButton variant="outlined">outlined</SButton>

Size

The default value is medium

<SButton size="small">Small</SButton>

Background Color

The default value is blue

<SButton variant="contained" >Blue</SButton>

Rounded

The default value is true

<SButton rounded>Rounded</SButton>

Disabled

The default value is false

<SButton disabled>Disabled</SButton>

FontColor

The default value is white

<SButton fontColor="white">White</SButton>

BorderColor

The default value is blue

<SButton borderColor="blue">Blue</SButton>

OnClick Function

<SButton onClick={() => alert("Hello")}>Click Me</SButton>