Developing Chronacle

Chronacle's design system is being maintained in Figma, allowing me to keep future designs consistent by using things like design tokens, as well as make development flows simple and seamless.

A modal / app drawer that says 'dates' at the top of it. The modal contains a calendar view including the month and selected dates; the user can choose the beginning and end dates of the respective trip. At the bottom, there is a blue button that says 'Looks Good' with an icon of a thumbs up.
Screenshot of a component in the Chronacle design system on Figma. Various parts of the component are selected and have dotted green lines leading out to annotations on the side. Each annotation contains various attributes for its respective part, such as the color fill, the font size, the padding, etc.
Example component, its underlying structure, and the various tokens/decisions used.

My design decisions are informed by my understanding of modern web's possibilities and limitations. I wanted to make my development process as streamlined as possible, so I thought a lot about tools that would help make that happen. In terms of front-end specifically, some tools I'm using are:

styledictionary.config.js

modules.exports = {

source: ['src/tokens/**/*.tokens.json'],

platforms: {

scss: {

transforms: ['attribute/cti', 'name/ti/camel'],

transformGroup: 'scss',

buildPath: 'src/styles/scss/',

files: tokenFileGenerator.baseTokens.map((tokenCategory) => ({

destination: `_${tokenCategory}.module.scss`,

format: 'scss/variables',

filter: tokenFilter(`${tokenCategory}`),

})),

},

},

};

tokens.json (Snippet)

{

"color": {

"blue-100": {

"value": "#99C7F2",

"category": "color"

// becomes $blue100 in _color.module.scss

},

},

}

Here's an example of my workflow using my Tilted Image Card component:

The Tilted Image Card component with
                annotations in Figma Dev Mode.
The Tilted Image Card component with annotations in Figma Dev Mode.
TiltedImageCard.module.scss

.TiltedImageCard {

@include main.flex-column;

justify-content: flex-end;

align-items: flex-start;

overflow: hidden;

border-radius: 1.2rem;

box-shadow: 0px 0px 10px 0px rgba(184, 184, 184, 0.64);

}

.small {

width: 9.8125rem;

max-width: 9.8125rem;

height: 7.75rem;

}

.small > .cardTitle {

font-size: typography.$fontSize16;

}

.large {

width: 11.775rem;

max-width: 11.775rem;

height: 9.3rem;

}

.large > .cardTitle {

font-size: typography.$fontSize18;

}

.cardTitle {

font-family: typography.$fontFamilyMain;

font-weight: typography.$fontWeightBold;

letter-spacing: typography.$letterSpacingRegular;

color: $white300;

padding: 1.2rem;

position: absolute;

line-height: normal;

align-self: stretch;

}
TiltedImageCard.tsx (Component File)

import styles from './TiltedImageCard.module.scss';

// Using Class Variance Authority to declare

// component variants and their associated class names:

const tiltedImageClasses = cva(styles.TiltedImageCard, {

// Class names for this variant will

// include ".TiltedImageCard .small"

variants: {

size:{

small: styles.small,

large: styles.large,

},

tiltDirection: {

left: styles.leftTilted,

right: styles.rightTilted,

},

},

defaultVariants: {

size: 'small',

},

});

// Defining my variant categories as component

// props, along with the props 'title' and 'mediaSource':

interface TiltedImageCardProps extends VariantProps<typeof tiltedImageClasses> {

title?: String;

mediaSource: StaticImageData;

}

// The component with props being passed in:

export default function TiltedImageCard({

size,

tiltDirection,

title,

mediaSource,

}: TiltedImageCardProps) {

return (

<article className={tiltedImageClasses({ tiltDirection, size })}>

<div className={styles.cardGradient}></div>

<img className={styles.cardMedia} src={mediaSource.src}></img>

<p className={styles.cardTitle}>{title}</p>

</article>

);

}

TiltedImageCard.stories.tsx (Component Storybook File)

export const TiltedImages: Story = {

render: () => (

<TiltedImageCard

tiltDirection={'right'}

title={'New York City'}

mediaSource={photoNewYork}

</TiltedImageCard>

<TiltedImageCard

tiltDirection={'left'}

title={'Los Angeles'}

mediaSource={photoLosAngeles}

</TiltedImageCard>

<TiltedImageCard

tiltDirection={'right'}

title={'London'}

mediaSource={photoLondon}

</TiltedImageCard>

<TiltedImageCard

tiltDirection={'left'}

mediaSource={photoVesuvio}

</TiltedImageCard>

),

args: {},

};

...and all of that ultimately becomes 🪄

The Tilted Image Card
                component within Storybook
                with multiple variants.
The Tilted Image Card component within Storybook with multiple variants.