Manifest Debugger

Using react-docgen-typescript. Generation took 4.6s.

Components

Accordion.Root

accordion · ./src/system/Accordion/Accordion.stories.tsx
Prop type error
No component file found for the "Accordion.Root" component.
  17 | type Story = StoryObj< typeof Accordion.Root >;
  18 |
> 19 | export default {
     | ^
  20 | 	title: 'Accordion',
  21 | 	component: Accordion.Root,
  22 | 	subcomponents: {

./src/system/Accordion/Accordion.stories.tsx:
/** @jsxImportSource theme-ui */

/**
 * External dependencies
 */
import { BiBookContent } from 'react-icons/bi';
import { RiUserAddLine, RiCodeSSlashFill } from 'react-icons/ri';

/**
 * Internal dependencies
 */
import { Box, Accordion } from '..';

import type { RootProps } from './Accordion';
import type { StoryObj } from '@storybook/react-vite';

type Story = StoryObj< typeof Accordion.Root >;

export default {
	title: 'Accordion',
	component: Accordion.Root,
	subcomponents: {
		'Accordion.Item': Accordion.Item,
		'Accordion.Trigger': Accordion.Trigger,
		'Accordion.TriggerWithIcon': Accordion.TriggerWithIcon,
		'Accordion.Content': Accordion.Content,
	},
};

const ExampleContent = () => (
	<Box>
		<p sx={ { mt: 0 } }>Add your key team members to the VIP Dashboard.</p>
		<p>Add developers to GitHub.</p>
		<p sx={ { mb: 0 } }>Add content editors and developers to WordPress admin.</p>
	</Box>
);

const ExampleAccordion = ( props: Partial< RootProps > ) => (
	<Accordion.Root defaultValue="teamPermissions" sx={ { width: '250px' } } { ...props }>
		<Accordion.Item value="teamPermissions">
			<Accordion.TriggerWithIcon
				icon={ <RiUserAddLine sx={ { color: 'support.accent.success' } } /> }
			>
				Team & Permissions
			</Accordion.TriggerWithIcon>
			<Accordion.Content>
				<ExampleContent />
			</Accordion.Content>
		</Accordion.Item>
		<Accordion.Item value="addContentMedia">
			<Accordion.TriggerWithIcon
				icon={ <BiBookContent sx={ { color: 'support.accent.success' } } /> }
			>
				Add Content & Media
			</Accordion.TriggerWithIcon>
			<Accordion.Content>
				<ExampleContent />
			</Accordion.Content>
		</Accordion.Item>
		<Accordion.Item value="addCode">
			<Accordion.TriggerWithIcon
				icon={ <RiCodeSSlashFill sx={ { color: 'support.accent.success' } } /> }
			>
				Add Code
			</Accordion.TriggerWithIcon>
			<Accordion.Content>
				<ExampleContent />
			</Accordion.Content>
		</Accordion.Item>
	</Accordion.Root>
);

export const Default: Story = {
	args: {
		defaultValue: 'teamPermissions',
	},
	render: args => <ExampleAccordion { ...args } />,
};

export const WithLargeText: Story = {
	args: {
		defaultValue: 'teamPermissions',
	},
	render: args => (
		<Box sx={ { '.vip-heading-component > button': { fontSize: 4 } } }>
			<ExampleAccordion { ...args } />
		</Box>
	),
};
Info
No description found. Write a jsdoc comment such as /** Component description */.
Imports
import { Accordion, Box } from "@automattic/vip-design-system";
import { BiBookContent } from "react-icons/bi";
import { RiCodeSSlashFill, RiUserAddLine } from "react-icons/ri";
Default story ok
const Default = () => <ExampleAccordion defaultValue="teamPermissions" />;
With Large Text story ok
const WithLargeText = () => <Box sx={ { '.vip-heading-component > button': { fontSize: 4 } } }>
    <ExampleAccordion defaultValue="teamPermissions" />
</Box>;

Autocomplete

form-autocomplete · ./src/system/NewForm/FormAutocomplete.stories.jsx
Info
No description found. Write a jsdoc comment such as /** Component description */.
Imports
import { Autocomplete, Root } from "@automattic/vip-design-system";
Default story ok
const Default = props => <DefaultComponent { ...props } />;
With Allow Custom story ok
const WithAllowCustom = props => <DefaultComponent { ...props } />;
Inline story ok
const Inline = props => <DefaultComponent { ...props } />;
With Default Value story ok
const WithDefaultValue = props => <DefaultComponent { ...props } />;
With Search Icon story ok
const WithSearchIcon = props => <DefaultComponent { ...props } />;
With Loading story ok
const WithLoading = props => <DefaultComponent { ...props } />;
With Debounce story ok
const WithDebounce = () => {
    const [ value, setValue ] = useState( null );
    const customArgs = {
        ...args,
        minLength: 3,
        debounce: 300,
        onInputChange: query => {
            setValue( query );
        },
    };

    return (
        <>
            Filter: { value }
            <DefaultComponent { ...customArgs } />
        </>
    );
};
With Slow Search And Debounce story ok
const WithSlowSearchAndDebounce = props => <DefaultComponent { ...props } />;
With Custom Messages story ok
const WithCustomMessages = props => <DefaultComponent { ...props } />;
With Errors story ok
const WithErrors = props => <DefaultComponent { ...props } />;
With Arrow story ok
const WithArrow = props => <DefaultComponent { ...props } />;
With Custom Arrow story ok
const WithCustomArrow = props => <DefaultComponent { ...props } />;

AutocompleteMulti

form-autocompletemulti · ./src/system/NewForm/FormAutocompleteMultiselect.stories.jsx
Info
No description found. Write a jsdoc comment such as /** Component description */.
Imports
import { AutocompleteMulti, Root } from "@automattic/vip-design-system";
Default story ok
const Default = props => <DefaultComponent { ...props } />;
With Allow Custom story ok
const WithAllowCustom = props => <DefaultComponent { ...props } />;
With Badges story ok
const WithBadges = props => <DefaultComponent { ...props } />;
With Initial Value Badges story ok
const WithInitialValueBadges = props => <DefaultComponent { ...props } />;
Inline story ok
const Inline = props => <DefaultComponent { ...props } />;
With Static Data story ok
const WithStaticData = props => <DefaultComponent { ...props } />;
Inline Chips story ok
const InlineChips = props => <DefaultComponent { ...props } width={ 500 } />;
With Dynamic Data story ok
const WithDynamicData = () => {
    const [ selectedValues, setSelectedValues ] = useState( [] );
    const customArgs = {
        label: 'Select domains',
        searchIcon: true,
        required: true,
        placeholder: 'Start typing...',
        source: ( q, populateResults ) => {
            const filtered = longOptions.filter( option => option.label.toLowerCase().includes( q ) );
            const optionForDisplay = filtered?.map( option => option.label );
            populateResults( optionForDisplay.filter( option => ! selectedValues.includes( option ) ) );
        },
        onChange: obj => {
            setSelectedValues( obj );
        },
    };
    return (
        <>
            <Form.Root>
                <div sx={ { width: '100%' } }>
                    <Form.AutocompleteMulti
                        forLabel="form-autocompletemultiselect"
                        label={ customArgs.label }
                        onChange={ obj => {
                            setSelectedValues( obj );
                        } }
                        hasError={ true }
                        errorMessage="Please select a value."
                        { ...customArgs }
                    />
                </div>
                <div sx={ { mt: 3 } }>Selected value: { selectedValues.join( ', ' ) }</div>
            </Form.Root>
        </>
    );
};

Avatar

avatar · ./src/system/Avatar/Avatar.stories.tsx
Internal dependencies
Prop types (react-docgen-typescript) 6 prop types
Component: src/system/index.ts::Avatar
Props:
/**
 * Custom abbreviation text displayed when no image is provided, overrides the initial from `name`.
 */
abbr?: string

/**
 * Additional CSS class names.
 */
className?: string | (Mapping & string) | (ArgumentArray & string) | (ReadonlyArgumentArray & string)

/**
 * The full name of the user; the first character is used as the fallback initial.
 */
name?: string

/**
 * The width and height of the avatar in pixels.
 */
size?: number = 32

/**
 * Image URL for the avatar. When provided, renders an image instead of initials.
 */
src?: string

/**
 * Additional Theme UI styles applied to the avatar container.
 */
sx?: (ThemeUIStyleObject & ThemeUIStyleObject<Theme<{}>>) = {}
Imports
import { Avatar } from "@automattic/vip-design-system";
Default story ok
const Default = args => (
    <>
        { COMMON_SIZES.map( size => (
            <Avatar { ...args } size={ size } key={ size } />
        ) ) }
    </>
);
With Name story ok
const WithName = () => <Avatar
    name="Kitty"
    size={30}
    sx={{
        backgroundColor: '#D8A45F',
    }} />;
With Abbreviation story ok
const WithAbbreviation = () => <Avatar
    name="Taylor Swift"
    abbr="TS"
    size={64}
    sx={{
        backgroundColor: '#D8A45F',
    }} />;

Badge

badge · ./src/system/Badge/Badge.stories.tsx
Internal dependencies
Prop types (react-docgen-typescript) 1 prop type
Component: src/system/index.ts::Badge
Props:
/**
 * The color variant of the badge.
 */
variant?: "blue" | "gold" | "gray" | "green" | "orange" | "red" | "salmon" | "yellow" = blue
Imports
import { Badge, Link } from "@automattic/vip-design-system";
Default story ok
const Default = () => <Badge sx={undefined}>Badge</Badge>;
Variants story ok
const Variants = () => <>
    <Badge variant="blue" sx={ { m: 2 } }>Blue
                    </Badge>
    <Badge variant="gold" sx={ { m: 2 } }>Gold
                    </Badge>
    <Badge variant="gray" sx={ { m: 2 } }>Gray
                    </Badge>
    <Badge variant="green" sx={ { m: 2 } }>Green
                    </Badge>
    <Badge variant="orange" sx={ { m: 2 } }>Orange
                    </Badge>
    <Badge variant="red" sx={ { m: 2 } }>Red
                    </Badge>
    <Badge variant="salmon" sx={ { m: 2 } }>Salmon
                    </Badge>
    <Badge variant="yellow" sx={ { m: 2 } }>Yellow
                    </Badge>
</>;
With Link story ok
const WithLink = () => <Badge>
    <Link href="https://google.com">Google</Link>
</Badge>;

Box

box · ./src/system/Box/Box.stories.tsx
Internal dependencies
Imports
import { Box } from "@automattic/vip-design-system";
Default story ok
const Default = () => <Box sx={undefined}>Hello</Box>;

Breadcrumbs

navigation-breadcrumbs · ./src/system/Breadcrumbs/Breadcrumbs.stories.tsx
A responsive breadcrumb navigation bar that collapses gracefully on small screens. Supports collapsible and lastItem wrap modes for different responsive behaviors.
Prop types (react-docgen-typescript) 6 prop types
Component: src/system/Breadcrumbs/Breadcrumbs.tsx::Breadcrumbs
Props:
asChild?: boolean

/**
 * Additional CSS class name for the breadcrumbs container.
 */
className?: string

/**
 * Accessible label for the breadcrumbs navigation landmark.
 */
label?: string = Breadcrumbs

/**
 * Custom link component used to render breadcrumb links.
 */
LinkComponent?: NavItemAsProp = forwardRef<
	HTMLAnchorElement,
	React.AnchorHTMLAttributes< HTMLAnchorElement >
>(
	// eslint-disable-next-line jsx-a11y/anchor-has-content
	( props, ref: Ref< HTMLAnchorElement > ) => <a { ...props } ref={ ref } />
)

/**
 * Array of breadcrumb link items to display.
 */
links?: BreadcrumbsLinkProps[] = []

/**
 * How breadcrumbs collapse on small screens: 'collapsible' shows an ellipsis button, 'lastItem' hides the last item.
 */
wrapMode?: "collapsible" | "lastItem" = lastItem
Imports
import { Box, Breadcrumbs } from "@automattic/vip-design-system";
Primary story ok
const Primary = () => <Breadcrumbs
    label="Nav Breadcrumbs"
    links={[
        { href: 'https://wordpress.com', label: 'WordPress' },
        { href: 'https://newrelic.com/', label: 'New Relic' },
        { href: 'https://google.com/', label: 'Current Page' },
    ]}
    LinkComponent={ CustomLink } />;
Default story ok
const Default = () => (
    <Breadcrumbs
        LinkComponent={ CustomLink }
        label="Nav Breadcrumbs"
        links={ [
            { href: 'https://wordpress.com', label: 'WordPress' },
            { href: 'https://newrelic.com/', label: 'New Relic' },
            { href: 'https://google.com/', label: 'Not accessible' },
        ] }
    />
);
Collapsible story ok
const Collapsible = () => (
    <Box sx={ { display: 'flex', flexDirection: 'column', gap: 4 } }>
        <p>
            When entering Mobile views, the first and the last link will appear. A button with a … will
            also be visible. Once pressed, the rest of the links become available, and the focus is
            moved to the next link.
        </p>

        <hr sx={ { width: '100%', my: 4 } } />

        <Breadcrumbs
            wrapMode="collapsible"
            LinkComponent={ CustomLinkComponentized }
            label="Nav Breadcrumbs"
            links={ [
                { href: '/', label: 'Home' },
                { href: 'https://datadog.com/', label: 'Data dog' },
                { href: 'https://newrelic.com/', label: 'New Relic' },
                { href: 'https://rollbar.com/', label: 'Rollbar' },
                { href: 'https://areallylong.com/', label: 'A really long name' },
                { href: 'https://google.com/', label: 'I am the last item' },
            ] }
        />
    </Box>
);

Button

button · ./src/system/Button/Button.stories.tsx
A versatile button component with multiple style variants, danger state, and accessible disabled support.
Prop types (react-docgen-typescript) 7 prop types
Component: src/system/index.ts::Button
Props:
/**
 * Applies danger/destructive styling to the button.
 */
danger?: boolean = variant === 'danger'

/**
 * Whether the button is disabled.
 */
disabled?: boolean

/**
 * Stretches the button to full width of its container.
 */
full?: boolean

/**
 * Allows the button to grow within a flex container.
 */
grow?: boolean

/**
 * Click event handler.
 */
onClick?: ((event: ButtonClickType) => void)

/**
 * Uses `aria-disabled` instead of the native `disabled` attribute, keeping the button focusable.
 */
preferAriaDisabled?: boolean

/**
 * The visual style variant of the button.
 */
variant?: "text" | "display" | "danger" | "ghost" | "icon" | "primary" | "secondary" | "tertiary" = primary
Imports
import { BiCalendarHeart } from "react-icons/bi";
import { Button, ScreenReaderText, Table, TableCell, TableRow } from "@automattic/vip-design-system";
Primary story ok
const Primary = () => <Button variant="primary" disabled={false} full={false} danger={false}>Button</Button>;
Default story ok
const Default = () => <div>
    <h3>Default</h3>
    <Table>
        <TableRow>
            <TableCell head>Variant</TableCell>
            <TableCell head>Primary</TableCell>
            <TableCell head>Secondary</TableCell>
            <TableCell head>Tertiary</TableCell>
            <TableCell head>Ghost</TableCell>
            <TableCell head>Display</TableCell>
            <TableCell head>Icon</TableCell>
        </TableRow>
        <TableRow>
            <TableCell>Default</TableCell>
            <TableCell>
                <Button>Primary</Button>
            </TableCell>
            <TableCell>
                <Button variant="secondary">Secondary
                                        </Button>
            </TableCell>
            <TableCell>
                <Button variant="tertiary">Tertiary
                                        </Button>
            </TableCell>
            <TableCell>
                <Button variant="ghost">Ghost
                                        </Button>
            </TableCell>
            <TableCell>
                <Button variant="display">Display
                                        </Button>
            </TableCell>
            <TableCell>
                <Button variant="icon" type="button">
                    <BiCalendarHeart size={ 24 } />
                    <ScreenReaderText>domain.com</ScreenReaderText>
                </Button>
            </TableCell>
        </TableRow>
        <TableRow>
            <TableCell>Disabled</TableCell>
            <TableCell>
                <Button variant="primary" disabled>Primary
                                        </Button>
            </TableCell>
            <TableCell>
                <Button variant="secondary" disabled={ true }>Secondary
                                        </Button>
            </TableCell>
            <TableCell>
                <Button variant="tertiary" disabled>Tertiary
                                        </Button>
            </TableCell>
            <TableCell>
                <Button variant="ghost" disabled>Ghost
                                        </Button>
            </TableCell>
            <TableCell>
                <Button variant="display" disabled>Display
                                        </Button>
            </TableCell>
            <TableCell>
                <Button variant="icon" type="button" disabled>
                    <BiCalendarHeart size={ 24 } />
                    <ScreenReaderText>domain.com</ScreenReaderText>
                </Button>
            </TableCell>
        </TableRow>
    </Table>
    <div sx={ { mt: 3 } }>
        <Button variant="secondary" href="https://google/com" full>Button with full width
                        </Button>
    </div>
    <div sx={ { mt: 3, display: 'flex' } }>
        <Button variant="secondary" href="https://google/com" grow>Button with grow width
                        </Button>
    </div>
    <h3>Danger</h3>
    <Table>
        <TableRow>
            <TableCell head>Variant</TableCell>
            <TableCell head>Primary</TableCell>
            <TableCell head>Secondary</TableCell>
            <TableCell head>Ghost</TableCell>
        </TableRow>
        <TableRow>
            <TableCell>Default</TableCell>
            <TableCell>
                <Button danger>Primary
                                        </Button>
            </TableCell>
            <TableCell>
                <Button danger variant="secondary">Secondary
                                        </Button>
            </TableCell>
            <TableCell>
                <Button danger variant="ghost">Ghost
                                        </Button>
            </TableCell>
        </TableRow>
        <TableRow>
            <TableCell>Disabled</TableCell>
            <TableCell>
                <Button variant="primary" danger disabled>Primary
                                        </Button>
            </TableCell>
            <TableCell>
                <Button variant="secondary" danger disabled>Secondary
                                        </Button>
            </TableCell>
            <TableCell>
                <Button variant="ghost" disabled>Ghost
                                        </Button>
            </TableCell>
        </TableRow>
    </Table>
</div>;
Prefer Aria Disabled story ok
const PreferAriaDisabled = () => <div>
    <Button disabled preferAriaDisabled>Primary
                </Button>
</div>;

ButtonSubmit

buttonsubmit · ./src/system/Button/ButtonSubmit.stories.tsx
Internal dependencies
Prop types (react-docgen-typescript) 12 prop types
Component: src/system/index.ts::ButtonSubmit
Props:
/**
 * Applies danger/destructive styling to the button.
 */
danger?: boolean

/**
 * Whether the button is disabled.
 */
disabled?: boolean = false

/**
 * Stretches the button to full width of its container.
 */
full?: boolean

/**
 * Allows the button to grow within a flex container.
 */
grow?: boolean

/**
 * The content displayed inside the button.
 */
label: ReactNode

/**
 * Whether the button is in a loading state, showing a spinner.
 */
loading?: boolean = false

/**
 * Custom loading icon component rendered when `loading` is true.
 */
loadingIcon?: ((props: DefaultSpinnerProps) => Element) = DefaultSpinner

/**
 * Size (in pixels) of the loading icon.
 */
loadingIconSize?: number = 20

/**
 * Click event handler.
 */
onClick?: ((event: ButtonClickType) => void)

/**
 * Uses `aria-disabled` instead of the native `disabled` attribute, keeping the button focusable.
 */
preferAriaDisabled?: boolean

/**
 * Controls whether the button is rendered.
 */
show?: boolean = true

/**
 * The visual style variant of the button.
 */
variant?: "text" | "display" | "danger" | "ghost" | "icon" | "primary" | "secondary" | "tertiary" = secondary
Imports
import { ButtonSubmit } from "@automattic/vip-design-system";
Primary story ok
const Primary = () => <ButtonSubmit label="Submit" loading={false} />;
Primary Variant story ok
const PrimaryVariant = () => <ButtonSubmit label="Primary" variant="primary" sx={ { ml: 2 } } />;
Secondary story ok
const Secondary = () => <ButtonSubmit label="Secondary" variant="secondary" sx={ { ml: 2 } } />;
Loading story ok
const Loading = () => (
    <ButtonSubmit label="Loading" loading={ true } variant="primary" sx={ { ml: 2 } } />
);

Card

card · ./src/system/Card/Card.stories.tsx
A container component with optional header and body sections, supporting multiple visual variants.
Prop types (react-docgen-typescript) 7 prop types
Component: src/system/index.ts::Card
Props:
/**
 * Additional Theme UI styles applied to the card body.
 */
bodyStyles?: ThemeUIStyleObject

/**
 * The content rendered inside the card body.
 */
children?: ReactNode

/**
 * Additional Theme UI styles applied to the card header.
 */
headerStyles?: ThemeUIStyleObject

/**
 * Hides the card body when true.
 */
hideBody?: boolean = false

/**
 * Custom render function for the card header, receives the title as an argument.
 */
renderHeader?: ((title?: string) => ReactNode)

/**
 * Title text displayed in the card header.
 */
title?: string

/**
 * The visual style variant of the card.
 */
variant?: "primary" | "secondary" | "notice" | "indent" = primary
Imports
import { Box, Card } from "@automattic/vip-design-system";
Default story ok
const Default = () => <Card>Hello</Card>;
With Header story ok
const WithHeader = () => <Card title="Header">This is a card with a header.</Card>;
With Custom Header story ok
const WithCustomHeader = () => <Box sx={ { maxWidth: 500 } }>
    <Card
        title="Screenshot of a website"
        renderHeader={title => (
			<img
				src={ `https://s0.wp.com/mshots/v1/https://google.com/` }
				sx={ { width: '100%' } }
				alt={ title }
			/>
		)}>This is a card with a customized header content.</Card>
</Box>;
Default Secondary story ok
const DefaultSecondary = () => <Card variant="secondary">Hello</Card>;
With Header Secondary story ok
const WithHeaderSecondary = () => <Card title="Header" variant="secondary">This is a card with a header.</Card>;
Default Indent story ok
const DefaultIndent = () => <Card variant="indent">Hello</Card>;
Styled Body story ok
const StyledBody = () => <Card
    variant="indent"
    title="Hello world"
    bodyStyles={{ p: 6, backgroundColor: 'layer.2' }}>Hello styled body.</Card>;

Checkbox

form-checkbox · ./src/system/Form/Checkbox/Checkbox.stories.tsx
A styled checkbox input built on Radix UI Checkbox primitives. Supports multiple color variants and disabled state.
Prop types (react-docgen-typescript) 3 prop types
Component: src/system/Form/Checkbox/Checkbox.tsx::Checkbox
Props:
asChild?: boolean

/**
 * Whether the checkbox is disabled.
 */
disabled?: boolean = false

/**
 * The color variant of the checkbox.
 */
variant?: "disabled" | "primary" | "success" | "brand" = primary
Imports
import { Checkbox, Flex, Form, Label, Text } from "@automattic/vip-design-system";
Primary story ok
const Primary = () => <Checkbox variant="primary" disabled={false} />;
Default story ok
const Default = () => {
    const [ checked, setChecked ] = useState< CheckedState >( true );
    const [ checked2, setChecked2 ] = useState< CheckedState >( false );

    return (
        <Form.Root>
            { ( [ 'primary', 'brand' ] as CheckboxProps[ 'variant' ][] ).map( variant => (
                <Form.Fieldset key={ variant }>
                    <Form.Legend>Tell me your { variant } prefereces</Form.Legend>

                    <Flex sx={ { alignItems: 'center' } }>
                        <Checkbox
                            variant={ variant }
                            id={ `check1-${ variant }` }
                            checked={ checked }
                            aria-labelledby={ `label-check1-${ variant }` }
                            onCheckedChange={ setChecked }
                        />
                        <Label clickable htmlFor={ `check1-${ variant }` } id={ `label-check1-${ variant }` }>
                            This option
                        </Label>
                    </Flex>

                    <Flex sx={ { alignItems: 'center' } }>
                        <Checkbox
                            variant={ variant }
                            id={ `check2-${ variant }` }
                            checked={ checked2 }
                            aria-labelledby={ `label-check2-${ variant }` }
                            onCheckedChange={ setChecked2 }
                        />
                        <Label clickable htmlFor={ `check2-${ variant }` } id={ `label-check2-${ variant }` }>
                            This option too
                        </Label>
                    </Flex>
                </Form.Fieldset>
            ) ) }

            <Form.Fieldset>
                <Form.Legend>Tell me your Disabled prefereces</Form.Legend>

                <Flex sx={ { alignItems: 'center' } }>
                    <Checkbox
                        disabled
                        variant="disabled"
                        id={ `check1-disabled` }
                        checked={ checked }
                        aria-labelledby={ `label-check1-disabled` }
                        onCheckedChange={ setChecked }
                    />
                    <Label clickable htmlFor={ `check1-disabled` } id={ `label-check1-disabled` }>
                        This option
                    </Label>
                </Flex>

                <Flex sx={ { alignItems: 'center' } }>
                    <Checkbox
                        disabled
                        id={ `check2-disabled` }
                        checked={ checked2 }
                        aria-labelledby={ `label-check2-disabled` }
                        onCheckedChange={ setChecked2 }
                    />
                    <Label clickable htmlFor={ `check2-disabled` } id={ `label-check2-disabled` }>
                        This option too
                    </Label>
                </Flex>
            </Form.Fieldset>
        </Form.Root>
    );
};
Indeterminate story ok
const Indeterminate = () => {
    // Creat a ref to the manipula an input
    const checkRef = createRef< HTMLInputElement >();

    useEffect( () => {
        if ( checkRef.current ) {
            checkRef.current.indeterminate = true;
        }
    }, [ checkRef ] );

    return (
        <Form.Root>
            { ( [ 'primary', 'brand' ] as CheckboxProps[ 'variant' ][] ).map( variant => (
                <Form.Fieldset key={ variant }>
                    <Form.Legend>Indeterminate state { variant }</Form.Legend>

                    <Flex sx={ { alignItems: 'center' } }>
                        <Checkbox
                            variant={ variant }
                            id={ `check1-${ variant }` }
                            aria-labelledby={ `label-check1-${ variant }` }
                            checked={ 'indeterminate' }
                        />

                        <Label htmlFor={ `check1-${ variant }` } id={ `label-check1-${ variant }` }>
                            This option
                        </Label>
                    </Flex>
                </Form.Fieldset>
            ) ) }

            <Form.Fieldset>
                <Form.Legend>Indeterminate state disabled</Form.Legend>

                <Flex sx={ { alignItems: 'center' } }>
                    <Checkbox
                        variant="disabled"
                        id={ `check1-disabled` }
                        aria-labelledby={ `label-check1-disabled` }
                        checked={ 'indeterminate' }
                    />
                    <Label htmlFor={ `check1-disabled` } id={ `label-check1-disabled` }>
                        This option
                    </Label>
                </Flex>
            </Form.Fieldset>

            <Text>
                Reference:{ ' ' }
                <a href="https://css-tricks.com/indeterminate-checkboxes/">Indeterminate Checkboxes</a>
            </Text>
        </Form.Root>
    );
};

Code

code · ./src/system/Code/Code.stories.tsx
Internal dependencies
Prop types (react-docgen-typescript) 2 prop types
Component: src/system/index.ts::Code
Props:
/**
 * Display a shell-style `$` prompt before the code content.
 */
prompt?: boolean = false

/**
 * Show a copy-to-clipboard button alongside the code.
 */
showCopy?: boolean = false
Imports
import { Code } from "@automattic/vip-design-system";
Primary story ok
const Primary = () => <Code prompt showCopy>npm install @automattic/vip-design-system</Code>;
Default With Time story ok
const DefaultWithTime = () => (
    <Code>
        <time sx={ { color: 'logs.text.secondary' } } dateTime="2022-01-01 15:15:15">
            15:16
        </time>{ ' ' }
        Code
    </Code>
);
Default With Icon story ok
const DefaultWithIcon = () => <Code showCopy={ true }>Code with Icon</Code>;
Default With Console Info story ok
const DefaultWithConsoleInfo = () => (
    <Code showCopy={ true } onCopy={ () => global.alert( 'Hello world' ) }>
        Code with Icon and Click callback — console.info
    </Code>
);

ConfirmationDialog

deprecated-confirmationdialog · ./src/system/ConfirmationDialog/ConfirmationDialog.stories.jsx
Info
No description found. Write a jsdoc comment such as /** Component description */.
Prop types (react-docgen-typescript) 3 prop types
Component: src/system/index.ts::ConfirmationDialog
Props:
needsConfirm?: boolean = true

onConfirm: any

trigger: any
Imports
import { Box, Button, ConfirmationDialog, Flex, Heading, Text } from "@automattic/vip-design-system";
Default story ok
const Default = () => (
    <Flex>
        <Box>
            <ConfirmationDialog trigger={ ConfirmationTrigger } content={ ConfirmationContent } />
        </Box>
    </Flex>
);

DescriptionList

descriptionlist · ./src/system/DescriptionList/DescriptionList.stories.tsx
Internal dependencies
Prop types (react-docgen-typescript) 6 prop types
Component: src/system/DescriptionList/DescriptionList.tsx::DescriptionList
Props:
/**
 * The HTML element type used to render the list.
 */
as?: "dl" | "table" = dl

/**
 * Additional CSS class name for the list container.
 */
className?: string

/**
 * The width of the label column when rendered as a description list.
 */
labelWidth?: string = 100px

/**
 * The array of label-value pairs to display.
 */
list: { label?: ReactNode; value?: ReactNode; }[]

/**
 * Custom Theme UI styles for the list container.
 */
sx?: ThemeUIStyleObject

/**
 * An optional title displayed above the list.
 */
title?: string
Imports
import { DescriptionList } from "@automattic/vip-design-system";
Default story ok
const Default = () => <DescriptionList
    title="Summary of the list"
    list={[
        {
            label: 'Short Label',
            value:
                'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
        },
        {
            label: 'Long label to test label width',
            value: 'Value',
        },
    ]} />;
With Empty Summary story ok
const WithEmptySummary = () => <DescriptionList title="Summary of the list" list={[]} />;
Table story ok
const Table = () => <DescriptionList
    as="table"
    title="Summary of the list"
    list={[
        {
            label: 'Short Label',
            value: 'Value',
        },
    ]} />;

Dialog

deprecated-dialog · ./src/system/Dialog/Dialog.stories.jsx
Info
No description found. Write a jsdoc comment such as /** Component description */.
Prop types (react-docgen-typescript) 5 prop types
Component: src/system/index.ts::Dialog
Props:
content: any

disabled?: boolean = false

position?: string = left

startOpen?: boolean = false

trigger: any
Imports
import {
    Box,
    Button,
    Dialog,
    DialogDivider,
    DialogMenu,
    DialogMenuItem,
    Flex,
    Heading,
    Text,
} from "@automattic/vip-design-system";
Default story ok
const Default = () => (
    <Flex>
        <Box>
            <Dialog
                trigger={ ModalTrigger }
                content={ ModalContent }
                sx={ { width: 480 } }
                variant="modal"
            />
        </Box>
        <Dialog trigger={ DropdownTrigger } content={ DropdownContent } sx={ { width: 200 } } />
    </Flex>
);

Drawer

navigation-drawer · ./src/system/Drawer/Drawer.stories.tsx
A slide-out panel component built on Radix Dialog. Supports multiple positions and responsive dimensions.
Prop types (react-docgen-typescript) 6 prop types
Component: src/system/Drawer/Drawer.tsx::Drawer
Props:
/**
 * The content rendered inside the drawer panel.
 */
children?: ReactNode

/**
 * Responsive width/height dimensions for the drawer panel.
 */
dimensions?: responsiveDimensionsProp

/**
 * Accessible label for the drawer dialog.
 */
label?: string

/**
 * Custom render function for the close button. Returns null to hide it.
 */
renderClose?: (() => Element | null)

/**
 * The element that opens the drawer when clicked.
 */
trigger?: ReactNode

/**
 * The side or position from which the drawer slides in.
 */
variant?: "bottom" | "left" | "right" | "top" | "left-header" | "right-header" = left
Imports
import { Button, Content, Drawer, Root, Trigger } from "@automattic/vip-design-system";
Primary story ok
const Primary = () => <Drawer
    trigger={ <Button>Open Drawer</Button> }
    label="Drawer Dialog"
    variant="left"
    dimensions={{ width: 320 }}>
    <p sx={ { ml: 3 } }>Drawer content goes here.</p>
</Drawer>;
Default story ok
const Default = () => (
    <>
        <Drawer
            label="My XYZ Dialog"
            trigger={ <Button>Open </Button> }
            dimensions={ { width: 320 } }
        >
            <p sx={ { ml: 3 } }>Hello from default</p>
        </Drawer>

        <Drawer trigger={ <Button>Top</Button> } variant="top" label="Dialog Content">
            <p sx={ { ml: 3 } }>Hello from top</p>
        </Drawer>
        <Drawer
            trigger={ <Button>Right</Button> }
            variant="right"
            label="Dialog"
            dimensions={ { width: 500 } }
        >
            <p sx={ { ml: 3 } }>Hello from right width 500px</p>
        </Drawer>
        <Drawer
            trigger={ <Button>Bottom</Button> }
            variant="bottom"
            label="Dialog"
            dimensions={ { height: 200 } }
        >
            <p sx={ { ml: 3 } }>Hello from bottom with 200px</p>
        </Drawer>
        <Drawer
            trigger={ <Button>Left</Button> }
            variant="left"
            label="Dialog"
            dimensions={ { width: 600 } }
        >
            <p sx={ { ml: 3 } }>Hello from left width 600px</p>
        </Drawer>
        <Drawer trigger={ <Button>Left Header</Button> } variant="left-header" label="Dialog">
            <p sx={ { ml: 3 } }>Hello from left header (VIP Dashboard needs)</p>
        </Drawer>
        <Drawer trigger={ <Button>Right Header</Button> } variant="left-header" label="Dialog">
            <p sx={ { ml: 3 } }>Hello from right header (VIP Dashboard needs)</p>
        </Drawer>
    </>
);
By Parts story ok
const ByParts = () => (
    <>
        <Root>
            <Trigger>
                <Button>Open </Button>
            </Trigger>
            <Content dimensions={ { width: 320 } } label="My XYZ Dialog">
                <p sx={ { ml: 3 } }>Hello from default</p>
            </Content>
        </Root>
    </>
);

Dropdown.Root

dropdown · ./src/system/Dropdown/Dropdown.stories.jsx
Info
No description found. Write a jsdoc comment such as /** Component description */.
Prop types (react-docgen-typescript) 10 prop types
Component: src/system/Dropdown/index.ts::Root
Props:
/**
 * The menu items rendered inside the dropdown.
 */
children: ReactNode

/**
 * Additional CSS class name applied to the dropdown trigger.
 */
className?: string

/**
 * Props forwarded to the DropdownContent wrapper.
 */
contentProps?: DropdownContentProps

/**
 * Whether the dropdown is open by default (uncontrolled).
 */
defaultOpen?: boolean = false

/**
 * The reading direction of the dropdown menu.
 */
dir?: "ltr" | "rtl" = 'ltr'

/**
 * Whether interaction with outside elements is blocked while open.
 */
modal?: boolean = true

/**
 * Callback fired when the dropdown open state changes.
 */
onOpenChange?: ((open: boolean) => void)

/**
 * Controls the open state when used as a controlled component.
 */
open?: boolean

/**
 * Props forwarded to the Radix Portal component.
 */
portalProps?: object

/**
 * The element that toggles the dropdown menu.
 */
trigger: ReactNode
Imports
import {
    Button,
    CheckboxItem,
    Item,
    ItemIndicator,
    Label,
    RadioGroup,
    RadioItem,
    Root,
    Separator,
    Sub,
    SubContent,
    SubTrigger,
    Link,
    Text,
} from "@automattic/vip-design-system";
import { CheckIcon, ChevronRightIcon, DotFilledIcon } from "@radix-ui/react-icons";
Default story ok
const Default = () => <>
    <Dropdown.Root trigger={<Button>Open</Button>}>
        <Dropdown.Item>All</Dropdown.Item>
        <Dropdown.Item>Completed</Dropdown.Item>
        <Dropdown.Item>Running</Dropdown.Item>
        <Dropdown.Item>Cancelled</Dropdown.Item>
        <Dropdown.Separator />
        <Dropdown.Item>Errored</Dropdown.Item>
    </Dropdown.Root>
    <Text>This component is based on the Radix Dropdown. You can find all available options, props and
                        features in the{ ' ' }
        <Link
            href="https://www.radix-ui.com/docs/primitives/components/dropdown-menu"
            target="_blank"
            rel="noopener noreferrer">Dropdown Documentation page.
                            </Link>
    </Text>
</>;
Complex Options story ok
const ComplexOptions = () => {
    const [ bookmarksChecked, setBookmarksChecked ] = React.useState( true );
    const [ urlsChecked, setUrlsChecked ] = React.useState( false );
    const [ person, setPerson ] = React.useState( 'pedro' );

    return (
        <>
            <Dropdown.Root trigger={<Button>See options</Button>}>
                <Dropdown.Item>New Tab</Dropdown.Item>
                <Dropdown.Item>New Window</Dropdown.Item>
                <Dropdown.Item disabled onSelect={ () => console.log( 'disabled' ) }>New Private Window
                                        </Dropdown.Item>
                <Dropdown.Sub>
                    <Dropdown.SubTrigger>More Tools
                                                    <ChevronRightIcon />
                    </Dropdown.SubTrigger>
                    <Dropdown.SubContent sideOffset={ 2 } alignOffset={ -5 }>
                        <Dropdown.Item>Save Page As…</Dropdown.Item>
                        <Dropdown.Item>Create Shortcut…</Dropdown.Item>
                        <Dropdown.Item>Name Window…</Dropdown.Item>
                        <Dropdown.Separator />
                        <Dropdown.Item>Developer Tools</Dropdown.Item>
                    </Dropdown.SubContent>
                </Dropdown.Sub>
                <Dropdown.Separator />
                <Dropdown.CheckboxItem checked={ bookmarksChecked } onCheckedChange={ setBookmarksChecked }>
                    <Dropdown.ItemIndicator>
                        <CheckIcon />
                    </Dropdown.ItemIndicator>Show Bookmarks
                                        </Dropdown.CheckboxItem>
                <Dropdown.CheckboxItem checked={ urlsChecked } onCheckedChange={ setUrlsChecked }>
                    <Dropdown.ItemIndicator>
                        <CheckIcon />
                    </Dropdown.ItemIndicator>Show Full URLs
                                        </Dropdown.CheckboxItem>
                <Dropdown.Separator />
                <Dropdown.Label>People</Dropdown.Label>
                <Dropdown.RadioGroup value={ person } onValueChange={ setPerson }>
                    <Dropdown.RadioItem value="pedro">
                        <Dropdown.ItemIndicator>
                            <DotFilledIcon />
                        </Dropdown.ItemIndicator>Pedro Duarte
                                                </Dropdown.RadioItem>
                    <Dropdown.RadioItem value="colm">
                        <Dropdown.ItemIndicator>
                            <DotFilledIcon />
                        </Dropdown.ItemIndicator>Colm Tuite
                                                </Dropdown.RadioItem>
                </Dropdown.RadioGroup>
            </Dropdown.Root>
            <Text>This component is based on the Radix Dropdown. You can find all available options, props
                                    and features in the{ ' ' }
                <Link
                    href="https://www.radix-ui.com/docs/primitives/components/dropdown-menu"
                    target="_blank"
                    rel="noopener noreferrer">Dropdown Documentation page.
                                        </Link>
            </Text>
        </>
    );
};
With Dialog story ok
const WithDialog = () => {
    const [ alertOpen, setAlertOpen ] = React.useState( false );
    const [ menuOpen, setMenuOpen ] = React.useState( false );

    // eslint-disable-next-line react/prop-types
    const AreYouSureDialog = ( { onConfirm, ...props } ) => (
        <NewDialog.Root
            { ...props }
            content={
                <>
                    <Button variant="secondary" onClick={ () => onConfirm() }>
                        Custom Close.
                    </Button>
                    <p>Teste abc.</p>
                </>
            }
        />
    );

    return (
        <div>
            <Text>
                This is an important example when combining the Dropdown component with the NewDialog
                component. In order to have the correct accessibility, there are some events you need to
                use. Use this example if you want to copy and paste the code.
            </Text>

            <Dropdown.Root
                modal={ ! alertOpen }
                open={ menuOpen }
                onOpenChange={ setMenuOpen }
                contentProps={ { sideOffset: 5 } }
                trigger={ <Button>Open</Button> }
            >
                <Dropdown.Item>I don&apos;t do anything</Dropdown.Item>

                <AreYouSureDialog
                    title="Are you in the jungle?"
                    description="sha-n-n-n-n-n-n-n-n knees, knees"
                    open={ alertOpen }
                    onOpenChange={ setAlertOpen }
                    onConfirm={ () => {
                        setAlertOpen( false );
                        setMenuOpen( false );
                    } }
                    trigger={
                        <Dropdown.Item onSelect={ event => event.preventDefault() }>
                            Open Dialog
                        </Dropdown.Item>
                    }
                />
            </Dropdown.Root>
        </div>
    );
};

FilterDropdown

filterdropdown · ./src/system/FilterDropdown/FilterDropdown.stories.tsx
Dropdown menu for selecting a single filter from a set of options.
Prop types (react-docgen-typescript) 6 prop types
Component: src/system/FilterDropdown/FilterDropdown.tsx::FilterDropdown
Props:
/**
 * Additional CSS class name(s) appended to the trigger button.
 */
className?: string

/**
 * Props forwarded to the underlying Dropdown content container.
 */
contentProps?: DropdownContentProps = {}

/**
 * Key of the initially selected filter. Falls back to the first filter when omitted.
 */
defaultValue?: string | null = null

/**
 * Map of available filter options keyed by their identifier.
 */
filters: FilterDropdownFiltersProp

/**
 * Label displayed before the currently selected filter.
 */
label?: ReactNode

/**
 * Callback fired when a filter option is selected, receiving the filter data and its key.
 */
onSelect: (filter: FilterDropDownFilterProp, key: string) => void
Imports
import { FilterDropdown } from "@automattic/vip-design-system";
Primary story ok
const Primary = () => <FilterDropdown
    label="Filter:"
    filters={{
        all: { value: 'all', label: 'All' },
        active: { value: 'active', label: 'Active' },
        inactive: { value: 'inactive', label: 'Inactive' },
    }}
    defaultValue="all" />;
Default story ok
const Default = () => (
    <>
        <FilterDropdown
            className="vip-plugins-filter-dropdown"
            label="Filter:"
            filters={ FILTER_OPTIONS }
            onSelect={ () => {} }
            defaultValue={ FILTER_OPTIONS.all.value }
        />
    </>
);

Flex

flex · ./src/system/Flex/Flex.stories.tsx
Internal dependencies
Imports
import { Flex } from "@automattic/vip-design-system";
Default story ok
const Default = () => <Flex>Hello</Flex>;

Footer

navigation-footer · ./src/system/Footer/Footer.stories.tsx
Info
No description found. Write a jsdoc comment such as /** Component description */.
Prop types (react-docgen-typescript) 5 prop types
Component: src/system/Footer/Footer.tsx::Footer
Props:
/**
 * A logo to display in the right footer area. Displays Automattic logo by default.
 */
customLogo?: ReactNode

/**
 * Add an additional separator after the last element.
 */
hasTrailingSeparator?: boolean = false

/**
 * Option to show underlines for links.
 */
hasUnderlinedLinks?: boolean = false

/**
 * An array of LinkExternal components as objects.
 */
links: LinkExternalProps[]

/**
 * The maxiumum width of the footer.
 */
maxWidth?: string | number = 100%
Imports
import { Footer } from "@automattic/vip-design-system";
Primary story ok
const Primary = () => <Footer
    hasTrailingSeparator={false}
    hasUnderlinedLinks={false}
    maxWidth="100%"
    links={[
        {
            children: 'About',
            href: 'https://wpvip.com/',
            screenReaderText: 'WordPress VIP. Learn more about us',
            showExternalIcon: false,
        },
        {
            children: 'Docs',
            href: 'https://docs.wpvip.com/',
            screenReaderText: 'our public documentation on our platform and tools',
        },
        {
            children: 'Status',
            href: 'https://wpvipstatus.com',
            screenReaderText:
                ". See real-time availability and performance monitoring for WordPress VIP's services",
            newTab: true,
        },
    ]} />;
Default story ok
const Default = () => (
    <Footer
        links={ [
            {
                children: 'About',
                href: 'https://wpvip.com/',
                screenReaderText: 'WordPress VIP. Learn more about us',
                showExternalIcon: false,
            },
            {
                children: 'Docs',
                href: 'https://docs.wpvip.com/',
                screenReaderText: 'our public documentation on our platform and tools',
            },
            {
                children: 'Status',
                href: 'https://wpvipstatus.com',
                screenReaderText:
                    ". See real-time availability and performance monitoring for WordPress VIP's services",
                newTab: true,
            },
        ] }
    />
);

Grid

grid · ./src/system/Grid/Grid.stories.tsx
Internal dependencies
Imports
import { Grid } from "@automattic/vip-design-system";
Default story ok
const Default = () => <Grid>Hello</Grid>;

Heading

heading · ./src/system/Heading/Heading.stories.tsx
A themed heading component that renders the appropriate HTML heading element (h1-h6) with design-token styling.
Prop types (react-docgen-typescript) 1 prop type
Component: src/system/index.ts::Heading
Props:
/**
 * The heading level, which determines both the rendered HTML element and typographic style.
 */
variant?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" = h3
Imports
import { Box, Heading } from "@automattic/vip-design-system";
Primary story ok
const Primary = () => <Heading variant="h1">Your Applications</Heading>;
Default story ok
const Default = () => (
    <Box>
        <Heading variant="h1">Your Applications</Heading>
        <Heading variant="h2">Heading Two</Heading>
        <Heading variant="h3">Heading Three</Heading>
        <Heading variant="h4">Heading Four</Heading>
        <Heading variant="h5">Heading Five</Heading>

        <Heading variant="h3" as="h1">
            Heading One with Heading Three Styles
        </Heading>
        <Heading as="p" sx={ { variant: 'text.caps' } }>
            Paragraph with Caps Styles
        </Heading>
        <Heading as="h3" sx={ { variant: 'text.caps' } }>
            Heading Three with Caps Styles
        </Heading>
    </Box>
);

Hr

hr · ./src/system/Hr/Hr.stories.tsx
Internal dependencies
Prop types (react-docgen-typescript) 1 prop type
Component: src/system/Hr/Hr.tsx::Hr
Props:
/**
 * Theme UI style overrides applied to the horizontal rule.
 */
sx?: ThemeUIStyleObject
Imports
import { Hr } from "@automattic/vip-design-system";
Primary story ok
const Primary = () => <Hr />;
Default story ok
const Default = () => (
    <>
        Horizontal Line:
        <Hr />
    </>
);

Input

form-input · ./src/system/Form/Input.stories.tsx
Info
No description found. Write a jsdoc comment such as /** Component description */.
Prop types (react-docgen-typescript) 6 prop types
Component: src/system/Form/Input.tsx::Input
Props:
errorMessage?: string

forLabel?: string

hasError?: boolean = false

label?: string

required?: boolean

wrapperSx?: ThemeUIStyleObject = {}
Imports
import { Form, Input } from "@automattic/vip-design-system";
Primary story ok
const Primary = () => <Input
    label="Input label"
    forLabel="input-primary"
    placeholder="Your input here..."
    hasError={false}
    required={false} />;
Default story ok
const Default = () => (
    <Form.Root>
        <Form.Input
            placeholder="Your input here..."
            label="Always add a label to inputs"
            forLabel="input-simple"
        />

        <hr sx={ { my: 4 } } />

        <Form.Input
            forLabel="input-with-error"
            label="Error Input"
            errorMessage="Please type numeric characters only"
            hasError
        />

        <hr sx={ { my: 4 } } />

        <Form.Input forLabel="input-with-required" label="Required" required />

        <hr sx={ { my: 4 } } />

        <Form.Label htmlFor="input-with-custom-label">Custom Label outside the Input</Form.Label>
        <Form.Input forLabel="input-with-custom-label" required />
        <Form.Input forLabel="input-readonly" readOnly value="This is a readonly input" />
    </Form.Root>
);

InputWithCopyButton

form-inputwithcopybutton · ./src/system/Form/InputWithCopyButton.stories.jsx
Info
No description found. Write a jsdoc comment such as /** Component description */.
Imports
import { Form, InputWithCopyButton, Notice } from "@automattic/vip-design-system";
Primary story ok
const Primary = () => <InputWithCopyButton
    label="Input label"
    forLabel="input-primary"
    placeholder="Your input here..."
    hasError={false}
    required={false} />;
Default story ok
const Default = () => {
    const [ copiedText, setCopiedText ] = useState( '' );
    return (
        <Form.Root>
            { copiedText && (
                <Notice variant="success" sx={ { mb: 4 } }>
                    Input successfully copied value! <strong>{ copiedText }</strong>
                </Notice>
            ) }
            <Form.InputWithCopyButton
                placeholder="Your input here..."
                label="Always add a label to inputs"
                forLabel="input-simple"
                copyHandler={ value => setCopiedText( value ) }
            />
            <Form.InputWithCopyButton
                value="Copy me!"
                label="This is a readonly input"
                forLabel="input-simple"
                readOnly
                copyHandler={ value => setCopiedText( value ) }
            />
        </Form.Root>
    );
};

Label

form-label · ./src/system/Form/Label.stories.tsx
A form label component with support for required field indicators and clickable styling.
Prop types (react-docgen-typescript) 4 prop types
Component: src/system/index.ts::Label
Props:
/**
 * The content rendered inside the label.
 */
children?: ReactNode

/**
 * Whether the label should display a pointer cursor on hover.
 */
clickable?: boolean

/**
 * The ID of the form element this label is associated with.
 */
htmlFor?: string

/**
 * Whether to display a required field indicator next to the label.
 */
required?: boolean
Imports
import { Label } from "@automattic/vip-design-system";
Default story ok
const Default = () => <Label>Label text</Label>;
Required story ok
const Required = () => <Label required>Label text</Label>;

Link

navigation-link · ./src/system/Link/Link.stories.tsx
Internal dependencies
Prop types (react-docgen-typescript) 1 prop type
Component: src/system/Link/Link.tsx::Link
Props:
/**
 * The visual style variant of the link. Button variants render the link styled as a button.
 */
variant?: "primary" | "button-primary" | "button-secondary" | "button-tertiary" | "button-ghost" | "button-display" | "button-danger" = primary
Imports
import { Flex, Link } from "@automattic/vip-design-system";
Default story ok
const Default = () => <Link href="#!">Hello</Link>;
Button Variants story ok
const ButtonVariants = () => (
    <Flex sx={ { gap: 2 } }>
        { buttonTypes.map( ( variant, index ) => (
            <Link key={ index } href="#!" variant={ variant }>
                Hello
            </Link>
        ) ) }
    </Flex>
);

LinkExternal

navigation-linkexternal · ./src/system/LinkExternal/LinkExternal.stories.tsx
Info
No description found. Write a jsdoc comment such as /** Component description */.
Prop types (react-docgen-typescript) 5 prop types
Component: src/system/LinkExternal/LinkExternal.tsx::default
Props:
/**
 * Include default text which reads as: `link, <link text>, external link`
 * or if `newTab` is `true`, reads as: `link, <link text>, external link, opens in a new tab`
 */
defaultScreenReaderText?: boolean

/**
 * If link should open in a new tab.
 */
newTab?: boolean = false

/**
 * Additional text to include after `defaultScreenReaderText` if enabled.
 */
screenReaderText?: string | number

/**
 * Optional arrow icon.
 */
showExternalIcon?: boolean = true

/**
 * The visual style variant of the link. Button variants render the link styled as a button.
 */
variant?: "primary" | "button-primary" | "button-secondary" | "button-tertiary" | "button-ghost" | "button-display" | "button-danger" = 'primary'
Imports
import { LinkExternal } from "@automattic/vip-design-system";
Default story ok
const Default = () => <LinkExternal href="https://github.com/Automattic/vip-design-system">View on GitHub</LinkExternal>;

MobileMenu

navigation-mobilemenu · ./src/system/MobileMenu/MobileMenu.stories.tsx
A full-screen mobile navigation drawer with a logo header and navigation items. Designed to be used inside a MobileMenuWrapper with a MobileMenuTrigger.
Prop types (react-docgen-typescript) 2 prop types
Component: src/system/MobileMenu/MobileMenu.tsx::MobileMenu
Props:
/**
 * The main navigation content displayed below the toolbar items.
 */
children: ReactNode

/**
 * Optional toolbar links rendered at the top of the mobile menu in an inverse nav.
 */
toolbarItems?: ReactNode
Imports
import { AiOutlineLock } from "react-icons/ai";
import {
    BiBell,
    BiBulb,
    BiCodeAlt,
    BiData,
    BiGridAlt,
    BiHistory,
    BiTachometer,
    BiWindows,
} from "react-icons/bi";
import { Flex, MobileMenu, MobileMenuTrigger, MobileMenuWrapper, Nav, NavItem } from "@automattic/vip-design-system";
import { MdOutlinePhotoLibrary } from "react-icons/md";
Primary story ok
const Primary = () => (
    <MobileMenuWrapper>
        <MobileMenuTrigger label="Menu" variant="primary" display={ [ 'flex', 'flex', 'flex' ] } />
        <MobileMenu>
            <Flex sx={ { gap: 3, px: 5, py: 3, flexDirection: 'column' } }>
                <Nav.Menu label="Nav Menu">
                    <NavItem.Menu href="https://wordpress.com" as={ CustomLink }>
                        Overview
                    </NavItem.Menu>
                    <NavItem.Menu href="https://newrelic.com/" as={ CustomLink }>
                        New Relic
                    </NavItem.Menu>
                </Nav.Menu>
            </Flex>
        </MobileMenu>
    </MobileMenuWrapper>
);
Mobile Menu Content story ok
const MobileMenuContent = () => (
	<MobileMenuWrapper>
		<MobileMenuTrigger label="Menu" variant="primary" display={ [ 'flex', 'flex', 'flex' ] } />
		<MobileMenu
			toolbarItems={
				<>
					<NavItem.MenuInverse href="/apps" active as={ CustomLink }>
						My Applications
					</NavItem.MenuInverse>

					<NavItem.MenuInverse href="/orgs" as={ CustomLink }>
						My Organizations
					</NavItem.MenuInverse>
				</>
			}
		>
			<Flex
				sx={ {
					gap: 3,
					px: 5,
					py: 0,
					flexDirection: 'column',
				} }
			>
				<Nav.Menu sx={ { mb: 4 } } label="Nav Menu">
					<NavItem.Menu
						href="https://wordpress.com"
						renderIcon={ size => <BiGridAlt size={ size } /> }
						as={ CustomLink }
					>
						Overview
					</NavItem.Menu>
					<NavItem.Menu
						as={ CustomLink }
						href="https://random-website.com/"
						renderIcon={ size => <BiWindows size={ size } /> }
					>
						Network Sites
					</NavItem.Menu>
					<NavItem.Menu
						as={ CustomLink }
						href="https://random-website.com/"
						renderIcon={ size => <AiOutlineLock size={ size } /> }
					>
						Domains & TLS
					</NavItem.Menu>

					<NavItem.MenuGroup active label="Logs" renderIcon={ size => <BiHistory size={ size } /> }>
						<NavItem.Menu as={ CustomLink } href="https://google.com/">
							Audit
						</NavItem.Menu>
						<NavItem.Menu active as={ CustomLink } href="https://wpvip.com/">
							Runtime
						</NavItem.Menu>
						<NavItem.Menu as={ CustomLink } href="https://dashboard.wpvip.com/">
							Slow Query
						</NavItem.Menu>
					</NavItem.MenuGroup>

					<NavItem.MenuGroup
						label="Performance"
						renderIcon={ size => <BiTachometer size={ size } /> }
					>
						<NavItem.Menu as={ CustomLink } href="https://random-website.com/">
							Metrics
						</NavItem.Menu>
						<NavItem.Menu as={ CustomLink } href="https://random-website.com/">
							Monitor
						</NavItem.Menu>
						<NavItem.Menu as={ CustomLink } href="https://random-website.com/">
							Cache
						</NavItem.Menu>
					</NavItem.MenuGroup>
					<NavItem.Menu
						as={ CustomLink }
						href="https://random-website.com/"
						renderIcon={ size => <BiCodeAlt size={ size } /> }
					>
						Code [v]
					</NavItem.Menu>
					<NavItem.Menu
						as={ CustomLink }
						href="https://random-website.com/"
						renderIcon={ size => <BiData size={ size } /> }
					>
						Database [v]
					</NavItem.Menu>
					<NavItem.Menu
						as={ CustomLink }
						href="https://random-website.com/"
						renderIcon={ size => <MdOutlinePhotoLibrary size={ size } /> }
					>
						Media [v]
					</NavItem.Menu>
					<NavItem.Menu
						as={ CustomLink }
						href="https://random-website.com/"
						renderIcon={ size => <BiBell size={ size } /> }
					>
						Notifications
					</NavItem.Menu>
					<NavItem.Menu
						as={ CustomLink }
						href="https://random-website.com/"
						renderIcon={ size => <BiBulb size={ size } /> }
					>
						Features
					</NavItem.Menu>
				</Nav.Menu>
			</Flex>
		</MobileMenu>
	</MobileMenuWrapper>
);
Mobile Menu Example story ok
const MobileMenuExample = () => <MobileMenuContent />;
Default story ok
const Default = () => <MobileMenuContent />;

Nav

navigation-nav · ./src/system/Nav/Nav.stories.tsx
Navigation component with multiple style variants built on Radix UI NavigationMenu. Use the appropriate sub-component for each context (Primary, Tab, Toolbar, Menu).
Imports
import { AiOutlineLock } from "react-icons/ai";
import {
    BiBell,
    BiBulb,
    BiCodeAlt,
    BiData,
    BiGridAlt,
    BiHistory,
    BiTachometer,
    BiWindows,
} from "react-icons/bi";
import { MdOutlinePhotoLibrary } from "react-icons/md";
import { Nav, NavItem } from "@automattic/vip-design-system";
Primary story ok
const Primary = () => (
    <Nav.Primary label="Nav Primary">
        <NavItem.Primary active as={ CustomLink } href="https://random-website.com/">
            PHP
        </NavItem.Primary>
        <NavItem.Primary as={ CustomLink } href="https://wordpress.com">
            WordPress
        </NavItem.Primary>
        <NavItem.Primary as={ CustomLink } href="https://newrelic.com/">
            New Relic
        </NavItem.Primary>
    </Nav.Primary>
);
Default story ok
const Default = () => (
    <>
        <p>
            <strong>Variant: Primary</strong>
        </p>
        <Nav.Primary sx={ { mb: 4 } } label="Nav Primary">
            <NavItem.Primary active as={ CustomLink } href="https://random-website.com/">
                PHP
            </NavItem.Primary>
            <NavItem.Primary as={ CustomLink } href="https://wordpress.com">
                WordPress
            </NavItem.Primary>
            <NavItem.Primary as={ CustomLink } href="https://newrelic.com/">
                New Relic
            </NavItem.Primary>
            <NavItem.Primary disabled as={ CustomLink } href="https://google.com/">
                Not accessible
            </NavItem.Primary>
        </Nav.Primary>
    </>
);
Tab story ok
const Tab = () => (
    <>
        <p>
            <strong>Variant: Tab</strong>
        </p>
        <Nav.Tab sx={ { mb: 4 } } label="Nav Tab">
            <NavItem.Tab as={ CustomLink } href="#!">
                PHP
            </NavItem.Tab>
            <NavItem.Tab as={ CustomLink } href="#2!">
                WordPress
            </NavItem.Tab>
            <NavItem.Tab active as={ CustomLink } href="#3!">
                New Relic
            </NavItem.Tab>
            <NavItem.Tab as={ CustomLink } href="#4!">
                Datadog
            </NavItem.Tab>
            <NavItem.Tab as={ CustomLink } href="#4!">
                OnePlus
            </NavItem.Tab>
            <NavItem.Tab as={ CustomLink } href="#5!">
                Rollbar
            </NavItem.Tab>
            <NavItem.Tab disabled as={ CustomLink } href="#6!">
                Not accessible
            </NavItem.Tab>
        </Nav.Tab>
    </>
);
Menu story ok
const Menu = () => (
    <>
        <p>
            <strong>Variant: Menu</strong>. This menu takes full width by default. You can put it in a
            container with constrained width..
        </p>

        <Nav.Menu sx={ { mb: 4 } } label="Nav Menu">
            <NavItem.Menu
                href="https://wordpress.com"
                renderIcon={ size => <BiGridAlt size={ size } /> }
                as={ CustomLink }
            >
                Overview
            </NavItem.Menu>
            <NavItem.Menu
                as={ CustomLink }
                href="https://random-website.com/"
                renderIcon={ size => <BiWindows size={ size } /> }
            >
                Network Sites
            </NavItem.Menu>
            <NavItem.Menu
                as={ CustomLink }
                href="https://random-website.com/"
                renderIcon={ size => <AiOutlineLock size={ size } /> }
            >
                Domains & TLS
            </NavItem.Menu>

            <NavItem.MenuGroup
                active
                activeChildren
                label="Logs"
                renderIcon={ size => <BiHistory size={ size } /> }
            >
                <NavItem.Menu active as={ CustomLink } href="https://google.com/">
                    Audit
                </NavItem.Menu>
                <NavItem.Menu as={ CustomLink } href="https://wpvip.com/">
                    Runtime
                </NavItem.Menu>
                <NavItem.Menu as={ CustomLink } href="https://dashboard.wpvip.com/">
                    Slow Query
                </NavItem.Menu>
            </NavItem.MenuGroup>

            <NavItem.MenuGroup
                label="Performance"
                renderIcon={ size => <BiTachometer size={ size } /> }
            >
                <NavItem.Menu as={ CustomLink } href="https://random-website.com/">
                    Metrics
                </NavItem.Menu>
                <NavItem.Menu as={ CustomLink } href="https://random-website.com/">
                    Monitor
                </NavItem.Menu>
                <NavItem.Menu as={ CustomLink } href="https://random-website.com/">
                    Cache
                </NavItem.Menu>
            </NavItem.MenuGroup>
            <NavItem.Menu
                as={ CustomLink }
                href="https://random-website.com/"
                renderIcon={ size => <BiCodeAlt size={ size } /> }
            >
                Code [v]
            </NavItem.Menu>
            <NavItem.Menu
                as={ CustomLink }
                href="https://random-website.com/"
                renderIcon={ size => <BiData size={ size } /> }
            >
                Database [v]
            </NavItem.Menu>
            <NavItem.Menu
                as={ CustomLink }
                href="https://random-website.com/"
                renderIcon={ size => <MdOutlinePhotoLibrary size={ size } /> }
            >
                Media [v]
            </NavItem.Menu>
            <NavItem.Menu
                as={ CustomLink }
                href="https://random-website.com/"
                renderIcon={ size => <BiBell size={ size } /> }
            >
                Notifications
            </NavItem.Menu>
            <NavItem.Menu
                as={ CustomLink }
                href="https://random-website.com/"
                renderIcon={ size => <BiBulb size={ size } /> }
            >
                Features
            </NavItem.Menu>
        </Nav.Menu>
    </>
);
Menu Inverse story ok
const MenuInverse = () => (
    <>
        <p>
            <strong>Variant: Menu</strong>. This menu takes full width by default. You can put it in a
            container with constrained width..
        </p>

        <Nav.Toolbar label="Main" orientation="vertical">
            <NavItem.MenuInverse active href="https://googles.com" as={ CustomLink }>
                My Applications
            </NavItem.MenuInverse>
            { /* Example below if you have Next.js <Link /> */ }
            <NavItem.MenuInverse href="https://google.com" as={ CustomLink }>
                Custom Link
            </NavItem.MenuInverse>
        </Nav.Toolbar>
    </>
);

NewConfirmationDialog

dialog-newconfirmationdialog · ./src/system/NewConfirmationDialog/NewConfirmationDialog.stories.jsx
Info
No description found. Write a jsdoc comment such as /** Component description */.
Prop types (react-docgen-typescript) 8 prop types
Component: src/system/index.ts::NewConfirmationDialog
Props:
body?: string

buttonDisabled?: boolean = false

buttonVariant?: any = danger

label?: any = Confirm

needsConfirm?: boolean = true

onConfirm: any

title: any

trigger: any
Imports
import { Box, Button, NewConfirmationDialog } from "@automattic/vip-design-system";
Default story ok
const Default = () => {
    const [ answer, setAnswer ] = React.useState( '🤔' );

    return (
        <Box>
            <p>Confirm that your name is John doe?</p>
            <NewConfirmationDialog
                className="storybook-confirmation-dialog"
                title="Are you John Doe?"
                buttonVariant="danger"
                description="Please confirm that your name is John Doe."
                trigger={ConfirmationTrigger}
                body="A modal is used to perform more detailed actions that don't necessarily need the context behind."
                needsConfirm
                onConfirm={ () => setAnswer( '👍' ) } />
            <p>Answer: { answer }</p>
        </Box>
    );
};

NewDialog.Root

dialog-newdialog · ./src/system/NewDialog/NewDialog.stories.jsx
A modal dialog component built on Radix UI Dialog primitives. Supports a trigger element, title, description, and custom content with an optional close callback.
Prop types (react-docgen-typescript) 9 prop types
Component: src/system/NewDialog/index.ts::default
Props:
/**
 * Additional CSS class name for the dialog content wrapper.
 */
className?: string = null

/**
 * The main content of the dialog, or a render function receiving an `onClose` callback.
 */
content?: ReactNode | (({ onClose }: { onClose: () => void; }) => ReactNode) = null

/**
 * Props forwarded to the underlying Radix Dialog.Content element.
 */
contentProps?: DialogContentProps = {}

/**
 * A short description displayed below the title.
 */
description: ReactNode

/**
 * When true, the dialog renders nothing.
 */
disabled?: boolean = false

/**
 * Whether to display the title and description visually.
 */
showHeading?: boolean = true

/**
 * Custom Theme UI styles applied to the dialog content wrapper.
 */
style?: ThemeUIStyleObject

/**
 * The title displayed at the top of the dialog.
 */
title: ReactNode

/**
 * The element that opens the dialog when clicked.
 */
trigger?: ReactNode = null
Imports
import { Button, Input, Label, Close, Root, Text } from "@automattic/vip-design-system";
Default story ok
const Default = () => <>
    <Text sx={ { fontSize: 3, mb: 3 } }>Regular Dialog where the title and description are built-in and the content is provided by
                        the user.
                    </Text>
    <NewDialog.Root trigger={<Button>Trigger Dialog</Button>} />
</>;
Hidden Headings story ok
const HiddenHeadings = () => <>
    <Text sx={ { fontSize: 3, mb: 3 } }>Title and description are hidden, but still announced using a screen reader. Activate
                        VoiceOver or any similar screen reader to listen to: Custom dialog title, Description of the
                        dialog content.
                    </Text>
    <NewDialog.Root
        trigger={<Button>Trigger Dialog</Button>}
        title="Custom dialog title"
        showHeading={false}
        content={(<div>
            <h3>My Custom Content</h3>
            <form>
                <Label htmlFor="username">User name</Label>
                <Input type="text" name="username" id="username" />
                <Button type="submit">Submit</Button>
            </form>
            <h3>Continue here</h3>
            <p>This is an example.</p>
        </div>)} />
</>;
Custom Styling story ok
const CustomStyling = () => <>
    <Text sx={ { fontSize: 3, mb: 3 } }>Custom Styling on Dialog Content</Text>
    <NewDialog.Root
        trigger={<Button>Trigger Dialog</Button>}
        title="Custom dialog title"
        style={{
			background: theme => `${ theme.colors.primary }`,
			padding: 5,
			borderRadius: 20,
			h2: { fontSize: 4, color: theme => `${ theme.colors.text }` },
			h3: { fontSize: 3, color: theme => `${ theme.colors.heading }` },
			p: { color: 'white' },
			'button[type="button"]:focus-visible': { outlineColor: 'white', color: 'white' },
		}}
        content={(<div>
            <h3>This is Read because it is Custom</h3>
            <p>This Dialog is styled using the `sx` property.</p>
        </div>)} />
</>;
Custom Close story ok
const CustomClose = () => <>
    <Text sx={ { fontSize: 3, mb: 3 } }>This example shows how you can create a custom Close trigger to your dialog
                    </Text>
    <NewDialog.Root
        trigger={<Button>Trigger Dialog</Button>}
        content={(<div>
            <NewDialog.Close>
                <Button>Close here instead</Button>
            </NewDialog.Close>
        </div>)} />
</>;
Custom State Management story ok
const CustomStateManagement = () => {
    const [ open, setOpen ] = useState( false );
    return (
        <>
            <Text sx={ { fontSize: 3, mb: 3 } }>
                This example shows how you can create a custom state management. To achieve accessibility,
                you need to control the <strong>open</strong> state, but also keep consistency using the{ ' ' }
                <strong>onOpenChange</strong> attribute.
            </Text>

            <NewDialog.Root
                { ...defaultProps }
                open={ open }
                onOpenChange={ status => {
                    // eslint-disable-next-line no-console
                    console.log( 'New status changed', status );

                    setOpen( ! open );
                } }
                trigger={ <Button>Trigger Dialog</Button> }
                content={
                    <div sx={ { mt: 2 } }>
                        <NewDialog.Close>
                            <Button>Close here instead</Button>
                        </NewDialog.Close>
                    </div>
                }
            />
        </>
    );
};
Custom On Close story ok
const CustomOnClose = () => <>
    <Text sx={ { fontSize: 3, mb: 3 } }>This example shows how you can use the content as a function to use the onClose method (same
                        behavior as the original Dialog component).
                    </Text>
    <NewDialog.Root
        trigger={<Button>Trigger Dialog</Button>}
        content={ ( { onClose } ) => (
            <div sx={ { mt: 2 } }>
                <Button onClick={ onClose }>Close here instead</Button>
            </div>
        ) } />
</>;

NewTooltip

newtooltip · ./src/system/NewTooltip/NewTooltip.stories.tsx
Internal dependencies
Prop types (react-docgen-typescript) 10 prop types
Component: src/system/index.ts::NewTooltip
Props:
/**
 * Whether to display a directional arrow on the tooltip.
 */
arrow?: boolean = false

/**
 * The element that triggers the tooltip on hover/focus.
 */
children: ReactElement<unknown, string | JSXElementConstructor<any>>

/**
 * Additional CSS class name applied to the tooltip content.
 */
className?: string

/**
 * The content displayed inside the tooltip.
 */
content: ReactNode

/**
 * Duration in milliseconds before the tooltip appears on hover.
 */
delayDuration?: number = 300

/**
 * Callback fired when the tooltip open state changes.
 */
onOpenChange?: ((open: boolean) => void)

/**
 * Controls the open state of the tooltip when used as a controlled component.
 */
open?: boolean

/**
 * The preferred side of the trigger to render the tooltip.
 */
position?: "bottom" | "left" | "right" | "top" = top

/**
 * Custom offset distance (in pixels) between the trigger and the tooltip.
 */
sideOffset?: number

/**
 * Theme UI style overrides for the tooltip content.
 */
sx?: ThemeUIStyleObject
Imports
import { Button, Grid, Heading, NewTooltip, Text } from "@automattic/vip-design-system";
Primary story ok
const Primary = () => <NewTooltip content="Tooltip text" position="top" arrow>
    <Button>Hover me</Button>
</NewTooltip>;
Basic story ok
const Basic = () => (
    <>
        <Heading variant="h2">Basic Usage</Heading>
        <Text sx={ { mb: 4 } }>A simple tooltip with plain text content on each position.</Text>
        <Grid
            columns={ [ 'auto auto' ] }
            gap={ '100px 160px' }
            sx={ { justifyContent: 'center', pt: '50px' } }
        >
            <NewTooltip content="At the top" position="top">
                <Button>Top</Button>
            </NewTooltip>

            <NewTooltip content="At the bottom" position="bottom">
                <Button>Bottom</Button>
            </NewTooltip>

            <NewTooltip content="On the left" position="left">
                <Button>Left</Button>
            </NewTooltip>

            <NewTooltip content="On the right" position="right">
                <Button>Right</Button>
            </NewTooltip>
        </Grid>
    </>
);
With Arrow story ok
const WithArrow = () => (
    <>
        <Heading variant="h2">With Arrow</Heading>
        <Text sx={ { mb: 4 } }>Enable the arrow indicator pointing to the trigger element.</Text>
        <Grid
            columns={ [ 'auto auto' ] }
            gap={ '100px 160px' }
            sx={ { justifyContent: 'center', pt: '50px' } }
        >
            <NewTooltip content="At the top with arrow" position="top" arrow>
                <Button>Top</Button>
            </NewTooltip>

            <NewTooltip content="At the bottom with arrow" position="bottom" arrow>
                <Button>Bottom</Button>
            </NewTooltip>

            <NewTooltip content="On the left with arrow" position="left" arrow>
                <Button>Left</Button>
            </NewTooltip>

            <NewTooltip content="On the right with arrow" position="right" arrow>
                <Button>Right</Button>
            </NewTooltip>
        </Grid>
    </>
);
Rich Content story ok
const RichContent = () => (
    <>
        <Heading variant="h2">Rich Content</Heading>
        <Text sx={ { mb: 4 } }>
            NewTooltip supports ReactNode content, including HTML elements like{ ' ' }
            <code>&lt;strong&gt;</code> and <code>&lt;br /&gt;</code>.
        </Text>
        <Grid
            columns={ [ 'auto auto' ] }
            gap={ '100px 160px' }
            sx={ { justifyContent: 'center', pt: '50px' } }
        >
            <NewTooltip
                content={
                    <>
                        Press <strong>Enter</strong>
                        <br />
                        to confirm
                    </>
                }
                arrow
            >
                <Button>With bold and line break</Button>
            </NewTooltip>

            <NewTooltip
                content={
                    <>
                        <strong>Tip:</strong> Use keyboard shortcuts for faster navigation
                    </>
                }
                arrow
            >
                <Button>With bold label</Button>
            </NewTooltip>
        </Grid>
    </>
);
All Positions story ok
const AllPositions = () => (
    <>
        <Heading variant="h2">All Positions</Heading>
        <Text sx={ { mb: 4 } }>All four positions with and without arrows.</Text>
        <Grid
            columns={ [ 'auto auto' ] }
            gap={ '100px 160px' }
            sx={ { justifyContent: 'center', pt: '50px' } }
        >
            <NewTooltip content="At the top" position="top">
                <Button>Top</Button>
            </NewTooltip>

            <NewTooltip content="At the top with arrow" position="top" arrow>
                <Button>Top with Arrow</Button>
            </NewTooltip>

            <NewTooltip content="At the bottom" position="bottom">
                <Button>Bottom</Button>
            </NewTooltip>

            <NewTooltip content="At the bottom with arrow" position="bottom" arrow>
                <Button>Bottom with Arrow</Button>
            </NewTooltip>

            <NewTooltip content="On the left" position="left">
                <Button>Left</Button>
            </NewTooltip>

            <NewTooltip content="On the left with arrow" position="left" arrow>
                <Button>Left with Arrow</Button>
            </NewTooltip>

            <NewTooltip content="On the right" position="right">
                <Button>Right</Button>
            </NewTooltip>

            <NewTooltip content="On the right with arrow" position="right" arrow>
                <Button>Right with Arrow</Button>
            </NewTooltip>
        </Grid>
    </>
);

Notice

notice · ./src/system/Notice/Notice.stories.tsx
A contextual banner for displaying informational, warning, error, or success messages.
Prop types (react-docgen-typescript) 7 prop types
Component: src/system/index.ts::Notice
Props:
/**
 * Custom ARIA content ID for the collapsible region.
 */
ariaContentId?: string

/**
 * When true, renders the notice as a collapsible section with a toggle header.
 */
collapsible?: boolean = false

/**
 * Whether the collapsible content is expanded on initial render.
 */
defaultOpen?: boolean = false

/**
 * HTML element type used for the heading.
 */
headingVariant?: ElementType<any, keyof IntrinsicElements> = p

/**
 * When true, renders the notice with a transparent background.
 */
inline?: boolean = false

/**
 * Theme UI style overrides applied to the root element.
 */
sx?: ThemeUIStyleObject = {}

/**
 * Color variant that determines the icon and visual style.
 */
variant?: ColorVariants = warning
Imports
import { Heading, Link, Notice } from "@automattic/vip-design-system";
import React from "react";
Primary story ok
const Primary = () => <Notice title="Notice title" variant="info" inline={false}>This is an informational notice message.</Notice>;
Default story ok
const Default = () => (
    <React.Fragment>
        <Notice
            variant="alert"
            headingVariant="h2"
            sx={ { mb: 4 } }
            title="Your site is ready to launch!"
        >
            It looks like you&lsquo;re ready to share your{ ' ' }
            <Link href="https://google.com/">application with the world.</Link>
        </Notice>

        <Notice variant="success" sx={ { mb: 4 } }>
            It looks like you&lsquo;re ready to share your{ ' ' }
            <Link href="https://google.com/">application with the world.</Link>
        </Notice>

        <Notice sx={ { mb: 4 } } title="This notice has only the title prop passed">
            It looks like you&lsquo;re ready to share your{ ' ' }
            <Link href="https://google.com/">application with the world.</Link>
        </Notice>

        <Notice variant="success" sx={ { mb: 4 } } title="You made it!">
            It looks like you&lsquo;re ready to share your{ ' ' }
            <Link href="https://google.com/">application with the world.</Link>
        </Notice>

        <Notice variant="info" sx={ { mb: 4 } } title="Please read this first">
            This notice has a title and children and{ ' ' }
            <Link href="/?path=/story/avatar--default">A link to Avatar</Link>
        </Notice>

        <Notice variant="alert" sx={ { mb: 4 } } title="Please read this first">
            This notice has a title and children and{ ' ' }
            <Link href="/?path=/story/avatar--default">A link to Avatar</Link>
        </Notice>

        <Notice
            variant="alert"
            sx={ { mb: 2 } }
            title="There are errors in your form"
            headingVariant="h2"
        >
            <ul sx={ { m: 0, pl: 3 } }>
                <li>
                    <Link href="#name">Please enter your name.</Link>
                </li>
                <li>
                    <Link href="#email">Please enter your email address.</Link>
                </li>
                <li>
                    <Link href="#terms">Please agree to the terms.</Link>
                </li>
            </ul>
        </Notice>

        <Notice variant="alert" sx={ { mb: 2 } }>
            <>
                <Heading variant={ 'h4' } sx={ { fontSize: 2 } }>
                    Alternative way of printing errors
                </Heading>

                <ul sx={ { m: 0, pl: 3 } }>
                    <li>
                        <Link href="#name">Please enter your name.</Link>
                    </li>
                    <li>
                        <Link href="#email">Please enter your email address.</Link>
                    </li>
                </ul>
            </>
        </Notice>

        <Notice variant="alert" sx={ { mb: 4 } }>
            Bucket names in Amazon S3 are globally unique, external link ↗. To ensure that shipped data
            is delivered to the correct location, the Bucket Name and Bucket Region entered below must
            match the details used to set up your S3 bucket, external link ↗.
            <Link href="/?path=/story/avatar--default">A link to Avatar</Link>
        </Notice>

        <Notice variant="success" sx={ { mb: 4 } } title="Collapsible Notice" collapsible>
            Bucket names in Amazon S3 are globally unique.{ ' ' }
            <Link href="/?path=/story/avatar--default">A link to Avatar</Link>
        </Notice>

        <Notice
            variant="info"
            sx={ { mb: 4 } }
            title="Collapsible Notice Auto-Expanded"
            collapsible
            defaultOpen
        >
            Bucket names in Amazon S3 are globally unique.
        </Notice>
    </React.Fragment>
);

OptionRow

optionrow · ./src/system/OptionRow/OptionRow.stories.jsx
Info
No description found. Write a jsdoc comment such as /** Component description */.
Imports
import { BiAddToQueue, BiBellMinus, BiCalendarHeart } from "react-icons/bi";
import { Box, OptionRow } from "@automattic/vip-design-system";
Primary story ok
const Primary = () => <OptionRow
    label="Option Row"
    subTitle="Mostly used to link off to other pages."
    as="a"
    href="http://google.com/"
    variant="default" />;
Default story ok
const Default = () => <Base />;
Alternative story ok
const Alternative = () => <Base variant="alt" />;
With Meta story ok
const WithMeta = () => (
    <Box>
        <OptionRow
            image={ <BiAddToQueue size={ 24 } /> }
            label="Option Row 1"
            subTitle="Build changes from def5fee229ecda72382e7d881305b572417a53b8 https://github.com/wpcomvip/my-repo/actions/runs/6883309086"
            as="div"
            href="http://google.com/"
            meta="Meta text"
        />
        <OptionRow
            image={ <BiCalendarHeart size={ 24 } /> }
            label="Option Row 2"
            subTitle="Build changes from def5fee229ecda72382e7d881305b572417a53b8 https://github.com/wpcomvip/my-repo/actions/runs/6883309086"
            as="div"
            href="http://google.com/"
            order={ 2 }
            meta="Meta text"
        />
    </Box>
);

Pagination

pagination · ./src/system/Pagination/Pagination.stories.tsx
A pagination control for navigating through paged content. Shows page-number buttons by default, or a compact dropdown when `compact` is true.
Prop types (react-docgen-typescript) 15 prop types
Component: src/system/Pagination/Pagination.tsx::Pagination
Props:
/**
 * Slot for variant-specific content (page numbers, arrows, etc.).
 */
children?: ReactNode

/**
 * Additional CSS class name for the pagination container.
 */
className?: string

/**
 * When true, shows a compact dropdown page selector instead of individual page buttons.
 */
compact?: boolean = false

/**
 * The currently active page number (1-based).
 */
currentPage: number

/**
 * Whether to show the items-per-page dropdown selector.
 */
displayItemsPerPageSelector?: boolean = false

/**
 * Whether there is a next page available. Used for open-ended pagination without totalPages.
 */
hasNextPage?: boolean

/**
 * Number of items displayed per page.
 */
itemsPerPage: number

/**
 * The maximum page number that can be reached. Used for open-ended pagination without totalPages.
 */
maxReachablePage?: number

/**
 * Callback fired when the user changes the items-per-page value.
 */
onItemsPerPageChange: (itemsPerPage: number) => void

/**
 * Callback fired when the user navigates to a different page.
 */
onPageChange: (page: number) => void

/**
 * Available page size options for the items-per-page selector.
 */
pageSizeOptions?: number[] = [20, 50, 100]

/**
 * Theme UI style overrides.
 */
sx?: ThemeUIStyleObject

/**
 * Total number of items across all pages. Used to compute totalPages if not provided.
 */
totalItems?: number

/**
 * Total number of pages. Takes precedence over totalItems for page count.
 */
totalPages?: number

/**
 * Display variant. Use 'compact' for dropdown page selector. Equivalent to the `compact` prop.
 * @deprecated Use the `compact` prop instead, or `SimplePagination` for cursor-based navigation.
 */
variant?: "full" | "compact" = 'full'
Imports
import { Badge, Flex, Pagination, Text } from "@automattic/vip-design-system";
Primary story ok
const Primary = () => <Pagination
    currentPage={1}
    totalItems={200}
    itemsPerPage={20}
    displayItemsPerPageSelector={false} />;
Default story ok
const Default = () => <PaginationWithState />;
Compact story ok
const Compact = () => <PaginationWithState compact />;
Few Pages story ok
const FewPages = () => <PaginationWithState totalItems={ 200 } initialItemsPerPage={ 10 } />;
Middle Page story ok
const MiddlePage = () => (
    <PaginationWithState totalItems={ 500 } initialItemsPerPage={ 10 } initialPage={ 25 } />
);
Custom Page Sizes story ok
const CustomPageSizes = () => (
    <PaginationWithState
        totalItems={ 1000 }
        initialItemsPerPage={ 25 }
        pageSizeOptions={ [ 25, 50, 100, 250 ] }
    />
);
With Items Per Page Selector story ok
const WithItemsPerPageSelector = () => (
    <PaginationWithState
        totalItems={ 100 }
        initialItemsPerPage={ 25 }
        displayItemsPerPageSelector={ true }
    />
);
Open Ended Cursor Based story ok
const OpenEndedCursorBased = () => <CursorBasedPaginationWithState />;
Open Ended story ok
const OpenEnded = () => <OpenEndedPaginationWithState />;
Open Ended Compact story ok
const OpenEndedCompact = () => <OpenEndedPaginationWithState compact />;
Open Ended Last Page story ok
const OpenEndedLastPage = () => <OpenEndedPaginationWithState hasNextPage={ false } initialPage={ 15 } />;

Progress

progress · ./src/system/Progress/Progress.stories.tsx
A step-based progress bar that displays the current step label and a completion indicator.
Prop types (react-docgen-typescript) 4 prop types
Component: src/system/index.ts::Progress
Props:
/**
 * Zero-based index of the currently active step.
 */
activeStep: number

/**
 * Additional CSS class name.
 */
className?: string

/**
 * Accessible label for the progress bar element.
 */
forLabel?: string

/**
 * Array of step labels describing each stage of the progress.
 */
steps: string[]
Imports
import { Progress } from "@automattic/vip-design-system";
Default story ok
const Default = () => {
    const [ counter, setCounter ] = React.useState( args.activeStep );
    const steps = args.steps;

    useEffect( () => {
        setTimeout( () => {
            if ( counter < steps.length - 1 ) {
                setCounter( counter + 1 );
            }
        }, 2000 );
    }, [ counter, setCounter ] );

    return (
        <Progress
            forLabel="Update site progress"
            steps={[ 'Downloading Data', 'Importing Data...', 'Finalizing', 'Done' ]}
            activeStep={ counter } />
    );
};

Radio

form-radio · ./src/system/Form/Radio/Radio.stories.tsx
Info
No description found. Write a jsdoc comment such as /** Component description */.
Prop types (react-docgen-typescript) 7 prop types
Component: src/system/Form/Radio/Radio.tsx::Radio
Props:
/**
 * Additional CSS class name.
 */
className?: string

/**
 * The initially selected value.
 */
defaultValue?: string | number

/**
 * Disables all radio options.
 */
disabled?: boolean = false

/**
 * The HTML name attribute shared by all radio inputs in the group.
 */
name?: string

/**
 * Callback fired when the selected option changes.
 */
onChange?: ((e: ChangeEvent<HTMLInputElement, Element>, option?: RadioOptionOptionProps) => void)

/**
 * The list of radio options to render.
 */
options?: RadioOptionOptionProps[] = []

/**
 * The visual style variant.
 */
variant?: "disabled" | "primary" | "success" | "brand" = primary
Imports
import { Box, Flex, Form, Heading, Label, Link, Radio } from "@automattic/vip-design-system";
Primary story ok
const Primary = () => <Radio
    name="primary_example"
    variant="primary"
    defaultValue="option-a"
    options={[
        { id: 'option-a', value: 'option-a', label: 'Option A' },
        { id: 'option-b', value: 'option-b', label: 'Option B' },
        { id: 'option-c', value: 'option-c', label: 'Option C' },
    ]} />;
Default story ok
const Default = () => {
    const [ checked, setChecked ] = useState< { [ key: string ]: string } >( {} );
    const toggleChecked = ( radioName: string, value: string = '' ) => {
        setChecked( {
            ...checked,
            [ radioName ]: value,
        } );
    };

    return (
        <>
            { ( [ 'primary', 'brand' ] as RadioProps[ 'variant' ][] ).map( variant => (
                <Box key={ variant }>
                    <Heading as="h2" sx={ { textTransform: 'capitalize' } }>
                        { variant }
                    </Heading>

                    <Radio
                        variant={ variant }
                        onChange={ ( _, option ) =>
                            toggleChecked( `default_the_option_${ variant }`, option?.value )
                        }
                        name={ `default_the_option_${ variant }` }
                        defaultValue={
                            checked?.[ `default_the_option_${ variant }` ] || `${ variant }-option-a`
                        }
                        options={ [
                            {
                                id: `${ variant }-option-a`,
                                value: `${ variant }-option-a`,
                                label: `I am the ${ variant } option A`,
                            },
                            {
                                id: `${ variant }-option-b`,
                                value: `${ variant }-option-b`,
                                label: `I am the ${ variant } option B`,
                            },
                        ] }
                    />
                </Box>
            ) ) }
            <Box>
                <Heading as="h2" sx={ { textTransform: 'capitalize' } }>
                    disabled
                </Heading>

                <Radio
                    disabled
                    name="default_the_option_disabled"
                    defaultValue="disabled-option-a"
                    options={ [
                        {
                            id: `disabled-option-a`,
                            value: `disabled-option-a`,
                            label: `I am the  option A`,
                        },
                        {
                            id: `disabled-option-b`,
                            value: `disabled-option-b`,
                            label: `I am the  option B`,
                        },
                    ] }
                />
            </Box>
        </>
    );
};
Acessible Examples story ok
const AcessibleExamples = () => {
    return (
        <Form.Root>
            <p>
                Per recommendation, if you have a Radio button, use a Fieldset with a legend as wrapper to
                your options.{ ' ' }
                <Link href="https://a11y-collective.github.io/demos/en/accessible-code/form-fieldsets.html">
                    Reference to Form fieldsets
                </Link>
            </p>
            <Form.Fieldset>
                <Form.Legend sx={ { mb: 0, fontSize: 2, fontWeight: 'bold' } }>
                    Apply the policy to these domains
                </Form.Legend>

                <Flex sx={ { alignItems: 'center' } }>
                    <Radio
                        name="the_option"
                        defaultValue="a"
                        options={ [
                            {
                                value: 'a',
                                label: 'All domains listed on this environment, and all subdomains',
                                id: 'option-a',
                            },
                            {
                                value: 'b',
                                label: 'All domains listed on this environment',
                                id: 'option-b',
                            },
                        ] }
                    />
                </Flex>
            </Form.Fieldset>

            <Form.Fieldset>
                <Form.Legend sx={ { mb: 0, fontSize: 2, fontWeight: 'bold' } }>
                    With a custom Label (Potential A11Y issue, if you don&apos;t build manage the label
                    correctly)
                </Form.Legend>

                <Flex sx={ { alignItems: 'center' } }>
                    <Radio
                        name="the_option_custom"
                        defaultValue="a"
                        options={ [
                            {
                                value: 'a',
                                renderLabel: ( commonProps, labelStyle ) => (
                                    <Label
                                        { ...commonProps }
                                        className="custom-class"
                                        sx={ { ...labelStyle, color: 'error' } }
                                    >
                                        (Custom) All domains listed on this environment, and all subdomains
                                    </Label>
                                ),
                                id: 'another-option-custom-a',
                            },
                            {
                                value: 'b',
                                label: 'All domains listed on this environment',
                                labelProps: {
                                    id: 'label-option-custom-b-custom-props',
                                },
                                className: 'custom-class-for-this',
                                id: 'option-custom-b',
                                inputProps: {
                                    'aria-describedby': 'describe-radio-all-domains-subdomains',
                                },
                            },
                        ] }
                    />
                </Flex>
            </Form.Fieldset>

            <p id="describe-radio-all-domains-subdomains" sx={ { mt: 2 } }>
                This is a explanation for custom option b
            </p>

            <Form.Fieldset>
                <Form.Legend sx={ { mb: 0, fontSize: 2, fontWeight: 'bold' } }>
                    All disabled options
                </Form.Legend>

                <Flex sx={ { alignItems: 'center' } }>
                    <Radio
                        disabled
                        name="the_option_disabled"
                        defaultValue={ 'a_disabled' }
                        options={ [
                            {
                                value: 'a_disabled',
                                label: 'All domains listed on this environment, and all subdomains',
                                id: 'option-a_disabled',
                            },
                            {
                                value: 'b',
                                label: 'All domains listed on this environment',
                                id: 'option-b_disabled',
                            },
                        ] }
                    />
                </Flex>
            </Form.Fieldset>

            <Form.Fieldset>
                <Form.Legend sx={ { mb: 0, fontSize: 2, fontWeight: 'bold' } }>
                    Only one Disabled option
                </Form.Legend>

                <Flex sx={ { alignItems: 'center' } }>
                    <Radio
                        name="the_option_disabled_two"
                        defaultValue={ 'a_disabled_two' }
                        options={ [
                            {
                                value: 'a_disabled_two',
                                label: 'All domains listed on this environment, and all subdomains',
                                id: 'option-a_disabled_two',
                            },
                            {
                                disabled: true,
                                value: 'b',
                                label: 'All domains listed on this environment',
                                id: 'option-b_disabled_two',
                            },
                        ] }
                    />
                </Flex>
            </Form.Fieldset>
        </Form.Root>
    );
};

RadioBoxGroup

radioboxgroup · ./src/system/Form/RadioBoxGroup.stories.jsx
Info
No description found. Write a jsdoc comment such as /** Component description */.
Imports
import { RadioBoxGroup } from "@automattic/vip-design-system";
Primary story ok
const Primary = () => <RadioBoxGroup
    defaultValue="one"
    options={[
        {
            label: 'One',
            value: 'one',
            description:
                'This is a longer description that allows us to see the text wrap and determine if the line height is correct',
        },
        { label: 'Two', value: 'two', description: 'This is a description' },
        { label: 'Three', value: 'three', description: 'This is a description' },
    ]}
    optionWidth="300px" />;
Default story ok
const Default = () => {
    const [ value, setValue ] = useState( 'one' );
    return (
        <RadioBoxGroup
            defaultValue={ value }
            onChange={ e => setValue( e.target.value ) }
            options={ options }
            optionWidth="300px"
        />
    );
};
Errors story ok
const Errors = () => {
    const [ value, setValue ] = useState( null );

    return (
        <RadioBoxGroup
            defaultValue={ value }
            onChange={ e => setValue( e.target.value ) }
            options={ options }
            required
            groupLabel="Radio Box Group"
            hasError={ true }
            errorMessage="This is an error message"
        />
    );
};

RadioGroupChip

radiogroupchip · ./src/system/Form/RadioGroupChip.stories.tsx
Info
No description found. Write a jsdoc comment such as /** Component description */.
Prop types (react-docgen-typescript) 11 prop types
Component: src/system/Form/RadioGroupChip.tsx::RadioGroupChip
Props:
defaultValue?: string

disabled?: boolean

errorMessage?: string

groupLabel?: string

hasError?: boolean

name?: string

onChange: (e: ChangeEvent<HTMLInputElement, Element>, option?: Option | undefined) => void

options: Option[]

optionWidth?: string

required?: boolean

size?: "small" | "medium" = medium
Imports
import { RadioGroupChip } from "@automattic/vip-design-system";
Primary story ok
const Primary = () => <RadioGroupChip
    defaultValue="table"
    size="medium"
    options={[
        { label: 'Table', value: 'table' },
        { label: 'Grid', value: 'grid' },
    ]} />;
Medium Size story ok
const MediumSize = () => {
    const [ value, setValue ] = useState( 'table' );

    return (
        <RadioGroupChip
            defaultValue={ value }
            onChange={ e => setValue( e.target.value ) }
            options={ [
                {
                    label: 'Table',
                    value: 'table',
                },
                {
                    label: 'Grid',
                    value: 'grid',
                },
            ] }
        />
    );
};
Small Size story ok
const SmallSize = () => {
    const [ value, setValue ] = useState( 'table' );

    return (
        <RadioGroupChip
            defaultValue={ value }
            onChange={ e => setValue( e.target.value ) }
            options={ [
                {
                    label: 'Table',
                    value: 'table',
                },
                {
                    label: 'Grid',
                    value: 'grid',
                },
            ] }
            size="small"
        />
    );
};

Select

form-select · ./src/system/NewForm/FormSelect.stories.jsx
Info
No description found. Write a jsdoc comment such as /** Component description */.
Imports
import { Root, Select, Link } from "@automattic/vip-design-system";
Default story ok
const Default = props => <DefaultComponent { ...props } />;
Disabled story ok
const Disabled = props => <DefaultComponent { ...props } />;
With Errors story ok
const WithErrors = props => <DefaultComponent { ...props } />;
With Group story ok
const WithGroup = props => <DefaultComponent { ...props } />;
Is Inline story ok
const IsInline = props => <DefaultComponent { ...props } />;
With Option Label And Value story ok
const WithOptionLabelAndValue = props => <DefaultComponent { ...props } />;
With On Change story ok
const WithOnChange = () => {
    const [ option, setOption ] = useState( null );

    const onChange = useCallback( ( val, event ) =>
        setOption( { obj: val, eventValue: event.target.value } )
    );

    const onChangeArgs = {
        label: 'Select with onChange',
        placeholder: '- Select -',
        width: '100%',
        onChange,
        options: [ ...options, ...groupedOptions ],
    };

    return (
        <>
            <DefaultComponent onChange={ onChange } { ...onChangeArgs } />
            { option && <p>Object to JSON: { JSON.stringify( option.obj ) }</p> }
            { option && <p>Original Event Value: { option.eventValue }</p> }
        </>
    );
};

SimplePagination

simplepagination · ./src/system/Pagination/SimplePagination.stories.tsx
A pagination control with only previous/next arrow buttons. Designed for cursor-based pagination APIs with custom param names (e.g., `after`/`before`).
Prop types (react-docgen-typescript) 12 prop types
Component: src/system/Pagination/SimplePagination.tsx::SimplePagination
Props:
/**
 * Slot for variant-specific content (page numbers, arrows, etc.).
 */
children?: ReactNode

/**
 * Additional CSS class name for the pagination container.
 */
className?: string

/**
 * Whether to show the items-per-page dropdown selector.
 */
displayItemsPerPageSelector?: boolean = false

/**
 * Whether there is a next page available.
 */
hasNextPage?: boolean

/**
 * Whether there is a previous page available.
 */
hasPreviousPage?: boolean

/**
 * Number of items displayed per page.
 */
itemsPerPage?: number

/**
 * Navigation parameter for the next page.
 */
nextParam?: SimpleNavigationParam

/**
 * Callback fired when the user changes the items-per-page value.
 */
onItemsPerPageChange?: ((itemsPerPage: number) => void)

/**
 * Callback fired when the user navigates. Receives the param name and value.
 */
onNavigate: (param: string, value: string) => void

/**
 * Available page size options for the items-per-page selector.
 */
pageSizeOptions?: number[] = [20, 50, 100]

/**
 * Navigation parameter for the previous page.
 */
previousParam?: SimpleNavigationParam

/**
 * Theme UI style overrides.
 */
sx?: ThemeUIStyleObject
Imports
import { Badge, Flex, SimplePagination, Text } from "@automattic/vip-design-system";
Default story ok
const Default = () => <SimplePaginationWithState />;
First Page story ok
const FirstPage = () => <SimplePaginationWithState />;
Last Page story ok
const LastPage = () => <SimplePaginationWithState initialIndex={ pageTokens.length - 1 } />;
With Page Size story ok
const WithPageSize = () => <SimplePaginationWithState displayItemsPerPageSelector />;

Skeleton

skeleton · ./src/system/Skeleton/Skeleton.stories.tsx
A placeholder loading indicator that mimics the shape of content with a pulsing animation.
Prop types (react-docgen-typescript) 5 prop types
Component: src/system/index.ts::Skeleton
Props:
borderRadius?: number = 1

height?: string = 30px

times?: number = 1

variant?: string = text

width?: string = 100%
Imports
import { Skeleton } from "@automattic/vip-design-system";
Default story ok
const Default = () => <Skeleton />;
Grouped story ok
const Grouped = () => <Skeleton times={3} />;
Circle story ok
const Circle = () => <Skeleton variant="circle" width="50px" height="50px" />;
Text story ok
const Text = () => <Skeleton variant="text" />;

Snackbar

snackbar · ./src/system/Snackbar/Snackbar.stories.tsx
A brief, non-intrusive notification bar for surfacing status messages and alerts.
Prop types (react-docgen-typescript) 7 prop types
Component: src/system/index.ts::Snackbar
Props:
/**
 * URL for the call-to-action link.
 */
ctaHref?: string = undefined

/**
 * Click handler for the call-to-action link.
 */
ctaOnClick?: (() => void)

/**
 * Label text for the call-to-action link.
 */
ctaText?: string

/**
 * When true, reserves space for a dismiss action.
 */
isDismissable?: boolean = false

/**
 * When true, replaces the status icon with a loading spinner.
 */
loading?: boolean = false

/**
 * Theme UI style overrides applied to the root element.
 */
sx?: ThemeUIStyleObject = {}

/**
 * Color variant that determines the icon and visual style.
 */
variant?: ColorVariants = warning
Imports
import React from "react";
import { Snackbar } from "@automattic/vip-design-system";
Primary story ok
const Primary = () => <Snackbar
    title="Snackbar title"
    variant="info"
    loading={false}
    isDismissable={false}
    ctaText="View">This is an informational snackbar message.</Snackbar>;
Default story ok
const Default = () => {
    const [ visible, setVisible ] = useState( true );
    return (
        <React.Fragment>
            { visible && (
                <Snackbar
                    variant="error"
                    sx={ { mb: 4 } }
                    ctaText="Resolve"
                    ctaOnClick={ () => {
                        setVisible( false );
                    } }
                >
                    Error message.
                </Snackbar>
            ) }

            <Snackbar
                variant="warning"
                sx={ { mb: 4 } }
                ctaText="View"
                ctaOnClick={ () => {
                    setVisible( false );
                } }
            >
                Warning message.
            </Snackbar>

            <Snackbar
                variant="info"
                sx={ { mb: 4 } }
                ctaText="View"
                ctaOnClick={ () => {
                    setVisible( false );
                } }
            >
                Tip or information.
            </Snackbar>

            <Snackbar
                variant="success"
                sx={ { mb: 4 } }
                ctaText="Preview"
                ctaOnClick={ () => {
                    setVisible( false );
                } }
            >
                Success message.
            </Snackbar>

            <Snackbar
                variant="success"
                sx={ { mb: 4 } }
                ctaText="Preview"
                ctaOnClick={ () => {
                    setVisible( false );
                } }
            >
                Success message with a long text to test the layout. Lorem ipsum dolor sit amet,
                consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna
                aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
                ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
                cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident,
                sunt in culpa qui officia deserunt mollit anim id est laborum.
            </Snackbar>

            <Snackbar
                loading
                variant="warning"
                sx={ { mb: 4 } }
                title="Operation in progress..."
                ctaText="Pause"
                ctaOnClick={ () => {
                    setVisible( false );
                } }
            >
                Check back again in a few seconds.
            </Snackbar>

            <Snackbar variant="system" sx={ { mb: 4 } }>
                System message.
            </Snackbar>
        </React.Fragment>
    );
};

Spinner

spinner · ./src/system/Spinner/Spinner.stories.tsx
An animated SVG spinner used to indicate a loading state.
Prop types (react-docgen-typescript) 4 prop types
Component: src/system/index.ts::Spinner
Props:
/**
 * Additional CSS class name.
 */
className?: string

/**
 * The color of the spinner stroke.
 */
color?: string = icon.helper

/**
 * The width of the spinner's SVG stroke.
 */
strokeWidth?: number = 2

/**
 * Additional Theme UI styles applied to the spinner.
 */
sx?: ThemeUIStyleObject
Imports
import { Spinner } from "@automattic/vip-design-system";
Default story ok
const Default = () => <Spinner />;

Table

table · ./src/system/Table/Table.stories.tsx
Internal dependencies
Prop types (react-docgen-typescript) 4 prop types
Component: src/system/index.ts::Table
Props:
/**
 * Accessible caption describing the table contents. A console warning is shown if omitted.
 */
caption?: string

/**
 * Table content (thead, tbody, tr elements, etc.).
 */
children?: ReactNode

/**
 * Additional CSS class name(s) for the table container.
 */
className?: Argument

/**
 * Theme UI style overrides applied to the table element.
 */
sx?: ThemeUIStyleObject
Imports
import { Flex, Table, TableCell, TableRow, Text } from "@automattic/vip-design-system";
Primary story ok
const Primary = () => <Table caption="Example Table">
    <thead>
        <TableRow head cells={ [ 'Name', 'Value', 'Status' ] } />
    </thead>
    <tbody>
        <TableRow cells={ [ 'Item A', '100', 'Active' ] } />
        <TableRow cells={ [ 'Item B', '200', 'Inactive' ] } />
    </tbody>
</Table>;
Default story ok
const Default = () => <ExampleTable caption="Example Table" />;
With Horizontal Scroll story ok
const WithHorizontalScroll = () => (
    <div sx={ { maxWidth: '800px' } }>
        <ExampleTable caption="Horizontal Scroll Example" />
    </div>
);

Tabs

navigation-tabs · ./src/system/Tabs/Tabs.stories.jsx
Tabs — Root container for the tabbed interface. Wraps Radix UI Tabs.Root and manages active tab state.
Imports
import { Button, Link, Tabs, TabsContent, TabsList, TabsTrigger, Text } from "@automattic/vip-design-system";
Default story ok
const Default = () => <Tabs defaultValue="all">
    <TabsList title="See all the content">
        <TabsTrigger value="all">All (5)</TabsTrigger>
        <TabsTrigger value="live">Live (2)</TabsTrigger>
        <TabsTrigger value="dev">In Development (3)</TabsTrigger>
        <TabsTrigger value="protect" disabled>Not accessible
                            </TabsTrigger>
    </TabsList>
    <TabsContent value="all">
        <Text>All content <Link href="https://google.com">https://google.com</Link>
        </Text>
    </TabsContent>
    <TabsContent value="live">Live content</TabsContent>
    <TabsContent value="dev">
        <Text>In Development content <Button variant="secondary">Hey I am a button</Button>{ ' ' }
        </Text>
    </TabsContent>
</Tabs>;
Set Active Tab story ok
const SetActiveTab = () => {
    const [ activeTab, setActiveTab ] = React.useState( 'all' );

    return (
        <Tabs value={ activeTab } onValueChange={ val => setActiveTab( val ) }>
            <TabsList title="See all the content">
                <TabsTrigger value="all">All (5)</TabsTrigger>
                <TabsTrigger value="live">Live (2)</TabsTrigger>
                <TabsTrigger value="dev">In Development (3)</TabsTrigger>
                <TabsTrigger value="protect" disabled={ true }>
                    Not accessible
                </TabsTrigger>
            </TabsList>
            <TabsContent value="all">
                <Text>
                    <button type="button" onClick={ () => setActiveTab( 'live' ) }>
                        Switch to live tab
                    </button>
                </Text>
            </TabsContent>
            <TabsContent value="live">Live content</TabsContent>
            <TabsContent value="dev">
                <Text>
                    In Development content <button type="button">Hey I am a button</button>{ ' ' }
                </Text>
            </TabsContent>
        </Tabs>
    );
};

Text

text · ./src/system/Text/Text.stories.tsx
A general-purpose text component that renders a themed paragraph (`<p>`) by default.
Imports
import { Text } from "@automattic/vip-design-system";
Primary story ok
const Primary = () => <Text>Apparently we had reached a great height in the atmosphere, for the sky was a dead black, and the stars had ceased to twinkle.</Text>;
Default story ok
const Default = () => (
    <>
        <Text>
            Apparently we had reached a great height in the atmosphere, for the sky was a dead black,
            and the stars had ceased to twinkle. By the same illusion which lifts the horizon of the sea
            to the level of the spectator on a hillside, the sable cloud beneath was dished out, and the
            car seemed to float in the middle of an immense dark sphere, whose upper half was strewn
            with silver.{ ' ' }
        </Text>

        <Text variant="default">Body Default</Text>
        <Text variant="small">Body Small</Text>
        <Text variant="large">Body Large</Text>
        <Text variant="mono">Body Mono</Text>
        <Text variant="mono-bold">Body Mono Bold</Text>

        <Text sx={ { color: 'texts.accent' } }>Text Accent</Text>
        <Text sx={ { color: 'texts.helper' } }>Text Helper</Text>

        <Text sx={ { color: 'texts.helper', fontWeight: 'light' } }>Text Helper</Text>
        <Text sx={ { color: 'texts.helper', fontWeight: 'regular' } }>Text Helper</Text>
        <Text sx={ { color: 'texts.helper', fontWeight: 'medium' } }>Text Helper</Text>
        <Text sx={ { color: 'texts.helper', fontWeight: 'bold' } }>Text Helper</Text>

        <Text sx={ { color: 'texts.secondary' } }>Text Secondary</Text>

        <Text sx={ { color: 'texts.primary' } }>Text Primary</Text>

        <Text sx={ { color: 'texts.placeholder' } }>Text placeholder</Text>

        <Text sx={ { color: 'texts.disabled' } }>Text disabled</Text>

        <div sx={ { bg: 'layer.inverse' } }>
            <Text sx={ { color: 'texts.inverse' } }>Text inverse</Text>
        </div>
    </>
);

Textarea

form-textarea · ./src/system/Form/Textarea.stories.jsx
Info
No description found. Write a jsdoc comment such as /** Component description */.
Imports
import { Root, Textarea } from "@automattic/vip-design-system";
Primary story ok
const Primary = () => <Form.Root>
    <Form.Textarea
        label="Textarea label"
        forLabel="textarea-primary"
        rows="5"
        hasError={false}
        required={false} />
</Form.Root>;
Default story ok
const Default = () => (
	<Form.Root>
		<Form.Textarea forLabel="my-text-area" rows="5" label="Regular textarea" />

		<hr sx={ { my: 4 } } />

		<Form.Textarea
			forLabel="my-text-area-error"
			rows="5"
			label="Error textarea"
			errorMessage="Please type numeric characters only"
			required
			hasError
		/>
	</Form.Root>
);

Toggle

toggle · ./src/system/Form/Toggle.stories.tsx
An accessible on/off switch built on Radix UI Switch.
Prop types (react-docgen-typescript) 2 prop types
Component: src/system/index.ts::Toggle
Props:
asChild?: boolean

/**
 * Theme color key used as the background when the toggle is checked.
 */
variant?: string = primary
Imports
import { Label, Toggle } from "@automattic/vip-design-system";
Primary story ok
const Primary = () => <Toggle
    name="toggle-primary"
    variant="primary"
    disabled={false}
    defaultChecked
    aria-label="Feature flag" />;
Default story ok
const Default = args => (
    <form>
        <Toggle checked={ args.checked } defaultChecked aria-label="Feature flag" />

        <br />
        <br />

        <Toggle checked={ args.checked } defaultChecked={ false } aria-label="Feature flag 2" />

        <br />
        <br />

        <Toggle aria-label="Feature Disabled" disabled defaultChecked={ false } />
    </form>
);
With Label story ok
const WithLabel = args => (
    <form>
        <Label htmlFor="custom-label-input">Custom Label here</Label>

        <Toggle
            id="custom-label-input"
            defaultChecked
            checked={ args.checked }
            aria-label="Feature flag"
        />
    </form>
);
Custom Styling story ok
const CustomStyling = args => (
    <form>
        <Label htmlFor="custom-label-input">
            Custom Styling.{ ' ' }
            <strong>We currently only recommend using Primary, Disabled, and Success variants.</strong>
        </Label>

        <div>
            <Toggle
                id="custom-label-input"
                defaultChecked
                checked={ args.checked }
                aria-label="Feature flag"
                variant="success"
            />{ ' ' }
            <h2>Not recommended</h2>
            <Toggle
                id="custom-label-input-error"
                defaultChecked
                checked={ args.checked }
                aria-label="Error flag"
                variant="error"
            />{ ' ' }
            <Toggle
                id="custom-label-input-warning"
                defaultChecked
                checked={ args.checked }
                aria-label="Warning flag"
                variant="warning"
            />{ ' ' }
            <Toggle
                id="custom-label-input-info"
                defaultChecked
                checked={ args.checked }
                aria-label="info flag"
                variant="info"
            />
        </div>
    </form>
);

Toolbar

navigation-toolbar · ./src/system/Toolbar/Toolbar.stories.tsx
Prop type error
No component file found for the "Toolbar" component.
   9 | import type { StoryObj } from '@storybook/react-vite';
  10 |
> 11 | export default {
     | ^
  12 | 	title: 'Navigation/Toolbar',
  13 | 	component: Toolbar,
  14 | 	parameters: {

./src/system/Toolbar/Toolbar.stories.tsx:
/** @jsxImportSource theme-ui */
import { BiSolidHelpCircle, BiSolidBell } from 'react-icons/bi';

import { Toolbar } from '.';
import { Text, Avatar, Nav, NavItem, Flex, Toggle, Label } from '../../system';
import ScreenReaderText from '../ScreenReaderText';
import { CustomLink } from '../utils/stories/CustomLink';

import type { StoryObj } from '@storybook/react-vite';

export default {
	title: 'Navigation/Toolbar',
	component: Toolbar,
	parameters: {
		docs: {
			description: {
				component: `
The Toolbar component provides a way to users reach the main sections of a website, and also provides a way to users identify where they are. It is usually placed in a prominent position at the top of a site, or anywhere that needs a linked-navigation.

## Guidance

### When to use the Toolbar component

- When you need a main Header, and a navigation for your website.

### When to consider something else

- If you need a navigation, but not a header for your page, use the [Nav](/docs/navigation-nav--docs) component instead.

## Accessibility Considerations guidance

- This component uses the \`header\` as the main landmark HTML element
- The Nav.Toolbar uses the same accessibility features from the Nav component.

## Using the component

- It's not recommended to have two Toolbars on a page. If you use two instances of this component, you will probably get landmarks errors in your accessibility tests.

-------

## Component Properties
`,
			},
		},
	},
};

type Story = StoryObj< typeof Toolbar >;

export const Primary: Story = {
	render: args => (
		<Toolbar.Primary { ...args }>
			<Toolbar.Logo href="https://wpvip.com/" />
			<Nav.Toolbar label="Main">
				<NavItem.Toolbar active href="#">
					My Applications
				</NavItem.Toolbar>
				<NavItem.Toolbar href="#">My Organization</NavItem.Toolbar>
			</Nav.Toolbar>
		</Toolbar.Primary>
	),
	args: {},
};

export const Default: Story = {
	render: () => (
		<>
			<Toolbar.Primary>
				<Toolbar.Logo href="https://wpvip.com/" />
				<Nav.Toolbar label="Main">
					<NavItem.Toolbar active href="https://googles.com">
						My Applications
					</NavItem.Toolbar>
					<NavItem.Toolbar href="https://google.com">My Organization</NavItem.Toolbar>
				</Nav.Toolbar>

				<Toolbar.UtilNav>
					<Text sx={ { color: 'toolbar.text.default', mb: 0 } }>Utility Item</Text>

					<Toolbar.IconHolder>
						<BiSolidBell />
					</Toolbar.IconHolder>
				</Toolbar.UtilNav>
			</Toolbar.Primary>
		</>
	),
};

export const RawBar: Story = {
	render: () => (
		<>
			<Toolbar.Primary>
				<Toolbar.Logo href="https://wpvip.com/" />
				<Nav.Toolbar label="Main" />
			</Toolbar.Primary>
		</>
	),
};

export const VIPDashboardLike: Story = {
	render: () => (
		<>
			<Toolbar.Primary>
				{ /* Next.js customization of this link */ }
				<Toolbar.Logo as={ CustomLink } />

				<Nav.Toolbar label="Main">
					<NavItem.Toolbar href="https://googles.com">My Applications</NavItem.Toolbar>
					{ /* Example below if you have Next.js <Link /> */ }
					<NavItem.Toolbar active href="https://google.com" as={ CustomLink }>
						My Organizations
					</NavItem.Toolbar>
				</Nav.Toolbar>

				<Toolbar.UtilNav>
					<Flex sx={ { gap: 2, minHeight: 64, alignItems: 'center' } }>
						<Flex
							sx={ {
								alignItems: 'center',
							} }
						>
							<Toggle
								checked={ true }
								onChange={ () => {} }
								name="viptogglefeaure"
								id="viptogglefeaure"
								variant="warning"
								aria-label="Vip features toggle"
							/>

							<Label
								htmlFor="viptogglefeaure"
								sx={ { color: 'toolbar.text.default', mb: 0, ml: 2 } }
							>
								VIP
							</Label>
						</Flex>

						<a
							href="/"
							sx={ { color: 'icon.inverse', width: 38, justifyContent: 'center', display: 'flex' } }
							aria-label="Help center"
						>
							<BiSolidHelpCircle width={ 16 } height={ 16 } />
						</a>

						<a
							href="/"
							sx={ { color: 'icon.inverse', width: 38, justifyContent: 'center', display: 'flex' } }
							aria-label="Help center"
						>
							<BiSolidBell width={ 16 } height={ 16 } />
						</a>
					</Flex>

					<Toolbar.Separator />

					<a href="/">
						<Avatar name="John Doe" src="https://i.pravatar.cc/80" />
						<ScreenReaderText>John Doe</ScreenReaderText>
					</a>
				</Toolbar.UtilNav>
			</Toolbar.Primary>
		</>
	),
};
Info
No description found. Write a jsdoc comment such as /** Component description */.
Imports
import { Avatar, Flex, Label, Nav, NavItem, ScreenReaderText, Text, Toggle, Toolbar } from "@automattic/vip-design-system";
import { BiSolidBell, BiSolidHelpCircle } from "react-icons/bi";
Primary story ok
const Primary = () => <Toolbar.Primary>
    <Toolbar.Logo href="https://wpvip.com/" />
    <Nav.Toolbar label="Main">
        <NavItem.Toolbar active href="#">My Applications
                            </NavItem.Toolbar>
        <NavItem.Toolbar href="#">My Organization</NavItem.Toolbar>
    </Nav.Toolbar>
</Toolbar.Primary>;
Default story ok
const Default = () => (
    <>
        <Toolbar.Primary>
            <Toolbar.Logo href="https://wpvip.com/" />
            <Nav.Toolbar label="Main">
                <NavItem.Toolbar active href="https://googles.com">
                    My Applications
                </NavItem.Toolbar>
                <NavItem.Toolbar href="https://google.com">My Organization</NavItem.Toolbar>
            </Nav.Toolbar>

            <Toolbar.UtilNav>
                <Text sx={ { color: 'toolbar.text.default', mb: 0 } }>Utility Item</Text>

                <Toolbar.IconHolder>
                    <BiSolidBell />
                </Toolbar.IconHolder>
            </Toolbar.UtilNav>
        </Toolbar.Primary>
    </>
);
Raw Bar story ok
const RawBar = () => (
    <>
        <Toolbar.Primary>
            <Toolbar.Logo href="https://wpvip.com/" />
            <Nav.Toolbar label="Main" />
        </Toolbar.Primary>
    </>
);
VIP Dashboard Like story ok
const VIPDashboardLike = () => (
    <>
        <Toolbar.Primary>
            { /* Next.js customization of this link */ }
            <Toolbar.Logo as={ CustomLink } />

            <Nav.Toolbar label="Main">
                <NavItem.Toolbar href="https://googles.com">My Applications</NavItem.Toolbar>
                { /* Example below if you have Next.js <Link /> */ }
                <NavItem.Toolbar active href="https://google.com" as={ CustomLink }>
                    My Organizations
                </NavItem.Toolbar>
            </Nav.Toolbar>

            <Toolbar.UtilNav>
                <Flex sx={ { gap: 2, minHeight: 64, alignItems: 'center' } }>
                    <Flex
                        sx={ {
                            alignItems: 'center',
                        } }
                    >
                        <Toggle
                            checked={ true }
                            onChange={ () => {} }
                            name="viptogglefeaure"
                            id="viptogglefeaure"
                            variant="warning"
                            aria-label="Vip features toggle"
                        />

                        <Label
                            htmlFor="viptogglefeaure"
                            sx={ { color: 'toolbar.text.default', mb: 0, ml: 2 } }
                        >
                            VIP
                        </Label>
                    </Flex>

                    <a
                        href="/"
                        sx={ { color: 'icon.inverse', width: 38, justifyContent: 'center', display: 'flex' } }
                        aria-label="Help center"
                    >
                        <BiSolidHelpCircle width={ 16 } height={ 16 } />
                    </a>

                    <a
                        href="/"
                        sx={ { color: 'icon.inverse', width: 38, justifyContent: 'center', display: 'flex' } }
                        aria-label="Help center"
                    >
                        <BiSolidBell width={ 16 } height={ 16 } />
                    </a>
                </Flex>

                <Toolbar.Separator />

                <a href="/">
                    <Avatar name="John Doe" src="https://i.pravatar.cc/80" />
                    <ScreenReaderText>John Doe</ScreenReaderText>
                </a>
            </Toolbar.UtilNav>
        </Toolbar.Primary>
    </>
);

Tooltip

deprecated-tooltip · ./src/system/Tooltip/Tooltip.stories.tsx
Internal dependencies
Prop types (react-docgen-typescript) 4 prop types
Component: src/system/index.ts::Tooltip
Props:
/**
 * Whether to display a directional arrow on the tooltip.
 */
arrow?: boolean = false

/**
 * The position of the tooltip relative to the trigger.
 */
position?: "bottom" | "left" | "right" | "top" = top

/**
 * The text content displayed inside the tooltip.
 */
title?: string

/**
 * The element that triggers the tooltip on hover.
 */
trigger?: ReactElement<any, string | JSXElementConstructor<any>>
Imports
import { Box, Button, Grid, Heading, Link, Text, Tooltip } from "@automattic/vip-design-system";
Basic story ok
const Basic = () => (
    <>
        <Heading variant="h2">Basic Usage</Heading>
        <Text>
            Pass a trigger and title, the trigger component will be cloned and injected with a{ ' ' }
            <code>[vip-tooltip]</code> HTML attribute.
        </Text>
        <Grid
            columns={ [ 'auto auto' ] }
            gap={ '100px 160px' }
            sx={ { justifyContent: 'center', pt: '50px' } }
        >
            <Tooltip trigger={ <Button>Top</Button> } title="At the top" position="top" />

            <Tooltip
                trigger={ <Button>Top with Arrow</Button> }
                title="At the top with arrow"
                position="top"
                arrow={ true }
            />

            <Tooltip trigger={ <Button>Bottom</Button> } title="At the Bottom" position="bottom" />

            <Tooltip
                trigger={ <Button>Bottom with Arrow</Button> }
                title="At the Bottom with arrow"
                position="bottom"
                arrow={ true }
            />

            <Tooltip trigger={ <Button>Left</Button> } title="On the Left" position="left" />

            <Tooltip
                trigger={ <Button>Left with Arrow</Button> }
                title="On the Left with arrow"
                position="left"
                arrow={ true }
            />

            <Tooltip trigger={ <Button>Right</Button> } title="On the Right" position="right" />

            <Tooltip
                trigger={ <Button>Right with Arrow</Button> }
                title="On the Right with arrow"
                position="right"
                arrow={ true }
            />

            <Tooltip
                trigger={
                    <Button disabled={ true } preferAriaDisabled={ true }>
                        Disabled (use focus)
                    </Button>
                }
                title="Disabled trigger"
                position="top"
            />

            <Tooltip
                trigger={
                    <Button disabled={ true } preferAriaDisabled={ true }>
                        Disabled with Arrow (use focus)
                    </Button>
                }
                title="Disabled trigger with arrow"
                position="top"
                arrow={ true }
            />
        </Grid>
    </>
);
Container story ok
const Container = () => (
    <div>
        <Heading variant="h2">Container Usage</Heading>

        <Text>
            You can also wrap a component with the <code>Tooltip</code> component. To use tooltips you
            can simply pass <code>data-vip-tooltip</code> as an HTML attribute to your component.
        </Text>

        <Box sx={ { backgroundColor: 'red' } }>
            <Tooltip>
                <br />

                <Button data-vip-tooltip-position="top" data-vip-tooltip="Test test" sx={ { ml: 3 } }>
                    This is another way
                </Button>

                <br />
                <br />
                <br />

                <Link
                    href="http://google.com"
                    data-vip-tooltip-position="right"
                    data-vip-tooltip-arrow="true"
                    data-vip-tooltip="Lorem Ipsum has been the industry's standard dummy text ever since the 1500"
                    sx={ { ml: 3 } }
                >
                    Use with links too
                </Link>
            </Tooltip>
        </Box>
    </div>
);

Wizard

navigation-wizard · ./src/system/Wizard/Wizard.stories.tsx
A multi-step wizard component that displays a sequence of steps with progress tracking. Supports completed, skipped, and active step states with optional summaries.
Prop types (react-docgen-typescript) 11 prop types
Component: src/system/index.ts::Wizard
Props:
/**
 * The zero-based index of the currently active step.
 */
activeStep?: number

/**
 * Additional CSS class name for the wizard container.
 */
className?: string = null

/**
 * Array of zero-based indices for steps that have been completed.
 */
completed?: number[] = []

/**
 * Array of zero-based indices for steps that are in an error state. An errored
 * step shows a red error icon, title, and left border (see WizardStep `error`).
 */
errored?: number[] = []

/**
 * Whether to display the "STEP X OF Y" text above each step title.
 */
showStepText?: boolean = true

/**
 * Array of zero-based indices for steps that have been skipped.
 */
skipped?: number[] = []

/**
 * The array of step configurations to render.
 */
steps: WizardStepProps[]

/**
 * The HTML element type used to render step summaries.
 */
summaryAs?: "dl" | "table" = table

/**
 * The HTML heading element used for every step title, independent of its
 * visual style — useful for keeping a correct document outline. A step can
 * override this with its own `titleAs`. Defaults to the value of `titleVariant`.
 */
titleAs?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6"

/**
 * Whether to automatically focus the step title when the active step changes.
 */
titleAutofocus?: boolean = false

/**
 * The heading variant (typographic style) applied to every step title. A step
 * can override this with its own `titleVariant`.
 */
titleVariant?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" = 'h3'
Imports
import { Box, Button, Checkbox, Flex, Input, Label, Text, Wizard } from "@automattic/vip-design-system";
import { BsPencil } from "react-icons/bs";
import React from "react";
Primary story ok
const Primary = () => <Wizard
    activeStep={0}
    completed={[]}
    showStepText
    summaryAs="dl"
    steps={[
        {
            title: 'Step One',
            titleVariant: 'h3',
            subTitle: 'First step description.',
            children: 'Step one content',
        },
        {
            title: 'Step Two',
            titleVariant: 'h3',
            subTitle: 'Second step description.',
        },
        {
            title: 'Step Three',
            titleVariant: 'h3',
        },
    ]} />;
Wizard Title Levels story ok
`titleVariant` (visual style) and `titleAs` (semantic HTML element) can be set once at the Wizard level so they apply to every step, avoiding repetition. Here all titles render as `h2` elements while keeping `h3` styling, and the last step overrides `titleAs` to `h4` to demonstrate per-step precedence.
const WizardTitleLevels = () => <Wizard
    activeStep={0}
    completed={[]}
    titleVariant="h3"
    titleAs="h2"
    steps={[
        {
            title: 'Step One',
            subTitle: 'Rendered as an h2 element with h3 styling.',
            children: 'Step one content',
        },
        {
            title: 'Step Two',
            subTitle: 'Also an h2 element, inheriting the Wizard-level titleAs.',
        },
        {
            title: 'Step Three (overrides titleAs)',
            titleAs: 'h4',
        },
    ]} />;
Error story ok
const Error = () => {
    const steps: WizardStepProps[] = [
        {
            title: 'Step One',
            titleVariant: 'h3',
            children: (
                <Box>
                    <Text sx={ { display: 'block', mb: 3, color: 'texts.secondary' } }>
                        Something went wrong. Please try again.
                    </Text>
                    <Button>Retry</Button>
                </Box>
            ),
        },
        {
            title: 'Step Two',
            titleVariant: 'h3',
        },
        {
            title: 'Step Three',
            titleVariant: 'h3',
        },
    ];
    return (
        <Box mt={ 4 }>
            <Wizard activeStep={ 0 } steps={ steps } errored={ [ 0 ] } />
        </Box>
    );
};
Default story ok
const Default = () => {
    const steps: WizardStepProps[] = [
        {
            title: 'Choose Domain',
            titleVariant: 'h3',
            subTitle: 'You can bring a domain name you already own, or buy a new one.',
            children: (
                <Box>
                    <Label>Domain</Label>
                    <Input placeholder="yourdomain.com" />
                    <Button sx={ { mt: 3 } }>Continue</Button>
                </Box>
            ),
        },
        {
            title: 'Configure DNS',
            titleVariant: 'h3',
            summaryTitle: 'Summary of Configure DNS',
        },
        {
            title: 'Configure Certificate',
            titleVariant: 'h3',
        },
        {
            title: 'Verify Domain',
            titleVariant: 'h3',
        },
    ];
    return (
        <React.Fragment>
            <Box mt={ 4 }>
                <Wizard
                    activeStep={ 0 }
                    steps={ steps }
                    completed={ [ 1 ] }
                    summaryAs="dl"
                    className="vip-wizard-xyz"
                />
            </Box>
        </React.Fragment>
    );
};
With Title Auto Focus story ok
const WithTitleAutoFocus = () => {
    const [ activeStep, setActiveStep ] = React.useState( 0 );
    const [ autoFocus, setAutoFocus ] = React.useState( true );
    const steps: WizardStepProps[] = [
        {
            title: 'Choose Domain',
            titleVariant: 'h3',
            summary: [
                {
                    label: 'Demo Label',
                    value: 'Demo value',
                },
            ],
            onChange: () => setActiveStep( 0 ),
            children: (
                <Box>
                    <Label>Domain</Label>
                    <Input placeholder="yourdomain.com" />
                    <Button sx={ { mt: 3 } } onClick={ () => setActiveStep( 1 ) }>
                        Continue
                    </Button>
                </Box>
            ),
        },
        {
            title: 'Configure DNS',
            titleVariant: 'h3',
            onChange: () => setActiveStep( 1 ),
            actionLabel: 'Edit',
            actionDisabled: true,
            actionIcon: <BsPencil />,
            children: (
                <Box>
                    <Label>DNS</Label>
                    <Button sx={ { mt: 3 } } onClick={ () => setActiveStep( 0 ) }>
                        back
                    </Button>
                </Box>
            ),
        },

        {
            title: 'Certificate',
            titleVariant: 'h3',
            summary: [
                {
                    label: 'Certificate status',
                    value: 'Not found',
                },
            ],
            onChange: () => setActiveStep( 2 ),
            children: (
                <Box>
                    <Label>Certificate validation</Label>
                    <Button sx={ { mt: 3 } }>Check certificate</Button>
                </Box>
            ),
        },
    ];
    return (
        <React.Fragment>
            <Box mt={ 4 }>
                <Wizard
                    summaryAs="dl"
                    completed={ [ 0, 1 ] }
                    skipped={ [ 2 ] }
                    activeStep={ activeStep }
                    steps={ steps }
                    titleAutofocus={ autoFocus }
                    className="vip-wizard-xyz"
                />
            </Box>
            <Box mt={ 4 }>
                <Flex sx={ { alignItems: 'center' } }>
                    <Checkbox
                        id="wizard-autofocus"
                        checked={ autoFocus }
                        aria-labelledby="label-check1"
                        onCheckedChange={ e => {
                            setAutoFocus( e === true );
                        } }
                    />
                    <Label sx={ { m: 0, ml: 2 } } htmlFor="wizard-autofocus" id="label-check1">
                        Autofocus enabled?
                    </Label>
                </Flex>
            </Box>
        </React.Fragment>
    );
};
Hide Step Text story ok
const HideStepText = () => {
    const [ activeStep, setActiveStep ] = React.useState< number | undefined >( undefined );

    const steps: WizardStepProps[] = [
        {
            title: 'Included Logs',
            titleVariant: 'h3',
            subTitle: '',
            children: <Text sx={ { mb: 0 } }>Error Logs</Text>,
            onChange: () => {
                setActiveStep( 0 );
            },
            actionLabel: 'Edit',
            actionIcon: <BsPencil />,
        },
    ];

    return (
        <React.Fragment>
            <Box mt={ 4 }>
                <Wizard
                    showStepText={ false }
                    activeStep={ activeStep }
                    steps={ steps }
                    completed={ [ 0 ] }
                    className="vip-wizard-xyz"
                />
            </Box>
        </React.Fragment>
    );
};

Accordion.Root

accordion · ./src/system/Accordion/Accordion.stories.tsx
Prop type error
No component file found for the "Accordion.Root" component.
  17 | type Story = StoryObj< typeof Accordion.Root >;
  18 |
> 19 | export default {
     | ^
  20 | 	title: 'Accordion',
  21 | 	component: Accordion.Root,
  22 | 	subcomponents: {

./src/system/Accordion/Accordion.stories.tsx:
/** @jsxImportSource theme-ui */

/**
 * External dependencies
 */
import { BiBookContent } from 'react-icons/bi';
import { RiUserAddLine, RiCodeSSlashFill } from 'react-icons/ri';

/**
 * Internal dependencies
 */
import { Box, Accordion } from '..';

import type { RootProps } from './Accordion';
import type { StoryObj } from '@storybook/react-vite';

type Story = StoryObj< typeof Accordion.Root >;

export default {
	title: 'Accordion',
	component: Accordion.Root,
	subcomponents: {
		'Accordion.Item': Accordion.Item,
		'Accordion.Trigger': Accordion.Trigger,
		'Accordion.TriggerWithIcon': Accordion.TriggerWithIcon,
		'Accordion.Content': Accordion.Content,
	},
};

const ExampleContent = () => (
	<Box>
		<p sx={ { mt: 0 } }>Add your key team members to the VIP Dashboard.</p>
		<p>Add developers to GitHub.</p>
		<p sx={ { mb: 0 } }>Add content editors and developers to WordPress admin.</p>
	</Box>
);

const ExampleAccordion = ( props: Partial< RootProps > ) => (
	<Accordion.Root defaultValue="teamPermissions" sx={ { width: '250px' } } { ...props }>
		<Accordion.Item value="teamPermissions">
			<Accordion.TriggerWithIcon
				icon={ <RiUserAddLine sx={ { color: 'support.accent.success' } } /> }
			>
				Team & Permissions
			</Accordion.TriggerWithIcon>
			<Accordion.Content>
				<ExampleContent />
			</Accordion.Content>
		</Accordion.Item>
		<Accordion.Item value="addContentMedia">
			<Accordion.TriggerWithIcon
				icon={ <BiBookContent sx={ { color: 'support.accent.success' } } /> }
			>
				Add Content & Media
			</Accordion.TriggerWithIcon>
			<Accordion.Content>
				<ExampleContent />
			</Accordion.Content>
		</Accordion.Item>
		<Accordion.Item value="addCode">
			<Accordion.TriggerWithIcon
				icon={ <RiCodeSSlashFill sx={ { color: 'support.accent.success' } } /> }
			>
				Add Code
			</Accordion.TriggerWithIcon>
			<Accordion.Content>
				<ExampleContent />
			</Accordion.Content>
		</Accordion.Item>
	</Accordion.Root>
);

export const Default: Story = {
	args: {
		defaultValue: 'teamPermissions',
	},
	render: args => <ExampleAccordion { ...args } />,
};

export const WithLargeText: Story = {
	args: {
		defaultValue: 'teamPermissions',
	},
	render: args => (
		<Box sx={ { '.vip-heading-component > button': { fontSize: 4 } } }>
			<ExampleAccordion { ...args } />
		</Box>
	),
};
Info
No description found. Write a jsdoc comment such as /** Component description */.
Imports
import { Accordion, Box } from "@automattic/vip-design-system";
import { BiBookContent } from "react-icons/bi";
import { RiCodeSSlashFill, RiUserAddLine } from "react-icons/ri";
Default story ok
const Default = () => <ExampleAccordion defaultValue="teamPermissions" />;
With Large Text story ok
const WithLargeText = () => <Box sx={ { '.vip-heading-component > button': { fontSize: 4 } } }>
    <ExampleAccordion defaultValue="teamPermissions" />
</Box>;

Toolbar

navigation-toolbar · ./src/system/Toolbar/Toolbar.stories.tsx
Prop type error
No component file found for the "Toolbar" component.
   9 | import type { StoryObj } from '@storybook/react-vite';
  10 |
> 11 | export default {
     | ^
  12 | 	title: 'Navigation/Toolbar',
  13 | 	component: Toolbar,
  14 | 	parameters: {

./src/system/Toolbar/Toolbar.stories.tsx:
/** @jsxImportSource theme-ui */
import { BiSolidHelpCircle, BiSolidBell } from 'react-icons/bi';

import { Toolbar } from '.';
import { Text, Avatar, Nav, NavItem, Flex, Toggle, Label } from '../../system';
import ScreenReaderText from '../ScreenReaderText';
import { CustomLink } from '../utils/stories/CustomLink';

import type { StoryObj } from '@storybook/react-vite';

export default {
	title: 'Navigation/Toolbar',
	component: Toolbar,
	parameters: {
		docs: {
			description: {
				component: `
The Toolbar component provides a way to users reach the main sections of a website, and also provides a way to users identify where they are. It is usually placed in a prominent position at the top of a site, or anywhere that needs a linked-navigation.

## Guidance

### When to use the Toolbar component

- When you need a main Header, and a navigation for your website.

### When to consider something else

- If you need a navigation, but not a header for your page, use the [Nav](/docs/navigation-nav--docs) component instead.

## Accessibility Considerations guidance

- This component uses the \`header\` as the main landmark HTML element
- The Nav.Toolbar uses the same accessibility features from the Nav component.

## Using the component

- It's not recommended to have two Toolbars on a page. If you use two instances of this component, you will probably get landmarks errors in your accessibility tests.

-------

## Component Properties
`,
			},
		},
	},
};

type Story = StoryObj< typeof Toolbar >;

export const Primary: Story = {
	render: args => (
		<Toolbar.Primary { ...args }>
			<Toolbar.Logo href="https://wpvip.com/" />
			<Nav.Toolbar label="Main">
				<NavItem.Toolbar active href="#">
					My Applications
				</NavItem.Toolbar>
				<NavItem.Toolbar href="#">My Organization</NavItem.Toolbar>
			</Nav.Toolbar>
		</Toolbar.Primary>
	),
	args: {},
};

export const Default: Story = {
	render: () => (
		<>
			<Toolbar.Primary>
				<Toolbar.Logo href="https://wpvip.com/" />
				<Nav.Toolbar label="Main">
					<NavItem.Toolbar active href="https://googles.com">
						My Applications
					</NavItem.Toolbar>
					<NavItem.Toolbar href="https://google.com">My Organization</NavItem.Toolbar>
				</Nav.Toolbar>

				<Toolbar.UtilNav>
					<Text sx={ { color: 'toolbar.text.default', mb: 0 } }>Utility Item</Text>

					<Toolbar.IconHolder>
						<BiSolidBell />
					</Toolbar.IconHolder>
				</Toolbar.UtilNav>
			</Toolbar.Primary>
		</>
	),
};

export const RawBar: Story = {
	render: () => (
		<>
			<Toolbar.Primary>
				<Toolbar.Logo href="https://wpvip.com/" />
				<Nav.Toolbar label="Main" />
			</Toolbar.Primary>
		</>
	),
};

export const VIPDashboardLike: Story = {
	render: () => (
		<>
			<Toolbar.Primary>
				{ /* Next.js customization of this link */ }
				<Toolbar.Logo as={ CustomLink } />

				<Nav.Toolbar label="Main">
					<NavItem.Toolbar href="https://googles.com">My Applications</NavItem.Toolbar>
					{ /* Example below if you have Next.js <Link /> */ }
					<NavItem.Toolbar active href="https://google.com" as={ CustomLink }>
						My Organizations
					</NavItem.Toolbar>
				</Nav.Toolbar>

				<Toolbar.UtilNav>
					<Flex sx={ { gap: 2, minHeight: 64, alignItems: 'center' } }>
						<Flex
							sx={ {
								alignItems: 'center',
							} }
						>
							<Toggle
								checked={ true }
								onChange={ () => {} }
								name="viptogglefeaure"
								id="viptogglefeaure"
								variant="warning"
								aria-label="Vip features toggle"
							/>

							<Label
								htmlFor="viptogglefeaure"
								sx={ { color: 'toolbar.text.default', mb: 0, ml: 2 } }
							>
								VIP
							</Label>
						</Flex>

						<a
							href="/"
							sx={ { color: 'icon.inverse', width: 38, justifyContent: 'center', display: 'flex' } }
							aria-label="Help center"
						>
							<BiSolidHelpCircle width={ 16 } height={ 16 } />
						</a>

						<a
							href="/"
							sx={ { color: 'icon.inverse', width: 38, justifyContent: 'center', display: 'flex' } }
							aria-label="Help center"
						>
							<BiSolidBell width={ 16 } height={ 16 } />
						</a>
					</Flex>

					<Toolbar.Separator />

					<a href="/">
						<Avatar name="John Doe" src="https://i.pravatar.cc/80" />
						<ScreenReaderText>John Doe</ScreenReaderText>
					</a>
				</Toolbar.UtilNav>
			</Toolbar.Primary>
		</>
	),
};
Info
No description found. Write a jsdoc comment such as /** Component description */.
Imports
import { Avatar, Flex, Label, Nav, NavItem, ScreenReaderText, Text, Toggle, Toolbar } from "@automattic/vip-design-system";
import { BiSolidBell, BiSolidHelpCircle } from "react-icons/bi";
Primary story ok
const Primary = () => <Toolbar.Primary>
    <Toolbar.Logo href="https://wpvip.com/" />
    <Nav.Toolbar label="Main">
        <NavItem.Toolbar active href="#">My Applications
                            </NavItem.Toolbar>
        <NavItem.Toolbar href="#">My Organization</NavItem.Toolbar>
    </Nav.Toolbar>
</Toolbar.Primary>;
Default story ok
const Default = () => (
    <>
        <Toolbar.Primary>
            <Toolbar.Logo href="https://wpvip.com/" />
            <Nav.Toolbar label="Main">
                <NavItem.Toolbar active href="https://googles.com">
                    My Applications
                </NavItem.Toolbar>
                <NavItem.Toolbar href="https://google.com">My Organization</NavItem.Toolbar>
            </Nav.Toolbar>

            <Toolbar.UtilNav>
                <Text sx={ { color: 'toolbar.text.default', mb: 0 } }>Utility Item</Text>

                <Toolbar.IconHolder>
                    <BiSolidBell />
                </Toolbar.IconHolder>
            </Toolbar.UtilNav>
        </Toolbar.Primary>
    </>
);
Raw Bar story ok
const RawBar = () => (
    <>
        <Toolbar.Primary>
            <Toolbar.Logo href="https://wpvip.com/" />
            <Nav.Toolbar label="Main" />
        </Toolbar.Primary>
    </>
);
VIP Dashboard Like story ok
const VIPDashboardLike = () => (
    <>
        <Toolbar.Primary>
            { /* Next.js customization of this link */ }
            <Toolbar.Logo as={ CustomLink } />

            <Nav.Toolbar label="Main">
                <NavItem.Toolbar href="https://googles.com">My Applications</NavItem.Toolbar>
                { /* Example below if you have Next.js <Link /> */ }
                <NavItem.Toolbar active href="https://google.com" as={ CustomLink }>
                    My Organizations
                </NavItem.Toolbar>
            </Nav.Toolbar>

            <Toolbar.UtilNav>
                <Flex sx={ { gap: 2, minHeight: 64, alignItems: 'center' } }>
                    <Flex
                        sx={ {
                            alignItems: 'center',
                        } }
                    >
                        <Toggle
                            checked={ true }
                            onChange={ () => {} }
                            name="viptogglefeaure"
                            id="viptogglefeaure"
                            variant="warning"
                            aria-label="Vip features toggle"
                        />

                        <Label
                            htmlFor="viptogglefeaure"
                            sx={ { color: 'toolbar.text.default', mb: 0, ml: 2 } }
                        >
                            VIP
                        </Label>
                    </Flex>

                    <a
                        href="/"
                        sx={ { color: 'icon.inverse', width: 38, justifyContent: 'center', display: 'flex' } }
                        aria-label="Help center"
                    >
                        <BiSolidHelpCircle width={ 16 } height={ 16 } />
                    </a>

                    <a
                        href="/"
                        sx={ { color: 'icon.inverse', width: 38, justifyContent: 'center', display: 'flex' } }
                        aria-label="Help center"
                    >
                        <BiSolidBell width={ 16 } height={ 16 } />
                    </a>
                </Flex>

                <Toolbar.Separator />

                <a href="/">
                    <Avatar name="John Doe" src="https://i.pravatar.cc/80" />
                    <ScreenReaderText>John Doe</ScreenReaderText>
                </a>
            </Toolbar.UtilNav>
        </Toolbar.Primary>
    </>
);