Button

Button is an interactive element that users can click to trigger an action.

Import

import { Button } from "css-materials";

Usage

<Button>Button</Button>

Variants

<Button variant='primary'>Primary</Button>
<Button variant='secondary'>Secondary</Button>
<Button variant='danger'>Danger</Button>

Change Size

<Button size='small'>Small</Button>
<Button size='medium'>Medium</Button>
<Button size='large'>Large</Button>

Change Shape

<Button shape='rounded'>Rounded</Button>
<Button shape='pill'>Pill</Button>
<Button shape='circle'>Circle</Button>

Add Icon

<Button variant='secondary' size='small' icon={<FaRocket />}>発射</Button>
<Button variant='danger' icon={<FaDragon />}>咆哮</Button>

Loading Animation

To apply a loading animation, set the loading attribute to true.

<Button loading>Submit</Button>
<Button variant='secondary' loading>Send</Button>
<Button variant='danger' loading>Confirm</Button>