Forma 36 Design System

repository·main·Indexed 18 days ago

https://github.com/contentful/forma-36

An open-source design system by Contentful providing a collection of React components and tools for building consistent user interfaces. It includes specialized packages for avatars, badges, buttons, cards, datetime utilities, forms, icons, modals, typography, and AI-generated content indicators, as well as a codemod for automating version migrations.

Tokens
134.8K
Snippets
508
Records
869
Agent score
61%

What's inside Forma 36

  1. Use @contentful/f36-datetime components and utilities

    main

    The @contentful/f36-datetime package provides components and utilities for handling and displaying date and time information within the Forma 36 design system. It includes:

    • DateTime: A component for displaying date and time.
    • RelativeDateTime: A component for displaying dates in a relative format (e.g., "2 hours ago").
    • date utils: A set of utility functions for date manipulation and formatting.
  2. Use @contentful/f36-typography components

    main

    The @contentful/f36-typography package provides a set of specialized components for managing text styles and hierarchy within your application. Use these components instead of raw HTML tags to ensure consistent typography according to the Forma 36 design system.

    Available components include:

    • DisplayText: For specific display-level text.
    • Heading: For primary headings.
    • Paragraph: For standard body text blocks.
    • SectionHeading: For headings that define specific sections.
    • Subheading: For secondary headings.
    • Text: For inline or general text elements.
  3. Use Button components from @contentful/f36-button

    main

    The @contentful/f36-button package provides several button-related components for building user interfaces. You can use the following components:

    • Button: The standard button component.
    • ButtonGroup: A component for grouping multiple buttons together.
    • IconButton: A button containing only an icon.
    • ToogleButton: A toggleable button component.
  4. Use @contentful/f36-modal components

    main

    The @contentful/f36-modal package provides two primary components for managing modal dialogs:

    1. Modal: The core component used to render the modal content and structure.
    2. ModalLauncher: A component designed to trigger the opening of a modal, typically used to manage the state of whether the modal is visible or not.

    Refer to the component source directories for detailed API specifications and usage patterns.

  5. Use @contentful/f36-card components

    main

    The @contentful/f36-card package provides several specialized card components for displaying different types of content within the Contentful design system. Depending on your data model, you can use one of the following components:

    • AssetCard: For displaying media assets.
    • Card: A generic card component.
    • EntryCard: For displaying content entries.
    • InlineEntryCard: For displaying entries in an inline format.