2019-12-20 16:53:59 +08:00
|
|
|
# Typography
|
|
|
|
|
|
|
|
Naive UI provides some basic styling for common HTML tags. It also provides some components to render text better.
|
|
|
|
|
2020-01-27 21:44:31 +08:00
|
|
|
Layout is a kind of art.
|
|
|
|
|
2019-12-20 16:53:59 +08:00
|
|
|
## Demos
|
|
|
|
```demo
|
2019-12-21 21:31:48 +08:00
|
|
|
header
|
|
|
|
tags
|
2019-12-31 17:16:51 +08:00
|
|
|
text
|
|
|
|
```
|
2020-01-27 21:44:31 +08:00
|
|
|
|
|
|
|
## Props
|
2020-02-03 21:48:56 +08:00
|
|
|
|
2020-01-30 21:03:34 +08:00
|
|
|
### Text Props
|
2020-01-27 21:44:31 +08:00
|
|
|
|Name|Type|Default|Description|
|
|
|
|
|-|-|-|-|
|
|
|
|
|type|`'default' \| 'success' \| 'info' \| 'warning' \| 'error'`|`'default'`||
|
|
|
|
|strong|`boolean`|`false`||
|
|
|
|
|italic|`boolean`|`false`||
|
|
|
|
|underline|`boolean`|`false`||
|
|
|
|
|delete|`boolean`|`false`||
|
|
|
|
|code|`boolean`|`false`||
|
2020-02-20 21:42:38 +08:00
|
|
|
|depth|`'primary' \| 'secondary' \| 'tertiary'`|`null`||
|
2020-03-03 17:40:09 +08:00
|
|
|
|as|`string`|`null`|What tag should be this component be rendered as. Won't work when `code` or `del` is set.|
|
2020-02-19 12:35:47 +08:00
|
|
|
|
|
|
|
### P Props
|
|
|
|
|Name|Type|Default|Description|
|
|
|
|
|-|-|-|-|
|
2020-02-20 21:42:38 +08:00
|
|
|
|depth|`'primary' \| 'secondary' \| 'tertiary'`|`null`||
|
2020-02-19 12:35:47 +08:00
|
|
|
|
2020-01-27 21:44:31 +08:00
|
|
|
|
2020-01-30 21:03:34 +08:00
|
|
|
### H1, H2, H3, H4, H5, H6 Props
|
2020-01-27 21:44:31 +08:00
|
|
|
|Name|Type|Default|Description|
|
|
|
|
|-|-|-|-|
|
|
|
|
|align-text|`boolean`|`false`||
|
|
|
|
|type|`'default' \| 'success' \| 'info' \| 'warning' \| 'error'`|`'default'`||
|
|
|
|
|prefix|`'bar'`|`null`||
|
|
|
|
|
2020-01-30 21:03:34 +08:00
|
|
|
### A Props
|
2020-01-27 21:44:31 +08:00
|
|
|
|Name|Type|Default|Description|
|
|
|
|
|-|-|-|-|
|
2020-02-03 21:48:56 +08:00
|
|
|
|to|`string`|`null`|If the prop is set, it will be rendered as a Vue Router router-link component. Make sure you don't want to use href.|
|
2020-01-27 21:44:31 +08:00
|
|
|
|
2020-01-30 21:03:34 +08:00
|
|
|
### Ul, Ol Props
|
2020-01-27 21:44:31 +08:00
|
|
|
|Name|Type|Default|Description|
|
|
|
|
|-|-|-|-|
|
|
|
|
|align-text|`boolean`|`false`||
|
|
|
|
|
2020-01-30 21:03:34 +08:00
|
|
|
### Blockquote Props
|
2020-01-27 21:44:31 +08:00
|
|
|
|Name|Type|Default|Description|
|
|
|
|
|-|-|-|-|
|
2020-02-03 21:48:56 +08:00
|
|
|
|align-text|`boolean`|`false`||
|
|
|
|
|
|
|
|
## Slots
|
|
|
|
### All Typography Components
|
|
|
|
|Name|Parameters|Description|
|
|
|
|
|-|-|-|
|
|
|
|
|default|`()`||
|