# Log If you have some logs to show, use log. Due to package size, Naive UI doesn't include highlight.js. If you want highlight logs, make sure you have set highlightjs before using it. In highlight demo, we defined a language called `naive-log` which will highlight all the numbers of line. The following code shows how we defined it. If you want to know more about highlight.js, see highlight.js and highlight.js developer documentation ```html ``` ## Demos ```demo size.vue event.vue scroll.vue highlight.vue loading.vue auto-bottom.vue ``` ## API ### Log Props | Name | Type | Default | Description | Version | | --- | --- | --- | --- | --- | | font-size | `number` | `14` | Font size. | | hljs | `Object` | `undefined` | If you want to set `hljs` locally, pass it using this prop. | | language | `string` | `undefined` | The language of the log in `highlightjs`. | | line-height | `number` | `1.25` | Line height. | | lines | `Array` | `undefined` | Display the log content by line. When the `log` parameter exists at the same time, the parameter is invalid. | | loading | `boolean` | `false` | Whether to show loading. | | log | `string` | `undefined` | The content of the log. | | rows | `number` | `15` | Log size. | | spin-props | `{ strokeWidth?: number, stroke?: string, scale?: number, radius?: number }` | `undefined` | Loading icon properties. | 2.44.0 | | trim | `boolean` | `false` | Whether to display the log after `trim`. | | on-require-more | `(from: 'top' \| 'bottom') => void` | `undefined` | Callback function for scroll loading log. | | on-reach-top | `() => void` | `undefined` | Scroll to the top callback function. | | on-reach-bottom | `() => void` | `undefined` | Scroll to the bottom callback function. | ### Log Methods | Name | Parameters | Description | | --- | --- | --- | | scrollTo | `(options: { top?: number, position?: 'top' \| 'bottom', silent?: boolean })` | Callback function for scroll event. |