talira

Open Props

Expertly crafted web design tokens

open sourceMITself-hostablefree

Open Props is a set of more than 500 CSS custom properties, design tokens for colours, gradients, shadows, sizes, fluid typography, easings, animations, borders, aspect ratios, z-indexes and named media queries, that you use in your own CSS with var(--size-5) or var(--ease-squish-3) instead of a framework's classes. You import all of them or only the packs you need from a CDN or npm, with an optional light and dark normalize stylesheet and button styles built on the props, and the same tokens come as JavaScript, PostCSS, JSON design tokens, Figma tokens and Style Dictionary tokens. It is MIT-licensed and made by Adam Argyle.

Problems it solves

  • I want consistent spacing, colours and shadows in plain CSS without adopting a utility-class framework
  • stop inventing my own scale of font sizes, sizes and radii for every project
  • ready-made easing curves and keyframe animations I can reference from my own CSS
  • a light and dark baseline stylesheet that I can build on with my own styles
  • share the same design tokens between my CSS, my JavaScript and Figma
  • import only the colour or animation tokens I need from a CDN without a build step
  • named media queries for dark mode, reduced motion and breakpoints that I can reuse in CSS
  • fluid typography sizes that scale with the viewport without writing clamp() by hand

Features

  • 500+ CSS custom properties for colours, gradients, shadows, sizes, typography, easings, animations, borders, aspect ratios and z-indexes
  • named custom media queries in media.css (with PostCSS)
  • individual prop packs to import only what you need
  • light and dark normalize stylesheets and button styles built on the props
  • fluid font sizes
  • props as CSS, PostCSS, JavaScript modules, JSON design tokens, Figma tokens and Style Dictionary tokens
  • builds without :where(), scoped to :host for shadow DOM, or with an op prefix
  • CDN (unpkg) and npm

Alternatives

The same job

These do what Open Props does.

  1. Tailwind CSS Rapidly build modern websites without ever leaving your HTML.

Compare Open Props with the top 3