⚠️ Still in β. Lightモードで御覧ください。
Docs
Props
CSS Props

All Proips

Lismコンポーネントで受け取れる 主要な Lism Proips について紹介します。

Colors

PropCSS PropertyToken,Utility
ccolorCOLOR,
"base","pale", "opposite"
bgcbackground-colorCOLOR,
"base", "pale", "opposite"
bdcborder-colorCOLOR,
"base"
keycolor--keycolorCOLOR

bdcbdとの併用が必要です。

Typography

PropCSS PropertyTokenUtilityBP
fzfont-sizeFONT_SIZE
lhline-heightLINE_HEIGHT-
fffont-family"base","mono","emoji"-
ltsletter-spacingLETTER_SPACING-
tatext-align-"c","l","r"-
whswhite-space-"nw"-

Width & Height

PropCSS PropertyTokenUtilityBP
wwidthSIZE25,50,75,100,fit
hheightSIZE25,50,75,100,fit
maxWmax-widthSIZE100-
maxHmax-heightSIZE100-
minWmin-width-
minHmin-height-

SIZE:contentsize= s,m,l?

Bg

PropCSS PropertyTokenUtilityBP
bg"grid", "stripe", "glass"-
bg.image-
bg.color-
bg.size-
bg.position-
gradient-

Margin and padding

PropCSS PropertyTokenUtilityBP
ppaddingSPACE○, "box", "box:s", "box:l"
plpadding-leftSPACE-
prpadding-rightSPACE-
ptpadding-topSPACE-
pbpadding-bottomSPACE-
pxpadding-left, padding-rightSPACE
pypadding-top, padding-bottomSPACE
pispadding-inline-startSPACE-
pbspadding-block-startSPACE-
mmarginSPACE"auto"
mlmargin-leftSPACE"auto"
mrmargin-rightSPACE"auto"
mtmargin-topSPACE"auto"
mbmargin-bottomSPACE"auto"
mxmargin-left, margin-rightSPACE"auto"
mymargin-top, margin-bottomSPACE"auto"
mismargin-inline-startSPACE○, "auto"
mbsmargin-block-startSPACE○, "auto"

Utility Class:

  • paddings
    • -[p|px|py]:[0|5|10|15|20|30|40|50]
    • -p:box, -p:box:[s|l]
  • margins
    • -[mis|mbs]:[0|5|10|15|20|30|40|50]
    • -[m|ml|mr|mt|mb|my|mx|mis|mbs]:auto

全てBP対応?

論理プロパティは pis, pbs だけでいいかどうかは要検討.

  • inline-start, block-start だけでいいか。end方向はX,Yとstartの併用で擬似的に指定できる。
  • px,pyをinline,blockとしてもいいかもしれない。
Examples
<Box m={40}>...</Box>
<Box pb='20px'>...</Box>
<Box mx='auto'>...</Box>
<Box p='box' py={[null, 50]}>...</Box>
<Text px={[20, 30]}>...</Text>
各方向の値をp,mに対してオブジェクトで指定することも可能
<Box m={{ml:20, mb: 30}}>...</Box>
<Box p={{x:30, y: 40}}>...</Box>

オブジェクト指定は x,y,top,right,bottom,left にのみ対応しています。

Grid & Flex

grid

PropCSS PropertyTokenUtilityBP
grid.templategrid-template
grid.areasgrid-template-areas
grid.columnsgrid-template-columns
grid.rowsgrid-template-rows
gridItem.areagrid-area
gridItem.columngrid-column
gridItem.rowgrid-row

※: -gta:ltrクラスは[dir='rtl']時に方向が反転するようになっており、rtl言語でも方向を揃えることができます。

flex

PropCSS PropertyTokenUtilityBP
flex.wrapflex-wrap"w", "nw"
flex.directionflex-direction"c", "cr", "r", "rr"
flexItem.shrinkflex-shrink"0", "1"
flexItem.growflex-grow"0", "1"
flexItem.basisflex-basis
flex※1flex-
  • ※1 : flexを文字列で指定すると普通にflexとしてスタイルに出力されます。

gap

PropCSS PropertyTokenUtilityBP
[flex|grid].gapgapSPACE
[flex|grid]rowgrow-gapSPACE---
[flex|grid]clmgcolumn-gapSPACE---

Utility Class:

  • -gap:[0|5|10|15|20|30|40|50]
Examples
<Flex gap={40}>...</Flex>
<Grid gap="1rem">...</Grid>
<Columns rowg={[15, 20]} clmg={[20, 30]}>...</Columns>

places

PropCSS PropertyTokenUtilityBP
[flex|grid].aialign-items"c", "s", "e", "str"-
[flex|grid].acalign-content"c", "s", "e", "str"-
[flex|grid].jijustify-items"c", "s", "e", "str"-
[flex|grid].jcjustify-content"c", "s", "e", "str"-
[flex|grid]Item.alignSelfalign-self--
[flex|grid]Item.justifySelfjustify-self--
[flex|grid]Item.placeSelfplace-self--
[flex|grid]Item.orderorder"-1", "0", "1"-
  • c: center
  • s: start
  • e: end
  • str: stretch

Others

PropCSS PropertyToken,Utility
ddisplay"none","block","flex","grid","inline","inline-block","inline-flex","inline-grid"
bxsh, shadowbox-shadowSHADOW
bdrs, radiusborder-radiusRADIUS
aspectaspect-ratio
opacity(op?)opacity
translatetranslate
rotaterotate
scalescale
transformOrigintransformOrigin
toptop
leftleft
rightright
bottombottom
insetinset
zz-index
posposition
lislistStyle"none"
ovwoverflowWrap"anywhere"
ovoverflow"hidden","auto","clip","scroll"?
ovxoverflow-x"hidden","auto","clip","scroll"?
ovyoverflow-y"hidden","auto","clip","scroll"?