Docs Kickstarter

Typography

Learn how to style typography in your site using our predefined styles and Tailwind CSS utilities.

Headings

We provide consistent heading styles across the site. Here are the available heading styles:

Paragraphs and Text

Regular Paragraph

This is regular paragraph text, the standard type you’ll be reading throughout most of the Documentation and Blog sections of the site. It’s represented by the <p> element. It’s a nice place to put movie quotes, like, “I’m just one stomach flu away from my goal weight.”

CSS PropertyValueTailwind Class
font-family"Cash Sans"font-sans
font-size1rem (16px)text-base
font-stylenormal(default)
font-weight400font-normal
line-height1.5rem (24px)leading-6
margin-top1.5rem (24px)[&:not(:first-child)]:mt-6

Tables

This is how a table will render:

PropertyDescription
propertyName1This is my first property
propNameWithoutCodeTagsThis one is another property
propertyName3Yet a 3rd property for good measure

CSS and Tailwind Classes Applied to Table Elements

CSS PropertyValueTailwind/Shadcn Class
border-collapsecollapseborder-collapse
borderTheme borderborder border-border
margin1.5rem 0my-6
CSS PropertyValueTailwind/Shadcn Class
font-family"Cash Sans"font-sans
font-size1rem (16px)text-base
font-stylenormal(default)
font-weight700font-bold
line-height1.5rem (24px)leading-6
borderTheme borderborder border-border
padding0.5rem 1rempy-2 px-4
white-spacenowrapwhitespace-nowrap
CSS PropertyValueTailwind/Shadcn Class
border-colorTheme borderborder-border
CSS PropertyValueTailwind/Shadcn Class
background-colorTheme muted (50% opacity)bg-muted/50
CSS PropertyValueTailwind/Shadcn Class
padding0.5rem 1rempy-2 px-4
borderTheme borderborder border-border

Lists

Unordered List

  • First item in the list
  • Second item in the list
  • Third item in the list

Note: there is also the Checklist component:

  • First item in the list
  • Second item in the list
  • Third item in the list

Ordered List

  1. First item in the list
  2. Second item in the list
  3. Third item in the list

CSS and Tailwind Classes Applied to List Elements

CSS PropertyValueTailwind Class
font-familyvar(--font-sans)font-sans
font-sizevar(--text-base-font-size, 16px)text-base
font-stylenormal(default)
font-weightvar(--font-weight-normal, 400)font-normal
line-heightvar(--text-base-line-height, 24px)leading-6
colorvar(--base-foreground, #0A0A0A)(CSS variable)
margin0.25rem 0my-1
margin-left1.5rem (24px)ml-6
list-style-typedisclist-disc
list-item margin-top0.5rem (8px)[&>li]:mt-2
displayflexflex
width323pxw-[323px]
padding0px 0px 24px 24pxpt-0 pr-0 pb-6 pl-6
flex-directioncolumnflex-col
align-itemsflex-startitems-start
gapvar(--spacing-2, 8px)gap-2
CSS PropertyValueTailwind Class
font-familyvar(--font-sans)font-sans
font-sizevar(--text-base-font-size, 16px)text-base
font-stylenormal(default)
font-weightvar(--font-weight-normal, 400)font-normal
line-heightvar(--text-base-line-height, 24px)leading-6
colorvar(--base-foreground, #0A0A0A)(CSS variable)
margin0.25rem 0my-1
margin-left1.5rem (24px)ml-6
list-style-typedecimallist-decimal
list-item margin-top0.5rem (8px)[&>li]:mt-2
displayflexflex
width323pxw-[323px]
padding0px 0px 24px 24pxpt-0 pr-0 pb-6 pl-6
flex-directioncolumnflex-col
align-itemsflex-startitems-start
gapvar(--spacing-2, 8px)gap-2
CSS PropertyValueTailwind Class
font-familyvar(--font-sans)(inherited from parent)
font-sizevar(--text-base-font-size, 16px)(inherited from parent)
font-stylenormal(default)
font-weightvar(--font-weight-normal, 400)(inherited from parent)
line-heightvar(--text-base-line-height, 24px)(inherited from parent)
colorvar(--base-foreground, #0A0A0A)(CSS variable)
margin-top0.5rem (8px)mt-2

Inline Text Styles

Blockquotes

This is a blockquote. Like, a quote from someone at Block.

CSS PropertyValueTailwind Class
font-family"Cash Sans"font-sans
font-size1rem (16px)text-base
font-stylenormal(removed italic)
font-weight400font-normal
line-height1.5rem (24px)leading-6
flex1 0 0flex-1
margin-top1.5rem (24px)mt-6
border-left2px solid theme borderborder-l-2 border-border
padding-left1.5rem (24px)pl-6
colorTheme muted foregroundtext-muted-foreground

Links render like this: Click here to learn more.

CSS PropertyValueTailwind Class
font-weight500font-medium
colorhsl(var(--primary))text-primary
text-decorationunderlineunderline
text-underline-offset4pxunderline-offset-4
transitioncolorstransition-colors
color (hover)hsl(var(--primary) / 0.8)hover:text-primary/80

Inline Code

This is how inline code will render:

console.log("My code is better than yours.");

CSS PropertyValueTailwind/Shadcn Class
colorTheme foregroundtext-foreground
font-family"Cash Sans Mono"font-mono
font-size0.875em (87.5% of parent)font-size: 0.875em
font-stylenormal(default)
font-weight400font-normal
line-height(inherited from parent)(inherited)
positionrelativerelative
border-radius0.25remrounded
padding0.2rem 0.3rempx-[0.3rem] py-[0.2rem]
borderTheme borderborder border-border
background-colorTheme mutedbg-muted

Code Blocks

This is how code blocks will render:

Best Practices

  1. Hierarchy

    • Use appropriate heading levels (h1-h6)
    • Maintain consistent spacing between elements
    • Use lead paragraphs for important sections
  2. Readability

    • Keep line lengths comfortable (around 65-75 characters)
    • Use appropriate line height
    • Ensure sufficient contrast
  3. Responsiveness

    • Use responsive font sizes
    • Adjust spacing on different screen sizes
    • Consider reading experience on all devices
  4. Accessibility

    • Use semantic HTML elements
    • Maintain proper heading structure
    • Ensure sufficient color contrast
    • Consider users with screen readers
  5. Dark Mode

    • Test all text styles in dark mode
    • Ensure proper contrast ratios
    • Use appropriate color variables