Skip to main content

Aesthetic

Aesthetic is an end-to-end design system and development framework for declaring consistent visual styles across platforms, languages, projects, and teams.

Fluent design system

With everything from typography to elevation, spacing, motion, and more! Create and manage a robust design system through a strict and centralized YAML configuration. Easy for both designers and developers to maintain.

Do you want to maintain a system with explicit parameters? Or do you want automatic parameters based on modular scale? Well Aesthetic supports both patterns, either separate or together!

Figma support coming soon!



Expressive themes

Whether for brand or accessibility purposes, compose your design system around multiple themes that express unique colors, palettes, and interactive states.

# TYPOGRAPHY
typography:
# Font family for all body text and headings. Defaults to the platform "system" font.
# Can customize text, heading, monospace, and locale fonts individually by using a map.
font: system
# Default text sizes and line heights, with "small" and "large" sizes being automatically
# calculated using modular scale. The default text size is used as the "root font size".
# Can customize default, small, and large sizes individually by using a map.
text:
small:
size: 12.45
lineHeight: 1.25
default:
size: 14
lineHeight: 1.25
large:
size: 15.75
lineHeight: 1.25
# Level 6 heading size, line height, and letter spacing. Levels 5-1 are automatically
# calculated by incrementing upwards using module scale.
# Can customize each level individually by using a map.
heading:
level1:
size: 16
lineHeight: 1.5
letterSpacing: 0.25
level2:
size: 20
lineHeight: 1.69
letterSpacing: 0.33
level3:
size: 25
lineHeight: 1.9
letterSpacing: 0.44
level4:
size: 31.25
lineHeight: 2.14
letterSpacing: 0.59
level5:
size: 39
lineHeight: 2.4
letterSpacing: 0.79
level6:
size: 48.8
lineHeight: 2.7
letterSpacing: 1.05
# RESPONSIVE
responsive:
# A list of 5 breakpoint units to target for device sizes.
breakpoints:
xs: 640
sm: 960
md: 1280
lg: 1600
xl: 1920
# Scaling factor to modify the text and line height for each breakpoint.
textScale: minor-second
lineHeightScale: minor-second
# SPACING
spacing:
# The type of algorithm to use when calculating spacing and measurement tokens.
# Accepts "vertical-rhythm" or "unit".
type: vertical-rhythm
# The base unit size when type is "unit".
unit: 8
# Multipliers for each spacing size.
multipliers:
xs: 0.25
sm: 0.5
df: 1 # Default
lg: 2
xl: 3
# BORDERS
# Scales from the inside (default) out (small, large). Configure for default.
# Can customize small, default, and large sizes individually by using a map.
borders:
small:
radius: 1.5
width: 0
default:
radius: 3
width: 1
large:
radius: 4.5
width: 2
# SHADOWS
# Scales from extra small to extra large. Configure for extra small.
# Can customize all sizes individually by using a map.
shadows:
xsmall:
x: 0
y: 2
blur: 2
spread: 0
small:
x: 0
y: 3.24
blur: 3.75
spread: 0
medium:
x: 0
y: 5.24
blur: 5.5
spread: 0
large:
x: 0
y: 8.47
blur: 7.25
spread: 0
xlarge:
x: 0
y: 13.71
blur: 9
spread: 0
# COLORS
# List of color names that each theme must implement.
colors:
- blue
- brown
- gray
- green
- pink
- purple
- red
- yellow
import {
BorderTokens,
BreakpointTokens,
DepthTokens,
HeadingTokens,
ShadowTokens,
SpacingTokens,
TextTokens,
TypographyToken,
} from '@aesthetic/system';
export const border: BorderTokens = {
sm: {
radius: '0.11rem', // 1.50px
width: '0rem', // 0px
},
df: {
radius: '0.21rem', // 3px
width: '0.07rem', // 1px
},
lg: {
radius: '0.32rem', // 4.50px
width: '0.14rem', // 2px
},
};
export const breakpoint: BreakpointTokens = {
xs: {
query: 'screen and (min-width: 45.71em)',
querySize: 640,
rootLineHeight: 1.33,
rootTextSize: '14.94px',
},
sm: {
query: 'screen and (min-width: 68.57em)',
querySize: 960,
rootLineHeight: 1.42,
rootTextSize: '15.94px',
},
md: {
query: 'screen and (min-width: 91.43em)',
querySize: 1280,
rootLineHeight: 1.52,
rootTextSize: '17.01px',
},
lg: {
query: 'screen and (min-width: 114.29em)',
querySize: 1600,
rootLineHeight: 1.62,
rootTextSize: '18.15px',
},
xl: {
query: 'screen and (min-width: 137.14em)',
querySize: 1920,
rootLineHeight: 1.73,
rootTextSize: '19.36px',
},
};
export const depth: DepthTokens = {
content: 100,
navigation: 1000,
sheet: 1100,
overlay: 1200,
modal: 1300,
toast: 1400,
dialog: 1500,
menu: 1600,
tooltip: 1700,
};
export const heading: HeadingTokens = {
l1: {
letterSpacing: '0.25px',
lineHeight: 1.5,
size: '1.14rem', // 16px
},
l2: {
letterSpacing: '0.33px',
lineHeight: 1.69,
size: '1.43rem', // 20px
},
l3: {
letterSpacing: '0.44px',
lineHeight: 1.9,
size: '1.79rem', // 25px
},
l4: {
letterSpacing: '0.59px',
lineHeight: 2.14,
size: '2.23rem', // 31.25px
},
l5: {
letterSpacing: '0.79px',
lineHeight: 2.4,
size: '2.79rem', // 39px
},
l6: {
letterSpacing: '1.05px',
lineHeight: 2.7,
size: '3.49rem', // 48.80px
},
};
export const shadow: ShadowTokens = {
xs: {
x: '0rem', // 0px
y: '0.14rem', // 2px
blur: '0.14rem', // 2px
spread: '0rem', // 0px
},
sm: {
x: '0rem', // 0px
y: '0.23rem', // 3.24px
blur: '0.27rem', // 3.75px
spread: '0rem', // 0px
},
md: {
x: '0rem', // 0px
y: '0.37rem', // 5.24px
blur: '0.39rem', // 5.50px
spread: '0rem', // 0px
},
lg: {
x: '0rem', // 0px
y: '0.61rem', // 8.47px
blur: '0.52rem', // 7.25px
spread: '0rem', // 0px
},
xl: {
x: '0rem', // 0px
y: '0.98rem', // 13.71px
blur: '0.64rem', // 9px
spread: '0rem', // 0px
},
};
export const spacing: SpacingTokens = {
xs: '0.31rem', // 4.38px
sm: '0.63rem', // 8.75px
df: '1.25rem', // 17.50px
lg: '2.50rem', // 35px
xl: '3.75rem', // 52.50px
type: 'vertical-rhythm',
unit: 17.5,
};
export const text: TextTokens = {
sm: {
lineHeight: 1.25,
size: '0.89rem', // 12.45px
},
df: {
lineHeight: 1.25,
size: '1rem', // 14px
},
lg: {
lineHeight: 1.25,
size: '1.13rem', // 15.75px
},
};
export const typography: TypographyToken = {
font: {
heading: 'Roboto',
locale: {},
monospace: '"Lucida Console", Monaco, monospace',
text: '"Lucida Console", Monaco, monospace',
system:
'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
},
rootLineHeight: 1.25,
rootTextSize: '14px',
};

