Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
---
id: button
title: Button
sidebar_label: Button
---
Actually this is a button for Helsinki University new design system. It looks like this:
<hy-button>Click me!</hy-button>
```
<hy-button>Click me!</hy-button>
```
## Use any custom html
<hy-button onclick="window.alert('whaat')" >Try to click me now!</hy-button>
```
<hy-button onclick="window.alert('whaat')">Click me!</hy-button>
```
## Docusaurus can even do this:
```html live
<hy-button onclick="window.alert('whoa')">Try to live edit me</hy-button>
```
<!-- Auto Generated Below -->
## Properties
| Property | Attribute | Description | Type | Default |
| ----------- | ------------ | ----------- | ------------------------------------------------------------------------------ | ------------------------ |
| `icon` | `icon` | | `string` | `undefined` |
| `iconRight` | `icon-right` | | `string` | `undefined` |
| `variant` | `variant` | | `ButtonVariants.default \| ButtonVariants.outline \| ButtonVariants.secondary` | `ButtonVariants.default` |
## Dependencies
### Depends on
- [hy-icon](../icon)
### Graph
```mermaid
graph TD;
hy-button --> hy-icon
style hy-button fill:#f9f,stroke:#333,stroke-width:4px
```
----------------------------------------------
HY component demo