className and style props. This ensures that gaps in the design system are surfaced rather than encouraging consumers to constantly apply workarounds.<Card> <Heading level="4">Product Designer</Heading> <Text>Braid Design Pty Ltd</Text> <Text>Melbourne</Text> <Text>Information Technology</Text> <Text>150k+</Text> <Text>Long description of card details providing more information.</Text> <Text>2d ago</Text> </Card>
<Card> <Stack space="large"> <Heading level="4">Product Designer</Heading> <Text>Braid Design Pty Ltd</Text> <Text>Melbourne</Text> <Text>Information Technology</Text> <Text>150k+</Text> <Text>Long description of card details providing more information.</Text> <Text>2d ago</Text> </Stack> </Card>
<Card> <Stack space="large"> <Stack space="small"> <Heading level="4">Product Designer</Heading> <Text>Braid Design Pty Ltd</Text> </Stack> <Stack space="small"> <Text>Melbourne</Text> <Text>Information Technology</Text> <Text>150k+</Text> </Stack> <Text>Long description of card details providing more information.</Text> <Text>2d ago</Text> </Stack> </Card>
<Card> <Stack space="large"> <Stack space="small"> <Heading level="4">Product Designer</Heading> <Text>Braid Design Pty Ltd</Text> </Stack> <Stack space="small"> <Text tone="secondary">Melbourne</Text> <Text tone="secondary">Information Technology</Text> <Text tone="secondary">150k+</Text> </Stack> <Text>Long description of card details providing more information.</Text> <Text tone="secondary" size="small"> 2d ago </Text> </Stack> </Card>
<Card> <Stack space="large"> <Stack space="small"> <Heading level="4">Product Designer</Heading> <Text>Braid Design Pty Ltd</Text> </Stack> <Stack space="small"> <Text tone="secondary" icon={<IconLocation />}> Melbourne </Text> <Text tone="secondary" icon={<IconTag />}> Information Technology </Text> <Text tone="secondary" icon={<IconMoney />}> 150k+ </Text> </Stack> <Text>Long description of card details providing more information.</Text> <Text tone="secondary" size="small"> 2d ago </Text> </Stack> </Card>
<Card> <Stack space="large"> <Stack space="small"> <Badge tone="positive">New</Badge> <Heading level="4">Product Designer</Heading> <Text>Braid Design Pty Ltd</Text> </Stack> <Stack space="small"> <Text tone="secondary" icon={<IconLocation />}> Melbourne </Text> <Text tone="secondary" icon={<IconTag />}> Information Technology </Text> <Text tone="secondary" icon={<IconMoney />}> 150k+ </Text> </Stack> <Text>Long description of card details providing more information.</Text> <Text tone="secondary" size="small"> 2d ago </Text> </Stack> </Card>
<Card> <Stack space="large"> <Stack space="small"> <Badge tone="positive">New</Badge> <Heading level="4">Product Designer</Heading> <Inline space="small" alignY="center"> <Text>Braid Design Pty Ltd</Text> <Rating rating={4.5} /> </Inline> </Stack> <Stack space="small"> <Text tone="secondary" icon={<IconLocation />}> Melbourne </Text> <Text tone="secondary" icon={<IconTag />}> Information Technology </Text> <Text tone="secondary" icon={<IconMoney />}> 150k+ </Text> </Stack> <Text>Long description of card details providing more information.</Text> <Text tone="secondary" size="small"> 2d ago </Text> </Stack> </Card>
<Card> <Spread space="small"> <Placeholder label="Job content" height={80} /> <Placeholder label="Save action" height={80} /> </Spread> </Card>
<Card> <Spread space="small"> <Placeholder label="Job content" height={80} /> <ButtonIcon variant="transparent" size="large" icon={<IconBookmark />} label="Save job" /> </Spread> </Card>
<Card> <Spread space="small"> <Stack space="large"> <Stack space="small"> <Badge tone="positive">New</Badge> <Heading level="4">Product Designer</Heading> <Inline space="small" alignY="center"> <Text>Braid Design Pty Ltd</Text> <Rating rating={4.5} /> </Inline> </Stack> <Stack space="small"> <Text tone="secondary" icon={<IconLocation />}> Melbourne </Text> <Text tone="secondary" icon={<IconTag />}> Information Technology </Text> <Text tone="secondary" icon={<IconMoney />}> 150k+ </Text> </Stack> <Text>Long description of card details providing more information.</Text> <Text tone="secondary" size="small"> 2d ago </Text> </Stack> <ButtonIcon variant="transparent" size="large" icon={<IconBookmark />} label="Save job" /> </Spread> </Card>
<Box background="brand" boxShadow="large" padding="large"> <Text>My first Braid component</Text> </Box>
display responsively:<Box display={{ mobile: "flex", tablet: "block" }}> <Heading level="2">Flex on small screen</Heading> <Heading level="2">Block on large screen</Heading> </Box>
component prop.For example, in order to render a semantic fieldset element without the native browser styles:css export:import { vars } from 'braid-design-system/css';
className and style), Box is the one exception. However, you should take care to ensure that custom classes on Box only use styles that are not available via its prop interface.For example, if you wanted to render an element as display: flex, but with a custom, responsive flex-basis value:// myComponent.css.ts import { style } from '@vanilla-extract/css'; import { vars, responsiveStyle } from 'braid-design-system/css'; export const root = style( responsiveStyle({ mobile: { flexBasis: vars.space.small }, tablet: { flexBasis: vars.space.medium }, desktop: { flexBasis: vars.space.large }, wide: { flexBasis: vars.space.xlarge }, }), );
.css.ts extension), the vars object will be available for autocompletion and type checking within your editor.// myComponent.ts import * as styles from './myComponent.css'; export default function MyComponent() { return ( <Box display="flex" className={styles.root}> <Text>My first Braid component</Text> </Box> ); };