Travis Arnold
Design Systems Frame.io
@souporserious
1export default function App() {2 return (3 <figure className="bg-gray-100 rounded-xl p-8">4 <img5 className="w-32 h-32 rounded-full mx-auto"6 src="/react-finland.jpg"7 alt="React Finland Logo"8 />9 <div className="pt-6 text-center space-y-4">10 <blockquote>11 <p className="text-lg font-semibold">12 “React makes it painless to create interactive UIs.”13 </p>14 </blockquote>15 <figcaption className="font-medium">16 <div className="text-cyan-600">React</div>17 <div className="text-gray-500">18 A JavaScript library for building user interfaces19 </div>20 </figcaption>21 </div>22 </figure>23 )24}
1export default function App() {2 return (3 <Stack as="figure" background="gray.100" cornerRadius="xl">4 <Image5 source="/react-finland.jpg"6 width="32px"7 height="32px"8 alt="React Finland Logo"9 />10 <Stack spaceYStart={6} spaceBetween={4}>11 <Stack as="blockquote">12 <Text size="large" weight="semibold">13 “React makes it painless to create interactive UIs.”14 </Text>15 </Stack>16 <Stack as="figcaption">17 <Text color="cyan.600">React</Text>18 <Text color="gray.500">19 A JavaScript library for building user interfaces20 </Text>21 </Stack>22 </Stack>23 </Stack>24 )25}26
type TextProps = {color: ThemeValue["colors"]}const Text = createComponent<TextProps>({defaults: {color: "foreground",},transforms: {color: (value, theme) => theme.colors[value],},variants: {heading1: {defaults: {size: "large",},web: {as: "h1",},native: {as: "Text",accessibilityRole: "header",},},},platforms: {web: {as: "span",},native: {as: "Text",},},})
<Stack space="large" background="brand" />
<divcss={{display: "flex",flexDirection: "column",flexShrink: 0,padding: "40px",background: "#8D6CEE",}}/>
const transforms = {width: (value) => ({width: theme.lineLengths[value] || value,}),size: (value) => {const systemFontSize = theme.fontSizes[value]return {fontSize: systemFontSize? systemFontSize.default || systemFontSize: value,}},alignment: (value) => ({textAlign: value,}),opacity: (value) => ({opacity: value,}),shadow: (value) => ({filter: value,}),color: (value) => ({color: theme.colors[value] || value,}),}
<Stackas="button"onClick={() => send({ type: "FETCH_DOG" })}/>
<buttononClick={() =>send({type: "FETCH_DOG",})}css={{display: "flex",flexDirection: "column",flexShrink: 0,}}/>
const variants = {heading1: {defaults: {size: "xlarge",},web: {as: "h1",},native: {as: "Text",accessibilityRole: "header",},},body1: {defaults: {size: "medium",letterSpacing: 0.8,},web: {as: "p",},native: {as: "Text",},},}
<Text variant="heading3">The Future Is Compiled</Text>
<h3css={{whiteSpace: "pre-wrap",margin: 0,cursor: "default",fontSize: 48,color: "rgba(255, 255, 255, 0.8)",}}>The Future Is Compiled</h3>
<Textsize={[["default", "medium"],["breakpoints.large", "large"],]}/>
<spancss={{whiteSpace: "pre-wrap",margin: 0,cursor: "default",color: "white",fontSize: 48,"@media screen and (min-width: 1200px)": {fontSize: 72,},}}/>
<Graphicname="design-handoff-linear"width="48vw"/>
<svgheight="700"fill="none"viewBox="0 0 1625 700"width="48vw"><g id="design-handoff-linear"><pathid="arrow-2"d="M1189 383L1114 339.699L1114 426.301L1189..."fill="#CBABFE"/>...</g></svg>
const figmaVisitor = {JSXElement(path, state) {path.node.openingElement.attributes.push(t.jsxAttribute(t.jsxIdentifier("style"),t.jsxExpressionContainer(t.objectExpression(state.styleProperties))))},}const inkVisitor = {JSXElement(path, state) {path.node.openingElement.attributes =path.node.openingElement.attributes.concat(state.styleAttributes)},}
Glamor
JSXStyle
BlocksUI
React Primitives
Rebass
ThemeUI
www.jsxui.com
@souporserious