Icon

reco_luan2023-01-23

Introduction

vuepress-theme-reco@2.x is used to configure icons through Xiconsopen in new window. Only carbonopen in new window 1 icon is integrated in Xicons, which can almost meet most scenes.

Usage

vuepress-theme-reco@2.x encapsulate it into global component of 'Xicons', which allows users to use them directly in markdown files. Some of the places in themes that allow users to configure icons also use Xicons component, ensuring the same experience.

Used in markdown

If you want to export an star icon in markdown , you can do something like this in markdown:

<xicons icon="Star" />

Props

ParamsDescriptionTypeOptionalDefault
iconIconstringFor example, Star is the name of a specific icon under carbonopen in new window of Xiconsopen in new window-
colorColor of icon and textstring-inherit
iconPositionThe position of icon, this makes sense when both icon and text are setstringtop/bottom/left/rightleft
iconSizeThe size of iconstring-18
textThe content of textstring--
textSizeThe size of textstring-14
linkJump linkstring-javascript:void(0)
targetJump methodstring_self/_blank/_parent/_top_self

Slots

name说明
defaultSpecify the contents of the props.text position to express more complex content
iconReplace with an external icon

Used in configuration

Some of the places in the theme where icons are allowed to be configured, such as home page, are the same as the Props.icon above.

Last Updated 4/24/2024, 7:04:50 PM