@astropub/icons

中文文档
0.2.0发布于 2021/11/24MITES Module零依赖近 30 天下载 3527

Astro 的 Radix 图标

中文使用文档
文档目录4 节
  1. 使用量
  2. 道具类型
  3. 图标
  4. 许可证

Radix Icons

Astro 的 Radix 图标

Radix 图标是一套由 15x15 图标组成的简洁集, 由 莫杜尔兹 团队.

npm install @astropub/icons

使用量

所有图标都可以从一个单导入得到,只有被使用的图标才会被添加到页面中.

---
import * as Icon from '@astropub/icons'
---
<Icon.Sun />
<Icon.Moon />
<Icon.Star />
<Icon.LightningBolt size="60" fill="gold" />

这些图标也可作为单项进口品提供.

---
import SunIcon from '@astropub/icons/Sun'
import MoonIcon from '@astropub/icons/MoonIcon'
import StarIcon from '@astropub/icons/StarIcon'
import LightningBoltIcon from '@astropub/icons/LightningBolt'
---
<SunIcon />
<MoonIcon />
<StarIcon />
<LightningBoltIcon size="60" fill="gold" />

道具类型

以下内容: Props 每个图标都可以使用接口:

export interface Props {
  'fill'?: string;
  'fill-opacity'?: number | string;
  'fill-rule'?: "nonzero" | "evenodd" | "inherit";
  'height'?: number | string;
  'size'?: number | string;
  'stroke'?: string;
  'stroke-dasharray'?: string | number;
  'stroke-dashoffset'?: string | number;
  'stroke-linecap'?: "butt" | "round" | "square" | "inherit";
  'stroke-linejoin'?: "miter" | "round" | "bevel" | "inherit";
  'stroke-miterlimit'?: number | string;
  'stroke-opacity'?: number | string;
  'stroke-width'?: number | string;
  'viewBox'?: string;
  'width'?: number | string;
}
  • 这个 Props 界面还包括:
    • 所有 HTML 全局属性.
    • 所有WAI-ARIA属性和WAI-ARIA角色属性.
  • 这个 title 属性转换为 a <title> 元素在 <svg>。 。 。 .
  • 这个 size 属性转换等值 1.5x 输入 1.5em。 。 。 .
  • 这个 size 属性用作默认值 width 财务报告和审定财务报表 height。 。 。 .

图标

本包中包含有297个图标.

