# Yopem UI > Yopem UI provides accessible React 19 components with StyleX and Base UI. Copy source into your project. Edit it there. Your copied components do not depend on a component package. ## Installation Use a React project with TypeScript. Supported frameworks are Vite React, client TanStack Router, TanStack Start, React Router, Next.js App Router, and Astro. React Router supports client mode and framework mode, not React Router RSC mode. Next.js Pages Router is not supported. Next.js App Router requires Node 24 or later and webpack. Yopem UI supports Bun, npm, pnpm, and Yarn 2 or later. Use one of these runners with the CLI arguments below: ```sh bunx --bun @yopem-ui/cli init ``` ```sh npx @yopem-ui/cli init ``` ```sh pnpm dlx @yopem-ui/cli init ``` ```sh yarn dlx @yopem-ui/cli init ``` Preview setup with `bunx --bun @yopem-ui/cli init --dry-run`. Run `bunx --bun @yopem-ui/cli init` to install tokens, reset CSS, StyleX helpers, dependencies, and the Oxlint plugin. Init configures aliases, build plugins, and root styles. Conflicting configuration stops init. Choose a component from the [catalog](https://ui.yopem.com/components). Each component page includes its install command and usage examples. For example, `bunx --bun @yopem-ui/cli add button` installs Button source and required dependencies. ## CLI updates and safety Preview updates with `bunx --bun @yopem-ui/cli update button --dry-run`. Then run `bunx --bun @yopem-ui/cli update button`. Use `update base` to update installed shared files. Init and add keep local source changes; update reports modified files as conflicts. Save local changes before using `--force` with add or update. Force can remove your changes. Dry runs check and preview changes. They do not write files or run package-manager commands. The `ui.json` manifest tracks installed files, hashes, registry URLs, and item versions. The CLI uses the project's package manager and keeps existing dependency specifications when they are compatible. Use `--registry ` to select another registry for one command. Registry URLs require HTTPS, except local HTTP. Do not include credentials, query strings, or fragments. The CLI rejects redirects. Interactive init offers design system guidance in DESIGN.md, AGENTS.md, or neither file. Noninteractive init skips guidance by default. Use `init --guidance design`, `init --guidance agents`, or `init --guidance none` to select without a prompt. Guidance stays in the target app. Init preserves text outside the managed Yopem UI section. ## Monorepo installation To initialize a workspace app, run `bunx --bun @yopem-ui/cli init --cwd apps/web`. Then run `bunx --bun @yopem-ui/cli add button --cwd apps/web`. To share UI source, run `bunx --bun @yopem-ui/cli init --cwd apps/web --ui ../../packages/ui`. Then run `bunx --bun @yopem-ui/cli add button --cwd packages/ui`. See the [CLI guide](https://ui.yopem.com/docs/cli.md) for update commands. The UI package must be an existing named React package in the same workspace. The --ui path is relative to the target app. Run init --ui for each consuming app. Pass --ui again when you repeat init. Source imports use the UI package name, such as `@acme/ui/components/ui/button`. Init adds source exports and a workspace dependency. It configures StyleX across both packages. It enables Next.js transpilePackages. It registers shared package imports with the Yopem UI Oxlint rules. The CLI detects Bun, npm, pnpm, and Yarn package managers from the app and workspace root. Files, dependencies, and tracking manifests stay in their target packages. The CLI keeps locally edited source. It does not migrate existing app-local components automatically. ## Styling and composition Use `stylex.create` and semantic tokens from `@/styles/tokens.stylex`. Pass styles through `xstyle`; components apply them after defaults and variants. Input and Textarea use `controlXstyle` for wrappers and `xstyle` for native controls. Use `stylex.props` on native or framework elements. Use `className` for external CSS integration. Do not add utility classes, Tailwind, cva, inline style props, or styling aliases. Use Box for generic containers and its render prop for semantic tags. Choose Flex, Stack, HStack, VStack, Grid, Center, Container, AbsoluteCenter, Bleed, Float, or Wrap for layout. Use Heading, Text, Blockquote, Em, Mark, Highlight, and Prose for text content. Use Pre for generic preformatted text with native pre attributes and refs. Use Codeblock for source code. Compose its header, actions, content, lines, and footer. Use useHighlightedCode from the Hooks catalog to highlight source text. Keep framework links for application navigation. Native anchors remain valid for navigation and downloads. Use existing form and overlay components. Preserve Base UI keyboard behavior, focus management, accessible names, and reduced motion. ## Themes and lint rules Use neutral light and dark surfaces with semantic color pairs. Use Geist Sans for text and headings and Geist Mono for code. Load both fonts in your app. Use neutral inverse primary actions. Keep links and hover surfaces neutral, including on hover. Keep accent and sidebar-accent pairs neutral. Use the blue accent-solid pair for checked and selected indicators. Use --ring for focus, info tokens for status, and sidebar-primary for occasional actions. Use --radius (12px) for standard controls and surfaces, and --radius-sm (8px) for compact details. Use other radius tokens as explicit overrides. Keep functional circles and compact indicators intact. Use spacing and shadow tokens instead of separate design values. Use --overlay-shell for the outer Dialog, AlertDialog, Sheet, and Command frame. Use the card pair for the inner surface and footer. Use the popover pair for floating menus, Popover, Select, and Toast. Use --control-background for field surfaces and --overlay-backdrop for backdrops. Input, InputGroup, and Card have borders by default. Set bordered={false} to remove them. Field and Fieldset are borderless by default. Set bordered to add a border and padding to the wrapper only. NumberField is compact by default; set fullWidth to fill its parent. Table has no body row dividers by default; set rowBorders to add them. AutocompleteInput accepts controlXstyle for its outer Input wrapper. SheetPopup accepts surfaceXstyle for its inner surface. Mobile Sidebar uses this slot for one flat surface. Dialog, AlertDialog, Sheet, Drawer, and Command popups accept frameTitle as a visual caption. Provide a separate accessible title or label. AlertDialog shows its close button by default; it cancels, not confirms. Drawer hides its close button by default. CommandDialogPopup includes the Dialog close button. Drawer uses one sidebar-colored surface for its frame, content, and footer. Select and Combobox use neutral hover and solid-accent selected rows. Steps is a static ordered process, not a navigation control. Theme switching adds theme.tsx and theme-provider.tsx to the base installation. Use ThemeProvider, ThemeScript, and useTheme for light, dark, and system modes. Use getRootThemeProps for the resolved light or dark root theme. Keep defaultTheme and storageKey identical in ThemeScript and ThemeProvider. Use the same theme configuration in getRootThemeProps, ThemeScript, and ThemeProvider. Pass the CSP nonce to ThemeScript when required. Yopem UI provides seven Oxlint rules: prefer-layout-primitives, no-restyle, enforce-styling-methods, static-stylex, no-raw-stylex-colors, no-unused-stylex-styles, and atoms. See the lint guide for rule defaults, options, and file overrides. ## Documentation - [CLI](https://ui.yopem.com/docs/cli.md): Use init, add, and update with Bun, npm, pnpm, or Yarn. Set framework, shared UI, guidance, cwd, and registry options. Preview changes with dry-run. Check prerequisites. Learn when commands keep or overwrite files, including force behavior. - [Layout and typography](https://ui.yopem.com/docs/layout.md): Choose semantic layout and typography components. Use Box, Flex, Stack, HStack, VStack, Grid, Center, Container, AbsoluteCenter, AspectRatio, Bleed, Float, and Wrap. Use Link, List, Text, Blockquote, Em, Strong, Figcaption, Highlight, Mark, Pre, Prose, and Heading for content. Keep native elements and refs where required. - [Styling with StyleX](https://ui.yopem.com/docs/styling.md): Create responsive styles with StyleX and semantic tokens. Apply styles through xstyle after component defaults. Use StyleX props or className to apply styles from other sources. - [Lint rules](https://ui.yopem.com/docs/lint.md): Configure all seven Yopem UI Oxlint rules. Compare code examples that pass or fail each rule. Use prefer-layout-primitives for semantic layout and typography. Configure no-restyle, enforce-styling-methods, static-stylex, and no-raw-stylex-colors. Enable no-unused-stylex-styles or atoms when needed. Learn rule defaults, options, component imports, and file overrides. - [Theming](https://ui.yopem.com/docs/theming.md): Change colors, fonts, CSS variables, and StyleX tokens. Use ThemeProvider, ThemeScript, useTheme, and getRootThemeProps for light, dark, and system modes. Configure the script nonce when required. - [Introduction](https://ui.yopem.com/index.md): Copy React component source into your project. Edit it there. Components use StyleX and Base UI. Initialize your project with the CLI. Then install component source. - [Getting started](https://ui.yopem.com/docs/getting-started.md): Check React and TypeScript prerequisites. Install StyleX and components with the CLI. Learn component composition, usage, and accessibility requirements. - [Installation](https://ui.yopem.com/docs/installation.md): Use CLI init to configure StyleX, dependencies, aliases, tokens, and CSS reset. Set up Vite or another supported framework. Add themes with ThemeProvider when required. - [Components](https://ui.yopem.com/components.md): Browse all components ## Components - [Absolute Center](https://ui.yopem.com/components/absolute-center.md) - [Accordion](https://ui.yopem.com/components/accordion.md) - [Alert](https://ui.yopem.com/components/alert.md) - [Alert Dialog](https://ui.yopem.com/components/alert-dialog.md) - [Aspect Ratio](https://ui.yopem.com/components/aspect-ratio.md) - [Autocomplete](https://ui.yopem.com/components/autocomplete.md) - [Avatar](https://ui.yopem.com/components/avatar.md) - [Badge](https://ui.yopem.com/components/badge.md) - [Bleed](https://ui.yopem.com/components/bleed.md) - [Blockquote](https://ui.yopem.com/components/blockquote.md) - [Box](https://ui.yopem.com/components/box.md) - [Breadcrumb](https://ui.yopem.com/components/breadcrumb.md) - [Button](https://ui.yopem.com/components/button.md) - [Calendar](https://ui.yopem.com/components/calendar.md) - [Card](https://ui.yopem.com/components/card.md) - [Center](https://ui.yopem.com/components/center.md) - [Chart](https://ui.yopem.com/components/chart.md) - [Checkbox](https://ui.yopem.com/components/checkbox.md) - [Checkbox Group](https://ui.yopem.com/components/checkbox-group.md) - [Checkmark](https://ui.yopem.com/components/checkmark.md) - [Clipboard](https://ui.yopem.com/components/clipboard.md) - [Codeblock](https://ui.yopem.com/components/codeblock.md) - [Collapsible](https://ui.yopem.com/components/collapsible.md) - [Combobox](https://ui.yopem.com/components/combobox.md) - [Command](https://ui.yopem.com/components/command.md) - [Container](https://ui.yopem.com/components/container.md) - [Context Menu](https://ui.yopem.com/components/context-menu.md) - [Date Picker](https://ui.yopem.com/components/date-picker.md) - [Dialog](https://ui.yopem.com/components/dialog.md) - [Drawer](https://ui.yopem.com/components/drawer.md) - [Em](https://ui.yopem.com/components/em.md) - [Empty](https://ui.yopem.com/components/empty.md) - [Field](https://ui.yopem.com/components/field.md) - [Fieldset](https://ui.yopem.com/components/fieldset.md) - [Figcaption](https://ui.yopem.com/components/figcaption.md) - [File Upload](https://ui.yopem.com/components/file-upload.md) - [Flex](https://ui.yopem.com/components/flex.md) - [Float](https://ui.yopem.com/components/float.md) - [Form](https://ui.yopem.com/components/form.md) - [Frame](https://ui.yopem.com/components/frame.md) - [Grid](https://ui.yopem.com/components/grid.md) - [Group](https://ui.yopem.com/components/group.md) - [Heading](https://ui.yopem.com/components/heading.md) - [Highlight](https://ui.yopem.com/components/highlight.md) - [HStack](https://ui.yopem.com/components/hstack.md) - [Input](https://ui.yopem.com/components/input.md) - [Input Group](https://ui.yopem.com/components/input-group.md) - [Kbd](https://ui.yopem.com/components/kbd.md) - [Label](https://ui.yopem.com/components/label.md) - [Link](https://ui.yopem.com/components/link.md) - [List](https://ui.yopem.com/components/list.md) - [Mark](https://ui.yopem.com/components/mark.md) - [Marquee](https://ui.yopem.com/components/marquee.md) - [Menu](https://ui.yopem.com/components/menu.md) - [Message](https://ui.yopem.com/components/message.md) - [Meter](https://ui.yopem.com/components/meter.md) - [Native Select](https://ui.yopem.com/components/native-select.md) - [Number Field](https://ui.yopem.com/components/number-field.md) - [Otp Field](https://ui.yopem.com/components/otp-field.md) - [Pagination](https://ui.yopem.com/components/pagination.md) - [Popover](https://ui.yopem.com/components/popover.md) - [Pre](https://ui.yopem.com/components/pre.md) - [Preview Card](https://ui.yopem.com/components/preview-card.md) - [Progress](https://ui.yopem.com/components/progress.md) - [Prose](https://ui.yopem.com/components/prose.md) - [Radio Group](https://ui.yopem.com/components/radio-group.md) - [Rating](https://ui.yopem.com/components/rating.md) - [Scroll Area](https://ui.yopem.com/components/scroll-area.md) - [Segmented Control](https://ui.yopem.com/components/navigation.md) - [Select](https://ui.yopem.com/components/select.md) - [Separator](https://ui.yopem.com/components/separator.md) - [Sheet](https://ui.yopem.com/components/sheet.md) - [Sidebar](https://ui.yopem.com/components/sidebar.md) - [Skeleton](https://ui.yopem.com/components/skeleton.md) - [Slider](https://ui.yopem.com/components/slider.md) - [Spinner](https://ui.yopem.com/components/spinner.md) - [Stack](https://ui.yopem.com/components/stack.md) - [Stat](https://ui.yopem.com/components/stat.md) - [Steps](https://ui.yopem.com/components/steps.md) - [Strong](https://ui.yopem.com/components/strong.md) - [Switch](https://ui.yopem.com/components/switch.md) - [Table](https://ui.yopem.com/components/table.md) - [Tabs](https://ui.yopem.com/components/tabs.md) - [Text](https://ui.yopem.com/components/text.md) - [Textarea](https://ui.yopem.com/components/textarea.md) - [Theme Switcher](https://ui.yopem.com/components/theme-switcher.md) - [Toast](https://ui.yopem.com/components/toast.md) - [Toggle](https://ui.yopem.com/components/toggle.md) - [Toggle Group](https://ui.yopem.com/components/toggle-group.md) - [Toolbar](https://ui.yopem.com/components/toolbar.md) - [Tooltip](https://ui.yopem.com/components/tooltip.md) - [useEventCallback](https://ui.yopem.com/components/use-event-callback.md) - [useHighlightedCode](https://ui.yopem.com/components/use-highlighted-code.md) - [useMediaQuery](https://ui.yopem.com/components/use-media-query.md) - [VStack](https://ui.yopem.com/components/vstack.md) - [Wrap](https://ui.yopem.com/components/wrap.md) ## Machine-readable resources - [Registry index](https://ui.yopem.com/r/registry.json): Component registry metadata - [Component documentation JSON](https://ui.yopem.com/r/docs/button.json): Description, usage, and API data; replace button with the registry item name - [Registry schema](https://ui.yopem.com/schema/registry.json): Registry index JSON schema - [Registry item schema](https://ui.yopem.com/schema/registry-item.json): Registry item JSON schema - [Sitemap](https://ui.yopem.com/sitemap.xml): Canonical public URLs ## Media, lists, and semantic text AspectRatio renders a div with CSS aspectRatio. Its optional numeric ratio defaults to 16 / 9. Nonpositive and nonfinite ratios use the default. AspectRatio does not clip or automatically size children. List renders ul by default. Use List render={
    } for ordered lists through Base UI useRender. Put native start and reversed attributes on the rendered ol. Import List and ListItem from @/components/ui/list. ListItem renders li. Strong renders semantic strong with weight 600 and inherits surrounding typography. Figcaption renders semantic figcaption with muted text, 0.875rem font size, and 1.5 line height. Place Figcaption inside Box render={
    }. There is no Figure primitive. These components accept StyleX xstyle, className, native attributes, events, and refs. These component recommendations do not expand the lint rule's supported native tags.