Skip to content
Theme color
Gray color
AppearanceSizeSmall(1)Medium(2)Large(3)Radius
none
small
medium
large
full
Scale90%95%100%105%110%

自定义主题色

Accent:
Gray:
Backgrounds
Interactive components
Borders and separators
Solid colors
Accessible text
123456789101112
使用说明

得益于@radix-ui/colors的优秀色彩设计,我们可以基于某个颜色去生成一系列的颜色:

  • 若应用只需某个固定的颜色,那么我们预先挑选颜色并引入生成的样式,从而避免引入所有的颜色,大幅度减少样式体积
  • 若需要用户动态自定义颜色,则需引入import { importCustomDynamicColors } from '@lun-web/theme/custom' 这会引入全部颜色(约 29kB gzip)加上colorjs运行时(约 23kB gzip)。引入后主题属性中的colorgrayColor将可以直接设置为用户选择的颜色,而不仅限于原先的关键字。该功能高度实验性,有待完善,背景色的自定义还未确定
Submit
SoftSurfaceOutlineSoftSurfaceOutline
CancelSubmit
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista probare, quae sunt a te dicta? Refert tamen, quo modo.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista probare, quae sunt a te dicta? Refert tamen, quo modo.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista probare, quae sunt a te dicta? Refert tamen, quo modo.