图标导入预览
活动日志@astropub/icons/ActivityLogActivity Log
对齐基线@astropub/icons/AlignBaselineAlign Baseline
对齐下方@astropub/icons/AlignBottomAlign Bottom
水平对齐中心@astropub/icons/AlignCenterHorizontallyAlign Center Horizontally
垂直对齐中心@astropub/icons/AlignCenterVerticallyAlign Center Vertically
向左对齐@astropub/icons/AlignLeftAlign Left
右对齐@astropub/icons/AlignRightAlign Right
上对齐@astropub/icons/AlignTopAlign Top
方块@astropub/icons/AllSidesAll Sides
角度@astropub/icons/AngleAngle
存档@astropub/icons/ArchiveArchive
左下箭头@astropub/icons/ArrowBottomLeftArrow Bottom Left
右下箭头@astropub/icons/ArrowBottomRightArrow Bottom Right
向下箭头@astropub/icons/ArrowDownArrow Down
向左箭头@astropub/icons/ArrowLeftArrow Left
右箭头@astropub/icons/ArrowRightArrow Right
左上箭头@astropub/icons/ArrowTopLeftArrow Top Left
右上箭头@astropub/icons/ArrowTopRightArrow Top Right
向上箭头@astropub/icons/ArrowUpArrow Up
外观比率@astropub/icons/AspectRatioAspect Ratio
有远见@astropub/icons/AvatarAvatar
后包装@astropub/icons/BackpackBackpack
徽标@astropub/icons/BadgeBadge
条形图@astropub/icons/BarChartBar Chart
铃声@astropub/icons/BellBell
混合模式@astropub/icons/BlendingModeBlending Mode
书签@astropub/icons/BookmarkBookmark
全部边框@astropub/icons/BorderAllBorder All
下边框@astropub/icons/BorderBottomBorder Bottom
边框已关闭@astropub/icons/BorderDashedBorder Dashed
边框点@astropub/icons/BorderDottedBorder Dotted
左边框@astropub/icons/BorderLeftBorder Left
无边框@astropub/icons/BorderNoneBorder None
右边框@astropub/icons/BorderRightBorder Right
边界固态@astropub/icons/BorderSolidBorder Solid
边框分割@astropub/icons/BorderSplitBorder Split
边框样式@astropub/icons/BorderStyleBorder Style
顶端边框@astropub/icons/BorderTopBorder Top
框型号@astropub/icons/BoxModelBox Model
方框@astropub/icons/BoxBox
按钮@astropub/icons/ButtonButton
日历@astropub/icons/CalendarCalendar
相机@astropub/icons/CameraCamera
纸牌堆栈减号@astropub/icons/CardStackMinusCard Stack Minus
卡片叠加@astropub/icons/CardStackPlusCard Stack Plus
纸牌堆栈@astropub/icons/CardStackCard Stack
下盖@astropub/icons/CaretDownCaret Down
左护身符@astropub/icons/CaretLeftCaret Left
盖子右@astropub/icons/CaretRightCaret Right
点排序@astropub/icons/CaretSortCaret Sort
上盖@astropub/icons/CaretUpCaret Up
聊天泡泡@astropub/icons/ChatBubbleChat Bubble
检查圆形@astropub/icons/CheckCircledCheck Circled
检查@astropub/icons/CheckCheck
复选框@astropub/icons/CheckboxCheckbox
雪佛龙向下@astropub/icons/ChevronDownChevron Down
左侧雪佛龙@astropub/icons/ChevronLeftChevron Left
雪佛龙右@astropub/icons/ChevronRightChevron Right
雪佛龙上方@astropub/icons/ChevronUpChevron Up
圆向后斜@astropub/icons/CircleBackslashCircle Backslash
圆形@astropub/icons/CircleCircle
剪贴板复制@astropub/icons/ClipboardCopyClipboard Copy
剪贴板@astropub/icons/ClipboardClipboard
时钟@astropub/icons/ClockClock
代码@astropub/icons/CodeCode
代码框日志@astropub/icons/CodeSandboxLogoCodeSandbox Logo
列间距@astropub/icons/ColumnSpacingColumn Spacing
列数@astropub/icons/ColumnsColumns
提交@astropub/icons/CommitCommit
构成部分1@astropub/icons/Component1Component 1
构成部分2@astropub/icons/Component2Component 2
组件布尔@astropub/icons/ComponentBooleanComponent Boolean
组件实例@astropub/icons/ComponentInstanceComponent Instance
构成部分 无@astropub/icons/ComponentNoneComponent None
占位符组件@astropub/icons/ComponentPlaceholderComponent Placeholder
集装箱@astropub/icons/ContainerContainer
饼干@astropub/icons/CookieCookie
复制@astropub/icons/CopyCopy
左下角处@astropub/icons/CornerBottomLeftCorner Bottom Left
右下角处@astropub/icons/CornerBottomRightCorner Bottom Right
左上角处@astropub/icons/CornerTopLeftCorner Top Left
右上角处@astropub/icons/CornerTopRightCorner Top Right
转角@astropub/icons/CornersCorners
倒计时器@astropub/icons/CountdownTimerCountdown Timer
逆时针@astropub/icons/CounterClockwiseClockCounter Clockwise Clock
作物@astropub/icons/CropCrop
交叉 1@astropub/icons/Cross1Cross 1
交叉 2@astropub/icons/Cross2Cross 2
十字圆形@astropub/icons/CrossCircledCross Circled
十字花纹1@astropub/icons/Crosshair1Crosshair 1
十字花纹2@astropub/icons/Crosshair2Crosshair 2
剪纸@astropub/icons/CrumpledPaperCrumpled Paper
立方体@astropub/icons/CubeCube
光标箭头@astropub/icons/CursorArrowCursor Arrow
光标文字@astropub/icons/CursorTextCursor Text
达西@astropub/icons/DashDash
盘子@astropub/icons/DashboardDashboard
尺寸@astropub/icons/DimensionsDimensions
盘片@astropub/icons/DiscDisc
水平分割符@astropub/icons/DividerHorizontalDivider Horizontal
垂直分割符@astropub/icons/DividerVerticalDivider Vertical
已填充点@astropub/icons/DotFilledDot Filled
点@astropub/icons/DotDot
水平点@astropub/icons/DotsHorizontalDots Horizontal
垂直点@astropub/icons/DotsVerticalDots Vertical
向下双箭头@astropub/icons/DoubleArrowDownDouble Arrow Down
左双箭头@astropub/icons/DoubleArrowLeftDouble Arrow Left
右双箭头@astropub/icons/DoubleArrowRightDouble Arrow Right
双箭头向上@astropub/icons/DoubleArrowUpDouble Arrow Up
下载@astropub/icons/DownloadDownload
拖动处理点 1@astropub/icons/DragHandleDots1Drag Handle Dots 1
拖动处理点 2@astropub/icons/DragHandleDots2Drag Handle Dots 2
水平拖动处理@astropub/icons/DragHandleHorizontalDrag Handle Horizontal
垂直拖动处理@astropub/icons/DragHandleVerticalDrag Handle Vertical
绘图已填充@astropub/icons/DrawingPinFilledDrawing Pin Filled
绘图平线@astropub/icons/DrawingPinDrawing Pin
下拉菜单@astropub/icons/DropdownMenuDropdown Menu
输入全屏@astropub/icons/EnterFullScreenEnter Full Screen
输入@astropub/icons/EnterEnter
信封已关闭@astropub/icons/EnvelopeClosedEnvelope Closed
信封打开@astropub/icons/EnvelopeOpenEnvelope Open
感叹三角@astropub/icons/ExclamationTriangleExclamation Triangle
退出全屏幕@astropub/icons/ExitFullScreenExit Full Screen
退出@astropub/icons/ExitExit
外部链接@astropub/icons/ExternalLinkExternal Link
闭眼@astropub/icons/EyeClosedEye Closed
无眼@astropub/icons/EyeNoneEye None
打开眼睛@astropub/icons/EyeOpenEye Open
脸@astropub/icons/FaceFace
Figma 日志@astropub/icons/FigmaLogoFigma Logo
文件减号@astropub/icons/FileMinusFile Minus
文件加号@astropub/icons/FilePlusFile Plus
文件文本@astropub/icons/FileTextFile Text
文件@astropub/icons/FileFile
字体粗体@astropub/icons/FontBoldFont Bold
字体家族@astropub/icons/FontFamilyFont Family
字体斜体@astropub/icons/FontItalicFont Italic
字体罗马@astropub/icons/FontRomanFont Roman
字体大小@astropub/icons/FontSizeFont Size
字体样式@astropub/icons/FontStyleFont Style
框架@astropub/icons/FrameFrame
框架标记@astropub/icons/FramerLogoFramer Logo
齿轮@astropub/icons/GearGear
GitHub 日志@astropub/icons/GitHubLogoGitHub Logo
环球@astropub/icons/GlobeGlobe
网格@astropub/icons/GridGrid
组@astropub/icons/GroupGroup
半个 1@astropub/icons/Half1Half 1
半数 2@astropub/icons/Half2Half 2
汉堡菜单@astropub/icons/HamburgerMenuHamburger Menu
手@astropub/icons/HandHand
标题@astropub/icons/HeadingHeading
高度@astropub/icons/HeightHeight
内容@astropub/icons/HomeHome
图标Jar 日志@astropub/icons/IconJarLogoIconJar Logo
身份证@astropub/icons/IdCardId Card
图像@astropub/icons/ImageImage
信息圆形@astropub/icons/InfoCircledInfo Circled
投入@astropub/icons/InputInput
Lap 计时器@astropub/icons/LapTimerLap Timer
层@astropub/icons/LayersLayers
版式@astropub/icons/LayoutLayout
信件大小写@astropub/icons/LetterCaseCapitalizeLetter Case Capitalize
信件大小写@astropub/icons/LetterCaseLowercaseLetter Case Lowercase
信件大小写切换@astropub/icons/LetterCaseToggleLetter Case Toggle
字母大小写@astropub/icons/LetterCaseUppercaseLetter Case Uppercase
字母间距@astropub/icons/LetterSpacingLetter Spacing
闪电波尔特@astropub/icons/LightningBoltLightning Bolt
线高@astropub/icons/LineHeightLine Height
链接 1@astropub/icons/Link1Link 1
链接2@astropub/icons/Link2Link 2
链接断开 1@astropub/icons/LinkBreak1Link Break 1
链接断开 2@astropub/icons/LinkBreak2Link Break 2
链接无 1@astropub/icons/LinkNone1Link None 1
链接无 2@astropub/icons/LinkNone2Link None 2
列表项目符号@astropub/icons/ListBulletList Bullet
锁定关闭@astropub/icons/LockClosedLock Closed
锁定打开 1@astropub/icons/LockOpen1Lock Open 1
锁定打开 2@astropub/icons/LockOpen2Lock Open 2
循环@astropub/icons/LoopLoop
魔杖@astropub/icons/MagicWandMagic Wand
放大镜@astropub/icons/MagnifyingGlassMagnifying Glass
边距@astropub/icons/MarginMargin
关闭遮罩@astropub/icons/MaskOffMask Off
遮盖打开@astropub/icons/MaskOnMask On
减圆@astropub/icons/MinusCircledMinus Circled
减数@astropub/icons/MinusMinus
混合@astropub/icons/MixMix
水平混合器@astropub/icons/MixerHorizontalMixer Horizontal
垂直混合器@astropub/icons/MixerVerticalMixer Vertical
Modulz 日志@astropub/icons/ModulzLogoModulz Logo
月亮@astropub/icons/MoonMoon
移动@astropub/icons/MoveMove
名称日志@astropub/icons/NotionLogoNotion Logo
不透明度@astropub/icons/OpacityOpacity
超线@astropub/icons/OverlineOverline
铺垫@astropub/icons/PaddingPadding
纸张平面@astropub/icons/PaperPlanePaper Plane
暂停@astropub/icons/PausePause
笔会 1@astropub/icons/Pencil1Pencil 1
笔会2@astropub/icons/Pencil2Pencil 2
个人@astropub/icons/PersonPerson
派图@astropub/icons/PieChartPie Chart
皮尔克罗@astropub/icons/PilcrowPilcrow
平底线@astropub/icons/PinBottomPin Bottom
左键@astropub/icons/PinLeftPin Left
右键@astropub/icons/PinRightPin Right
平顶@astropub/icons/PinTopPin Top
播放@astropub/icons/PlayPlay
加圆形@astropub/icons/PlusCircledPlus Circled
加号@astropub/icons/PlusPlus
问题 Mark 圆形@astropub/icons/QuestionMarkCircledQuestion Mark Circled
问号@astropub/icons/QuestionMarkQuestion Mark
引用@astropub/icons/QuoteQuote
无线电按钮@astropub/icons/RadiobuttonRadiobutton
阅读器@astropub/icons/ReaderReader
重新装入@astropub/icons/ReloadReload
重设@astropub/icons/ResetReset
继续@astropub/icons/ResumeResume
火箭@astropub/icons/RocketRocket
逆时针旋转@astropub/icons/RotateCounterClockwiseRotate Counter Clockwise
行间距@astropub/icons/RowSpacingRow Spacing
行数@astropub/icons/RowsRows
水平标尺@astropub/icons/RulerHorizontalRuler Horizontal
标尺平方@astropub/icons/RulerSquareRuler Square
节次@astropub/icons/SectionSection
缝制已填充@astropub/icons/SewingPinFilledSewing Pin Filled
缝制平@astropub/icons/SewingPinSewing Pin
阴影内部@astropub/icons/ShadowInnerShadow Inner
阴影无@astropub/icons/ShadowNoneShadow None
阴影外出@astropub/icons/ShadowOuterShadow Outer
阴影@astropub/icons/ShadowShadow
份额 1@astropub/icons/Share1Share 1
共享 2@astropub/icons/Share2Share 2
摇摆@astropub/icons/ShuffleShuffle
大小@astropub/icons/SizeSize
速记日志@astropub/icons/SketchLogoSketch Logo
斜线@astropub/icons/SlashSlash
幻灯片@astropub/icons/SliderSlider
水平间空格@astropub/icons/SpaceBetweenHorizontallySpace Between Horizontally
垂直间距@astropub/icons/SpaceBetweenVerticallySpace Between Vertically
水平空间均匀@astropub/icons/SpaceEvenlyHorizontallySpace Evenly Horizontally
垂直空间均匀@astropub/icons/SpaceEvenlyVerticallySpace Evenly Vertically
高声@astropub/icons/SpeakerLoudSpeaker Loud
扬声器@astropub/icons/SpeakerModerateSpeaker Moderate
关闭扬声器@astropub/icons/SpeakerOffSpeaker Off
发言人安静@astropub/icons/SpeakerQuietSpeaker Quiet
平方边@astropub/icons/SquareSquare
堆栈@astropub/icons/StackStack
恒星已填满@astropub/icons/StarFilledStar Filled
星号@astropub/icons/StarStar
Stitches 日志@astropub/icons/StitchesLogoStitches Logo
停下来@astropub/icons/StopStop
停止监视@astropub/icons/StopwatchStopwatch
水平延伸@astropub/icons/StretchHorizontallyStretch Horizontally
垂直伸展@astropub/icons/StretchVerticallyStretch Vertically
切换@astropub/icons/StrikethroughStrikethrough
太阳@astropub/icons/SunSun
切换@astropub/icons/SwitchSwitch
符号@astropub/icons/SymbolSymbol
图表@astropub/icons/TableTable
目标@astropub/icons/TargetTarget
文本对齐中心@astropub/icons/TextAlignCenterText Align Center
文本对齐@astropub/icons/TextAlignJustifyText Align Justify
向左对齐文本@astropub/icons/TextAlignLeftText Align Left
文本向右对齐@astropub/icons/TextAlignRightText Align Right
无文本@astropub/icons/TextNoneText None
文本@astropub/icons/TextText
向下箭头@astropub/icons/ThickArrowDownThick Arrow Down
向左斜箭头@astropub/icons/ThickArrowLeftThick Arrow Left
向右斜箭头@astropub/icons/ThickArrowRightThick Arrow Right
向上斜箭头@astropub/icons/ThickArrowUpThick Arrow Up
计时器@astropub/icons/TimerTimer
键@astropub/icons/TokensTokens
音轨下一步@astropub/icons/TrackNextTrack Next
音轨上一个@astropub/icons/TrackPreviousTrack Previous
透明网格@astropub/icons/TransparencyGridTransparency Grid
废物@astropub/icons/TrashTrash
三角向下@astropub/icons/TriangleDownTriangle Down
左三角形@astropub/icons/TriangleLeftTriangle Left
三角形右侧@astropub/icons/TriangleRightTriangle Right
三角向上@astropub/icons/TriangleUpTriangle Up
Twitter 日志@astropub/icons/TwitterLogoTwitter Logo
下划线@astropub/icons/UnderlineUnderline
更新@astropub/icons/UpdateUpdate
上传@astropub/icons/UploadUpload
无值@astropub/icons/ValueNoneValue None
数值@astropub/icons/ValueValue
Vercel 日志@astropub/icons/VercelLogoVercel Logo
视频@astropub/icons/VideoVideo
查看网格@astropub/icons/ViewGridView Grid
水平视图@astropub/icons/ViewHorizontalView Horizontal
无@astropub/icons/ViewNoneView None
垂直视图@astropub/icons/ViewVerticalView Vertical
宽度@astropub/icons/WidthWidth
缩放@astropub/icons/ZoomInZoom In
缩小@astropub/icons/ZoomOutZoom Out

许可证

根据麻省理工学院的许可。 版权所有 2020 年 – 现为 Modulz.

版本与发布记录

@astropub/icons 共发布 3 个版本,首次发布于 2021/11/23;过去 12 个月发布了 0 个版本。

版本发布日期距今
0.2.0latest2021/11/244 年前
0.1.12021/11/234 年前
0.1.02021/11/234 年前

关于 @astropub/icons 的常见问题

@astropub/icons 是什么?

Astro 的 Radix 图标

如何安装 @astropub/icons?

在项目目录运行 npm install @astropub/icons,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:astro(*)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@astropub/icons 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/astropub__icons 是否存在。

@astropub/icons 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@astropub/icons 可以商用吗?

@astropub/icons 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@astropub/icons 的下载量有多少?

根据 npm 官方下载统计,@astropub/icons 在 2026/10/07 – 2026/11/05 这 30 天内被下载 3,527 次,日均约 118 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@astropub/icons 还在维护吗?

最新版本 0.2.0 发布于 2021/11/24(4 年前);至今共发布 3 个版本,其中过去 12 个月发布了 0 个;首次发布于 2021/11/23。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。