# PlexUI: full reference > The most flexible UI kit for React. Production-grade components, design tokens and a 9-size scale that AI agents use correctly. React components with every documented example. Quick overview: https://plexui.com/llms.txt Vue 3: https://plexui.com/llms-vue.txt and https://plexui.com/llms-vue-full.txt Install: npm install @plexui/ui Docs: https://plexui.com Components: 63 ## Setup ```css @layer theme, base, components, utilities; @import "tailwindcss"; @import "@plexui/ui/css"; @source "../node_modules/@plexui/ui"; ``` Wrap your app with from "@plexui/ui/components/PlexUIProvider" (your router's Link, or "a") Size scale: 3xs, 2xs, xs, sm, md, lg, xl, 2xl, 3xl Colors: primary, secondary, danger, success, warning, caution, discovery, info Variants: solid, soft, outline, ghost --- ## Accordion Vertically stacked panels that expand to reveal content, with one or several items open at a time and full keyboard navigation. Import: import { Accordion } from "@plexui/ui/components/Accordion" Docs: https://plexui.com/components/accordion Props: - type ("single" | "multiple") default: — — Required. Whether one item or many can be open at a time - value (string | string[]) default: — — Controlled open item(s) - defaultValue (string | string[]) default: — — Uncontrolled initial open item(s) - onValueChange ((value) => void) default: — — Fires when the open item(s) change - collapsible (boolean) default: false — When type="single", allow closing the open item - disabled (boolean) default: false — Disable every item - dir ("ltr" | "rtl") default: "ltr" — Reading direction - orientation ("horizontal" | "vertical") default: "vertical" — Layout axis - className (string) default: — — Applied to the root
Accordion.Item: - value (string) default: — — Required. Unique identifier used by value / defaultValue - disabled (boolean) default: false — Disable this item - className (string) default: — — Applied to the item wrapper ### Overview The returnsDisabled control disables only the return-policy item. It remains visible and keeps its open state, while keyboard navigation skips its trigger. ```tsx const [value, setValue] = useState("shipping") const [returnsDisabled, setReturnsDisabled] = useState(false) What are your shipping options? We offer standard (5–7 business days), express (2–3 days), and overnight shipping… What is your return policy? Returns are accepted within 30 days of delivery… How can I contact customer support? Reach us by email, live chat, or phone Monday–Friday… ``` ### Single Default shape. type="single" + collapsible lets users close the currently open item; without collapsible, one item is always open. ```tsx {items.map((item) => ( {item.trigger} {item.content} ))} ``` ### Multiple Use type="multiple" when readers can keep several sections open at once: settings pages, long FAQs, step-by-step references. ```tsx {items.map((item) => ( {item.trigger} {item.content} ))} ``` ### Card Composed inside Card, the most common landing-page FAQ pattern. ```tsx Subscription & billing Common questions about plans, invoices, and cancellations. {items.map((item) => ( {item.trigger} {item.content} ))} ``` ## Alert Inline message for notices and warnings with semantic colors, variants, a title, a description, action slots, and a dismiss control. Import: import { Alert } from "@plexui/ui/components/Alert" Docs: https://plexui.com/components/alert Props: - title (ReactNode) — Title displayed in the alert - description (ReactNode) — Description text - actions (ReactNode) — Actions (for example buttons) - actionsPlacement ("end" | "bottom") — Placement of actions; automatic from sizing when unset - mobileActions ("capsules" | "own") default: "capsules" — At 767px and below: 50px capsules as in an iOS tip, or the buttons at their own size, for an alert inside a block of its own buttons - actionsClassName (string) — Class applied to the actions container - color (SemanticColors) default: "primary" — Color scheme - variant ("solid" | "soft" | "outline") default: "outline" — Style variant - indicator (ReactNode | false) — Custom indicator or false to hide - onDismiss (() => void) — Shows the dismiss button when set - banner (boolean) default: false — Full-width strip: square corners, lines above and below only - className (string) — Class applied to the alert container ### Overview On a phone an alert takes the shape and text of an iOS tip (TipKit), the system's message inside a screen: 26px corners, the title at 17/22 semibold and the description at 15/20, its actions under the message as 50px capsules side by side, and a close button in its corner instead of Dismiss. It keeps its icon, colors and variants. With mobileActions="own" the actions keep the size you give the buttons, for an alert inside a block of its own buttons. ```tsx {}} /> ``` ### Colors & variants You can stylize the display of the alert using the color and variant props. ```tsx Track status updates on status page} /> ``` ### Title You can optionally include a title for your alert with the title prop. ```tsx ``` ### Description You can optionally include description text for your alert with the description prop. ```tsx We're working on centralizing SCIM and invite settings. For now, setup is handled within individual product settings. Learn more } /> ``` ### Actions You can add actions to the alert with the actions prop, which accepts ReactNode. Combine with onDismiss to add a dismiss button. ```tsx <> Update password} /> Remind me later} onDismiss={() => {}} /> ``` ### Action placement Actions are automatically positioned in the alert by default. You can force a specific position with the actionsPlacement prop by passing either 'end' or 'bottom'. On a phone the actions always stand under the message, as in an iOS tip, so this example is desktop only. ```tsx )} actionsPlacement="bottom" /> ``` ### Indicator Alert provides an indicator icon by default. You can override it by passing a custom icon to indicator, or pass indicator={'{false}'} to hide it entirely. ```tsx <> } description="Tip: pin the projects you open most, and they stay at the top of the list." /> ``` ### Dismissible The suggested approach for dismissible notices is to use labeled buttons via actions. You can also provide onDismiss to render a dismiss button in the alert chrome. On a phone that button is a close button in the alert's corner, as on an iOS tip, while a labeled action stays a capsule under the message. ```tsx <> )} /> {}} /> ``` ### Banner Use banner for a full-width strip across the top or bottom of a page or panel: offline, read-only, a new version. It drops the rounded corners and keeps only the lines above and below. Pass indicator={'{false}'} for a plain strip. ```tsx ``` ## Avatar Group Stacks user avatars into a single overlapping cluster, with a configurable stacking direction and one size for the whole group. Import: import { Avatar, AvatarGroup } from "@plexui/ui/components/Avatar" Docs: https://plexui.com/components/avatar-group Props: - children (ReactNode) — The avatars of the group - size (number) — Size of all avatars in the group - stack ("start" | "end") default: "start" — Stacking direction - className (string) — Applied to the group container; other props are not forwarded ### Overview ```tsx ``` ### Stacking direction You can control the stacking direction using the stack prop, as either "start" or "end". ```tsx ``` ### Group sizing You can control the size of all avatars in the group by passing size directly to the <AvatarGroup> component. ```tsx ``` ## Avatar An avatar for user identities that shows an initial, a photo or an icon, with overflow counts, semantic colors and roundness options. Import: import { Avatar } from "@plexui/ui/components/Avatar" Docs: https://plexui.com/components/avatar Props: - name (string) — Display name; used for text initial when no image/icon - imageUrl (string) — Absolute URL for image avatar - Icon (React.ComponentType) — Icon component for icon avatar - size (number) — Width and height in pixels - color ("primary" | "secondary" | "success" | "info" | "discovery" | "danger") default: "secondary" — Semantic color for text/icon avatar - variant ("soft" | "solid") default: "soft" — Style variant - overflowCount (number) — Show overflow count (e.g. +9) - className (string) — Applied to the avatar root - onClick (() => void) — Makes avatar interactive (renders a button) - onPointerDown (() => void) — Makes avatar interactive (renders a button) ### Overview A variety of avatar types: text, image, icon, and overflow. ```tsx
``` ### Text For text-based avatars, a single initial is displayed based on the name prop passed to the component. ```tsx ``` ### Image To display an image avatar, provide an absolute URL to the image with imageUrl. Images will have a soft fade entrance once loaded, or fall back to a text display if the image fails to load. ```tsx ``` ### Icon To display an icon avatar, provide an icon to render to the Icon prop. The name prop is not used in this case, and can be omitted. ```tsx ``` ### Overflow count To display an overflow avatar, provide a number to the overflowCount prop. The number will be automatically formatted and scaled to fit. ```tsx ``` ### Sizing To size the avatar, pass a number to the size property, which will set the width and height in pixels. Text and icon avatars will scale their sizes dynamically based on this value. ```tsx ``` ### Colors & variants You can stylize the display of the avatar using the color and variant props. ```tsx
{(["soft", "solid"] as const).map((variant) => (
{variant}
))}
{(["primary", "secondary", "success", "danger", "info", "discovery"] as const).map((color, idx) => ( {(["soft", "solid"] as const).map((variant) => ( ))}
{color}
))}
``` ### Roundness By default, avatars are fully rounded. You can override this by passing a Tailwind rounding class to className. ```tsx ``` ### Interactive Avatars can be used as interactive elements by passing an onClick (or onPointerDown) handler. The avatar then renders a button and applies semantic and visual interaction styles. ```tsx
``` ## Badge Compact label for statuses and inline metadata, with semantic colors, three variants and sizes, icon support, and a loading state. Import: import { Badge } from "@plexui/ui/components/Badge" Docs: https://plexui.com/components/badge Props: - children (ReactNode) — Content inside the badge - color ("secondary" | "success" | "danger" | "warning" | "info" | "discovery" | "caution") default: "secondary" — Semantic color - variant ("solid" | "soft" | "outline") default: "soft" — Style variant - size ("sm" | "md" | "lg" | "xl") default: "sm" — Badge size - pill (boolean) default: false — Fully rounded - onRemove (MouseEventHandler) — Adds a cross at the end of the badge that calls this when pressed - removeLabel (string) default: "Remove" — Accessible name of the cross - removable (boolean) default: false — Shows the cross as a mark, for a badge inside a control that takes the press - className (string) — Class applied to the badge ### Overview Status badges in different colors and compositions. ```tsx
Successful In progress Failed Beta Caution
``` ### Colors & variants You can stylize the display of the badge using the color and variant props. ```tsx const variants = ["soft", "solid", "outline"] as const const colors = ["secondary", "success", "warning", "danger", "info", "discovery", "caution"] as const
{colors.map((color) => (
{color}
))} {variants.map((variant) => (
{variant}
{colors.map((color) => (
Sample
))}
))}
``` ### Size & roundness You can control the size and roundness of the badge with size and pill props. When pill is set, extra horizontal gutter is dynamically applied to the badge. ```tsx New ``` ### Icon Content within the badge can be composed, like showing icons. Color, sizing, and spacing adapt by default. ```tsx Beta ``` ### Remove onRemove adds a cross at the end, with its own hover and focus. size="xl" has the height of a control, so a row of these stands beside a button. Long text ends in an ellipsis and the cross stays. ```tsx remove("oak")} > Oak ``` ### Loading In this example, additional gap is added with a Tailwind gap-1.5 class to provide the appropriate visual spacing. ```tsx In progress ``` ## Breadcrumb The trail of pages that leads to the current one, above a page title, with links, plain steps and the current page. Import: import { Breadcrumb } from "@plexui/ui/components/Breadcrumb" Docs: https://plexui.com/components/breadcrumb Props: - size ("sm" | "md") default: "md" — Text size: sm above a compact header, md above a page title - separator (ReactNode) default: a small chevron — What stands between two items - aria-label (string) default: "Breadcrumb" — Name of the navigation landmark - className (string) — Applied to the nav element Breadcrumb.Item: - href (string) — Link destination. Internal paths use the linkComponent of PlexUIProvider - to (string) — Router destination, for link components that take to - current (boolean) default: false — The current page: plain text marked aria-current="page" - onClick ((event: MouseEvent) => void) — Makes an item without a destination act as a button - className (string) — Applied to the li element ### Overview Breadcrumb renders a nav landmark named "Breadcrumb" around an ordered list. An item with href is a link (internal paths use the linkComponent of PlexUIProvider, such as your router's link); the current item is plain text marked aria-current="page". iOS has no breadcrumb, a phone screen goes back with the back button of its Toolbar. A trail kept on a phone takes the 15/20 text of iOS and gives each link a 44px touch target. ```tsx Home Settings Members ``` ### Sizes Use size="sm" for a trail above a compact header; the default md sits above a page title. On a phone both sizes take the 15/20 text of iOS, so this example is desktop only. ```tsx Projects Website Deployments ``` ### Separator A small chevron stands between items by default. Pass any node to separator, such as a slash for file paths. Separators are hidden from assistive technology. ```tsx acme design-system README.md ``` ### Long trails A trail that does not fit wraps onto the next line instead of leaving the screen. An item without href is a plain step; give it onClick to make it act as a button. ```tsx Workspace Customer accounts Northwind Traders Archived Invoice 2024-0193 ``` ## Button Group Join buttons into a single visual unit for toolbars, steppers, split buttons and search affordances. Import: import { ButtonGroup } from "@plexui/ui/components/ButtonGroup" Docs: https://plexui.com/components/button-group Props: - orientation ("horizontal" | "vertical") default: "horizontal" — Direction of the joined items - mobileMaterial ("glass" | "flat") default: — — Phone surface with touch.css: "glass" makes the group one glass capsule outside a Toolbar, "flat" keeps the joined buttons in one - className (string) default: — — Applied to the root
ButtonGroup.Text: - asChild (boolean) default: false — Render as the passed child (e.g. a