Skip to content

Overview

What Dify UI is, what it adds to Base UI, how these docs are organized, and how to read them with LLMs.

Dify UI is the design system of Dify's frontend: React components, design tokens, Tailwind CSS styles and the cn utility. It lives in the monorepo at packages/dify-ui and is consumed from source by workspace packages. Installation sets up a package to use it.

Built on Base UI

Most interactive components are thin, opinionated wrappers around Base UI headless components. Base UI owns behavior: focus management, keyboard interaction, ARIA semantics, positioning and dismissal. Dify UI adds what is specific to Dify:

  • Variants, sizes and tokens, so a call site picks an appearance instead of writing one.
  • Convenience parts such as DialogContent and SelectContent that bundle the portal, positioning and styled surface.
  • Rules that span components, written up in the guides: accessible names, forms, overlays, selection and styling.

Each API reference links the Base UI part a component takes its props from.

How the docs are organized

  • Get started covers this overview and setting up a package.
  • Foundations lists the tokens behind the visual language, such as Colors and Typography.
  • Guides describe the rules that span components, such as Styling and Overlays.
  • Components document one component per page: usage guidelines, anatomy, examples, keyboard interaction and a generated API reference. Dialog and Select are typical.
  • Utilities document the helpers exported next to the components, such as mergeProps and useRender.
  • Contributing covers authoring public APIs and testing inside the package.

Working with LLMs

Every page has a Markdown version at the same path with a .md suffix. The View as Markdown link at the top of a page opens it, and Copy page copies it to the clipboard, ready to share with an AI assistant.

Two files at the site root cover the whole site. llms.txt lists every page with its description and Markdown link, and llms-full.txt contains every page in one file.