Scalable design tokens

Compile your design system configuration to consistent, reusable, and scalable design tokens for Android*, iOS*, React Native, and Web platforms, and popular technologies such as JavaScript, TypeScript, CSS-in-JS, CSS, SCSS, and many more.

Design tokens are engineered for optimal developer ergonomics by providing type safety, autocompletion, and documentation.

* Mobile platforms coming soon!

Powerful APIs

Easily and succinctly style your components with our powerful battle-tested and high-performant APIs. We handle the heavy lifting, you focus on features that matter.

With our state of the art CSS-in-JS engine, composable APIs, streamlined syntax, and dynamic themes, Aesthetic provides the best developer experience on the market.

  • Atomic CSS
  • CSS variable driven themes
  • Variants and compound variants
  • Built-in directionality (LTR, RTL)
  • Automatic vendor prefixing
  • Server-side rendering
  • Client-side hydration
  • And much more...
import React from 'react';
import { createdStyled, CommonSize, PaletteType } from '@aesthetic/react';
export interface ButtonVariants {
palette?: PaletteType;
size?: CommonSize;
}
const Button = createdStyled<'button', ButtonVariants>('button', (css) =>
css.mixin('reset-button', {
padding: css.var('spacing-df'),
'@variants': {
'palette:primary': { backgroundColor: css.var('palette-primary-bg-base') },
'palette:positive': { backgroundColor: css.var('palette-positive-bg-base') },
'palette:warning': { backgroundColor: css.var('palette-warning-bg-base') },
'size:sm': { fontSize: css.var('text-sm-size') },
'size:df': { fontSize: css.var('text-df-size') },
'size:lg': { fontSize: css.var('text-lg-size') },
},
})
);
Button.defaultProps = {
palette: 'primary',
size: 'df',
};
export default Button;