button

Basic usage

import {Button} from "tuix-design"
copy
<Button>primary</Button>
<Button variant="secondary">secondary</Button>
<Button variant="success">success</Button>
<Button variant="warning">warning</Button>
<Button variant="danger">danger</Button>
copy

Icon Button

<Button icon={<Icon name="Home" color="#fff" />}>primary</Button>
copy

Size

<Button size="sm" icon={<Icon size={16} name="Home" color="#fff" />}>
  small
</Button>
<Button icon={<Icon name="Home" color="#fff" />}>medium</Button>
<Button size="lg" icon={<Icon name="Home" color="#fff" />}>
  large
</Button>
copy

Disabled

<Button disabled>disable</Button>
copy

Bordered

<Button bordered>bordered</Button>
copy

Rounded

<Button rounded icon={<Icon name="Home" color="#fff" />}></Button>
copy

API

propstypestatusdefaultdescription
variantprimary | secondary | success | warning | dangeroptionalprimaryButton's variant
sizesm | md | lgoptionalmdButton's height
borderedbooleanoptionalfalseButton's border status
desabledbooleanoptionalfalseButton's diable status
roundedbooleanoptionalfalserounded button
iconReactNodeoptionalnullButton's icon
onClick()=>voidoptionalnoneButton's onClick event
basicicon buttonsizedisabledborderedroundedapi