Plumeria logoPlumeria
API ReferenceComponents

@plumeria/headlessui

@plumeria/headlessui is a curated set of essential headless primitives, built on Radix UI

Installation headlessui

To use the headlessui integrated into Radix UI, configuration of @plumeria/core and your bundler is required. Please refer to the Installation section for details.

Terminal
npm i @plumeria/headlessui
Terminal
yarn add @plumeria/headlessui
Terminal
pnpm i @plumeria/headlessui

How styleName works

When styleName is passed to a custom component, it is automatically compiled to className and style at the call site — before the component ever runs. Therefore, each @plumeria/headlessui component does not need to know about styleName at all; it simply spreads ...props onto the underlying Radix primitive.

import * as css from '@plumeria/core';
import { DialogTrigger } from '@plumeria/headlessui';

const styles = css.create({
  primary: {
    padding: '10px',
    backgroundColor: 'navy',
    color: '#fff',
  },
});

// styleName is compiled to className="xxxxxxxx" at this call site
<Dialog.Trigger styleName={styles.primary}>Open</Dialog.Trigger>;

Interactive Demo

Below is a live demo of all six components from @plumeria/headlessui, styled with Plumeria.

Dialog

Popover

Tooltip

Accordion

Tabs

Make changes to your account here.

Collapsible

@alexeriksson starred 3 repositories

DropdownMenu

Select

Checkbox

Switch

RadioGroup

Slider

ContextMenu

Right click here

Menubar

NavigationMenu

Toast

    Toggle

    ToggleGroup

    ScrollArea

    Item 1
    Item 2
    Item 3
    Item 4
    Item 5
    Item 6
    Item 7
    Item 8
    Item 9
    Item 10
    Item 11
    Item 12
    Item 13
    Item 14
    Item 15

    AlertDialog


    Components

    The following twenty component groups are exported. All components support ref forwarding and props spread.

    Accordion

    • Item
    • Header
    • Trigger
    • Content

    AlertDialog

    • Trigger
    • Portal
    • Overlay
    • Content
    • Title
    • Description
    • Action
    • Cancel

    Checkbox

    • Indicator

    Collapsible

    • Trigger
    • Content

    ContextMenu

    • Trigger
    • Portal
    • Content
    • Group
    • Label
    • Item
    • CheckboxItem
    • RadioGroup
    • RadioItem
    • ItemIndicator
    • Separator
    • Arrow
    • Sub
    • SubTrigger
    • SubContent

    Dialog

    • Trigger
    • Portal
    • Overlay
    • Content
    • Title
    • Description
    • Close
    • Trigger
    • Portal
    • Content
    • Group
    • Label
    • Item
    • CheckboxItem
    • RadioGroup
    • RadioItem
    • ItemIndicator
    • Separator
    • Arrow
    • Sub
    • SubTrigger
    • SubContent
    • Menu
    • Trigger
    • Portal
    • Content
    • Group
    • Label
    • Item
    • CheckboxItem
    • RadioGroup
    • RadioItem
    • ItemIndicator
    • Separator
    • Arrow
    • Sub
    • SubTrigger
    • SubContent
    • Sub
    • List
    • Item
    • Trigger
    • Link
    • Indicator
    • Content
    • Viewport

    Popover

    • Trigger
    • Portal
    • Content
    • Close
    • Arrow
    • Anchor

    RadioGroup

    • Item
    • Indicator

    ScrollArea

    • Viewport
    • Scrollbar
    • Thumb
    • Corner

    Select

    • Trigger
    • Value
    • Icon
    • Portal
    • Content
    • Viewport
    • Group
    • Label
    • Item
    • ItemText
    • ItemIndicator
    • ScrollUpButton
    • ScrollDownButton
    • Separator
    • Arrow

    Slider

    • Track
    • Range
    • Thumb

    Switch

    • Thumb

    Tabs

    • List
    • Trigger
    • Content

    Toast

    • Provider
    • Viewport
    • Title
    • Description
    • Action
    • Close

    Toggle

    ToggleGroup

    • Item

    Tooltip

    • Provider
    • Trigger
    • Portal
    • Content
    • Arrow

    On this page