Reflex
  • Blocks
    • Header
    • Hero
    • Features
    • Call to action
    • Forms
    • Pricing
    • Team
    • Testimonials
    • Cards
    • Footer
    • Posts
    • Videos
  • Examples
  • Learn
  • Videos
  • Docs
  • Theme

    Theme reference

    • Colors
    • Font family
    • Font size
    • Font weight
    • Line height
    • Box shadow
    Create a theme Extend base
arshadcnv0.5.3
Reflex
Reflex

Theme reference

  • Colors
  • Font family
  • Font size
  • Font weight
  • Line Height
  • Margin
  • Padding
  • Border
  • Border radius
  • Box shadow
  • Grid

Theme reference

The base starter includes a set of pre-defined design tokens that you can use to style your components.

Use style props to theme your components.

<P fontSize="md" />

For responsive styles, separate your values using a pipe: |.

<P fontSize="sm|md|lg|2xl" />

Note: Any props not listed below such as textDecoration or transition or opacity) can use default CSS values.

<P textShadow="underline" />
Create a custom theme Extend base

Colors

color, backgroundColor (bg), borderColor, borderTopColor, borderBottomColor, borderLeftColor, borderRightColor, outlineColor, fill, stroke

Example
<P color="primary" bg="muted" />
text (#191924)
background (#fff)
heading (#07070a)
primary (#06f)
primaryHover (#005ae0)
secondary (#07070a)
secondaryHover (#191924)
accent (#fb3640)
accentHover (#fa0f1b)
muted (#f6f6f6)
mutedHover (#ebebeb)
border (#ebece9)
borderHover (#b9bdb3)

Font family

fontFamily

Example
<P fontFamily="body" />
KeyValue
bodyInter, sans-serif
headingInherit
monospaceSFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace

Font size

fontSize

Example
<H1 fontSize="md" />
KeyValue
xs0.75rem
sm0.875rem
md1rem
lg1.125rem
xl1.25rem
2xl1.5rem
3xl1.875rem
4xl2.25rem
5xl3rem
6xl4rem

Font weight

fontWeight

Example
<H1 fontWeight="semibold" />
KeyValue
hairline100
thin200
light300
normal400
medium500
semibold600
bold700
extrabold800
black900

Line height

lineHeight

Example
<P lineHeight="relaxed" />
KeyValue
3.75rem
41rem
51.25rem
61.5rem
71.75rem
82rem
92.25rem
102.5rem
none1
tight1.25
snug1.375
normal1.5
relaxed1.625
loose2

Margin

margin (m), marginTop (mt), marginRight (mr), marginBottom (mb), marginLeft (ml), my, mx, top, right, bottom, left, gridGap, gridColumnGap, gridRowGap, gap, columnGap, rowGap

Example
<Div mt="2" mx="auto" />
KeyValue
00
10.25rem
20.5rem
30.75rem
41rem
51.25rem
61.5rem
71.75rem
82rem
92.25rem
102.5rem
123rem
143.5rem
164rem
184.5rem
205rem
225.5rem
246rem
266.5rem
287rem
307.5rem
328rem
369rem
4010rem
4812rem
5614rem
6416rem
7218rem
8020rem

Padding

padding (p), paddingTop (pt), paddingRight (pr), paddingBottom (pb), paddingLeft (pl), py, px, top, right, bottom, left, gridGap, gridColumnGap, gridRowGap, gap, columnGap, rowGap

Example
<Div py="6" />
KeyValue
00
10.25rem
20.5rem
30.75rem
41rem
51.25rem
61.5rem
71.75rem
82rem
92.25rem
102.5rem
123rem
143.5rem
164rem
184.5rem
205rem
225.5rem
246rem
266.5rem
287rem
307.5rem
328rem
369rem
4010rem
4812rem
5614rem
6416rem
7218rem
8020rem

Border

borderWidth, borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth

Example
<Div borderBottomWidth="1px" />
KeyValue
00
11px solid
22px solid
33px solid
44px solid
55px solid
66px solid
77px solid
88px solid
99px solid
1010px solid

Border radius

borderRadius (rounded), borderTopRightRadius, borderTopLeftRadius, borderBottomRightRadius, borderBottomLeftRadius

Example
<Div rounded="2xl" />
KeyValue
none0
sm0.125rem
md0.25rem
lg0.375rem
xl0.5rem
2xl1rem
3xl1.5rem
4xl2rem
full9999px

Box shadow

boxShadow, textShadow

Example
<Div boxShadow="2xl" />
KeyValue
nonenone
xs0 0 0 1px rgba(0, 0, 0, 0.05)
sm0 1px 2px 0 rgba(0, 0, 0, 0.05)
md0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)
lg0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)
xl0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)
2xl0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)
3xl0 25px 50px -12px rgba(0, 0, 0, 0.25)
innerinset 0 2px 4px 0 rgba(0, 0, 0, 0.06)
outline0 0 0 3px rgba(66, 153, 225, 0.5)

Grid

col, row

Example
<Grid col="4" gap="8" />
KeyValue
1repeat(1, minmax(0, 1fr))
2repeat(2, minmax(0, 1fr))
3repeat(3, minmax(0, 1fr))
4repeat(4, minmax(0, 1fr))
5repeat(5, minmax(0, 1fr))
6repeat(6, minmax(0, 1fr))
7repeat(7, minmax(0, 1fr))
8repeat(8, minmax(0, 1fr))
9repeat(9, minmax(0, 1fr))
10repeat(10, minmax(0, 1fr))
11repeat(11, minmax(0, 1fr))
12repeat(12, minmax(0, 1fr))
nonenone

© 2020 Reflex

  • Blocks
  • Examples
  • Learn
  • Docs
  • Github