Headings

Heading levels H1 through H6 for document structure.

Usage

Import and use heading components directly.

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

Dynamic Level

Use Heading with a levelprop to render the correct tag dynamically.

Dynamic Level 1

Dynamic Level 3

Dynamic Level 6

API Reference

PropTypeDefaultDescription
levelint1Heading level (1-6)
classNamestring-Additional CSS classes
childrenany-Heading content

Text

Paragraph text with optional muted style and polymorphic rendering.

Basic

The quick brown fox jumps over the lazy dog.

Muted

Use mutedprop for secondary text.

This is muted secondary text.

As Element

Render as p, span, or divusing the asprop.

Default paragraph

Rendered as span
Rendered as div

API Reference

PropTypeDefaultDescription
asstringpHTML tag (p, span, div)
mutedboolfalseMuted secondary style
childrenany-Content

Lead

Larger paragraph text for introductions and subtitles.

Basic

Build beautiful, accessible web applications with Chemical components.

As Element

Use the asprop to render as different HTML elements.

Rendered as div

Rendered as span


API Reference

PropTypeDefaultDescription
asstringpHTML tag (p, div, span)
childrenany-Content

Caption

Small helper text for metadata and supporting copy.

Basic

Last updated 2 minutes ago

Muted

Use mutedprop for secondary text.

Default caption

Muted caption

As Element

Render as different HTML elements.

Default

Span

Div


API Reference

PropTypeDefaultDescription
asstringpHTML tag (p, span, div)
mutedboolfalseMuted secondary style
childrenany-Content

CodeText

Inline code for technical references.

Basic

Run npm installto get started.

In Paragraph

Use CodeTextto highlight inline code within text.

Install the package using npm install chemical-componentsor yarn add chemical-components.

As Element

Default (code)keyboard

API Reference

PropTypeDefaultDescription
asstringcodeHTML tag (code, kbd)
childrenany-Content

Blockquote

Styled block quotation with optional citation.

Basic

The Analytical Engine weaves algebraic patterns just as the Jacquard loom weaves flowers and leaves.Ada Lovelace

Without Citation

Blockquotes work without the citeattribute.

The best way to predict the future is to invent it.

As Element

Render as different elements.

Default blockquote
Div blockquote

API Reference

PropTypeDefaultDescription
citestring-Citation source
asstringblockquoteHTML tag
childrenany-Quote content

Button

Displays a button or a component that looks like a button.

Basic

Use the variantprop to change the button style.

<Button>Default</Button> <Button variant="secondary">Secondary</Button> <Button variant="destructive">Destructive</Button>

Additional Variants

Extended variants for success, warning, info, and accent tones.

Size

Use the sizeprop to change the button size.

Disabled

Use the disabledprop to disable the button.

Loading

Use the loadingprop to show a loading state with a spinner.

With Icon

Combine with Iconor Fabfor icon buttons.

As Child

Use asChildto render as a different element while keeping button styles.

Composition

Buttons work great with other components for common patterns.


API Reference

PropTypeDefaultDescription
variantstringdefaultdefault | secondary | destructive | outline | ghost | link | success | warning | info | accent
sizestringdefaultsm | default | lg | icon
disabledboolfalseDisabled state
loadingboolfalseLoading state
typestringbuttonbutton | submit | reset
onClickfunction-Click handler
ariaLabelstring-Accessible label
childrenany-Button content

Input

Text input field with variant, size, and state support.

Basic

Variant

Use the variantprop to change the input style.

Size

Type

Use the typeprop for different input types.

Disabled

With Label

Wrap in Fieldfor label, hint, and error.

Textarea


API Reference

PropTypeDefaultDescription
variantstringdefaultdefault | filled | ghost | error | success
sizestringdefaultsm | default | lg
typestringtexttext | email | number | password | search
disabledboolfalseDisabled state
placeholderstring-Placeholder text
valuestring-Input value
onChangefunction-Change handler
ariaLabelstring-Accessible label

Textarea

Multi-line text input with variant and size support.

Basic

With Rows

Use rowsto set initial height.

Disabled

With Label

Wrap in Fieldfor label and hint.

Size


API Reference

PropTypeDefaultDescription
rowsint3Number of visible rows
sizestringdefaultsm | default | lg
disabledboolfalseDisabled state
placeholderstring-Placeholder text
valuestring-Textarea value
onChangefunction-Change handler

Select

Custom dropdown listbox with keyboard navigation, portal positioning, and WAI-ARIA pattern.

Basic

Disabled

Size

Default Value

Keyboard: ArrowUp/Down, Home/End, Enter to select, Escape to close, type to search.

API Reference

PropTypeDefaultDescription
optionsstring[]-Array of option strings
defaultValuestring-Initial selected value
valuestring-Controlled value
placeholderstringSelect...Placeholder text
disabledboolfalseDisabled state
sizestringdefaultsm | default | lg
onValueChangefunction-Selection change callback

Native Select

Native HTML select element with component styling.

Basic

Disabled

Size

With Label


API Reference

PropTypeDefaultDescription
placeholderstringSelect...Placeholder text
disabledboolfalseDisabled state
childrenany-Option elements

Field

Form field wrapper with label, hint, and error text for accessible form layouts.

Basic

Error State

Use FieldErrorwith variant="error"on the Input.

With Select

Fields wrap any form control — Input, Select, Textarea, Switch, etc.

Required


API Reference

ComponentPropTypeDescription
FieldchildrenanyField content (label, input, hint, error)
FieldLabelchildrenanyLabel text
FieldHintchildrenanyHelper text below input
FieldErrorchildrenanyError message text

Checkbox

Toggle control for boolean values.

Basic

Default Checked

Use checkedprop for initial state.

Disabled

Size


API Reference

PropTypeDefaultDescription
checkedboolfalseInitial checked state
disabledboolfalseDisabled state
sizestringdefaultsm | default | lg
onChangefunction-Change callback
childrenany-Label content

Radio

Single selection from a set of options.

Basic

Disabled

Size


API Reference

PropTypeDefaultDescription
namestring-Radio group name
checkedboolfalseInitial checked state
disabledboolfalseDisabled state
sizestringdefaultsm | default | lg
onChangefunction-Change callback
childrenany-Label content

Switch

Toggle between two states.

Basic

Disabled

Size

In Settings

Switches work naturally in settings panels with labels.

Dark Mode

Notifications

Auto-save


API Reference

PropTypeDefaultDescription
checkedboolfalseInitial checked state
disabledboolfalseDisabled state
sizestringdefaultsm | default | lg
onChangefunction-Change callback
childrenany-Label content

Toggle Group

A set of toggle buttons with single or multiple selection.

Single

Only one item can be pressed at a time.

Multiple

Multiple items can be pressed simultaneously.

Disabled

Variant

Use variantprop for different styles.


API Reference

PropTypeDefaultDescription
typestringsinglesingle | multiple
defaultValuestring-Initial value
variantstringdefaultdefault | outline | ghost
sizestringdefaultsm | default | lg
disabledboolfalseDisabled state
onValueChangefunction-Value change callback

Radio Group

Mutually-exclusive radio options with context-based selection.

Basic

Direction

Use direction="row"for horizontal layout.

Disabled

With Description

Combine with Fieldfor labels and descriptions.


API Reference

PropTypeDefaultDescription
namestring-Radio group name
defaultValuestring-Initial value
directionstringcolumncolumn | row
disabledboolfalseDisabled state
onValueChangefunction-Value change callback

Slider

Horizontal slider with draggable thumb and keyboard support.

Basic

Range

Use min, max, and stepprops.

Disabled

Step

Use stepto control increment precision.


API Reference

PropTypeDefaultDescription
defaultValuenumber0Initial value
minnumber0Minimum value
maxnumber100Maximum value
stepnumber1Increment step
disabledboolfalseDisabled state
ariaLabelstring-Accessible label

Dialog

A modal overlay with focus trap, inert background, and Escape to close.

Basic

Click the button below to open a dialog. Press Escapeor click the backdrop to close.

Dialog traps focus inside and makes the background inert.

Composition

Use Dialog, DialogBackdrop, DialogContent, DialogHeader, and DialogActionstogether for full control.

Controlled

Use openprop to control visibility from parent state.

Custom Width

Set width via inline style on DialogContent.

Custom Close Button

Add an explicit close button inside DialogActions.

Alert Dialog

Use for destructive actions that require confirmation.

Accessibility

Dialog automatically handles accessibility features:

Focus Trap

Tab cycles through focusable elements

Escape Key

Press Escape to close

Inert Background

Background content is not interactive

ARIA Labels

Use ariaLabel for screen readers

Composition Pattern

Combine Dialog, DialogBackdrop, DialogContent, DialogHeader, DialogTitle, DialogDescription, and DialogFooterfor full control.

Dialog

Controls open state and focus trap

DialogBackdrop

Click to close overlay

DialogContent

Modal content container with close button

DialogHeader

Title + description wrapper

DialogFooter

Action buttons row


API Reference

PropTypeDefaultDescription
openbool-Controlled visibility
defaultOpenboolfalseUncontrolled initial state
ariaLabelstring-Accessible name
onClosefunction-Dismiss callback

Sheet

Modal panel that slides in from an edge of the screen.

Right (Default)

Sheet slides in from the right edge by default. Click the button to open.

All Sides

Use the sideprop to choose the edge: left, right, top, or bottom.

With Title

Pass titleto set the header text and aria-label for accessibility.

The sheet header displays the title and provides an accessible name for screen readers.

API Reference

PropTypeDefaultDescription
sidestringrightleft | right | top | bottom
titlestring-Header title + aria-label
openbool-Controlled visibility
onClosefunction-Dismiss callback

Alert

Displays a callout for user attention.

Basic

Destructive

Use variant="error"for destructive alerts.

Variants

Dismissible

Use dismissibleto add a close button.


API Reference

PropTypeDefaultDescription
variantstringdefaultdefault | info | success | error | warning | accent
titlestring-Alert title
descriptionstring-Alert description
dismissibleboolfalseShow close button
onDismissfunction-Dismiss callback

Badge

Small label for status, categories, and counts.

Variants

DefaultSecondaryAccentSuccessErrorWarningInfoOutlineGhostLink

Size

XSSMDefaultLG

With Icon

Badges can contain icons for additional context.

✓ Active✕ Inactive⚠ Warning

API Reference

PropTypeDefaultDescription
variantstringdefaultdefault | secondary | accent | success | error | warning | info | outline | ghost | link
sizestringdefaultxs | sm | default | lg
childrenany-Badge content

Avatar

User profile image with fallback text.

Size

XS SM MD LG XL

Bordered

BD BD

Status Badge

Use AvatarBadgeto show online/offline status.

A B

Group

A B C

More Count

A B +5

API Reference

PropTypeDefaultDescription
sizestringdefaultxs | sm | default | lg | xl
borderedboolfalseAdd border
srcstring-Image URL
childrenany-Fallback text

Card

Container for content with header, body, and footer sections.

Basic

Create project

Deploy your new project in one-click.

New

Interactive

Cards support onClickfor clickable regions.

Click this card

Title Level

Level 2

Level 3 (default)

Level 4

Size

Use size="sm"for compact cards.

Compact Card

Smaller padding and spacing.

Default Card

Standard padding and spacing.


API Reference

ComponentPropTypeDefaultDescription
Cardsizestringdefaultsm | default
CardonClickfunction-Click handler
CardTitlelevelint3Heading level (2-6)

Accordion

A vertically stacked set of interactive headings that each reveal a section of content.

Basic

Each AccordionItemmanages its own open state via the triggerprop and defaultOpen.

Yes. It adheres to the WAI-ARIA design pattern.

Default Open

Use defaultOpento start an item expanded.

This content is visible on page load.

Multiple Open

Each item manages its own state independently. Multiple items can be open at the same time.

Content A is visible.
Content B is also visible.

Disabled

Use the disabledprop on AccordionItem to disable individual items.


API Reference

ComponentPropTypeDefaultDescription
AccordionmultipleboolfalseAllow multiple items open
Accordionchildrenany-Accordion items
AccordionItemvaluestring-Unique identifier
AccordionItemtriggerstring-Trigger label
AccordionItemdefaultOpenboolfalseInitially open
AccordionItemdisabledboolfalseDisabled state

Tabs

Tabbed interface with keyboard navigation and ARIA labels.

Basic

Overview content goes here.

Variant

Use variantfor different tab styles: line(default) or pills.

Line panel 1.
Pill panel 1.

Disabled

Use disabledTabsto disable specific tabs by index.

Active content.

Default Tab

Use defaultIndexto select the initially active tab.

Third panel.

Two Tabs

Works with as few as two tabs.

Edit your profile information.
Keyboard: ArrowLeft/Right to move, Home/End to jump, roving tabindex.

API Reference

PropTypeDefaultDescription
tabsstring[]-Tab label strings
panelsstring[]-Panel content strings
defaultIndexint0Initially active tab index
ariaLabelstring-Accessible label
variantstringlineline | pills
disabledTabsint[]-Indices of disabled tabs

Collapsible

A toggle to show and hide content.

Basic

Default Open

This content is visible by default.

Disabled

Nested Content

Collapsible can contain any content — text, lists, or other components.


API Reference

PropTypeDefaultDescription
triggerstring-Trigger button label
defaultOpenboolfalseInitially open
disabledboolfalseDisabled state

Progress

Shows completion progress of a task.

Basic

Variants

Size


API Reference

PropTypeDefaultDescription
valuenumber0Progress percentage (0-100)
variantstringdefaultprimary | success | warning | error | info
sizestringdefaultsm | default | lg

Pagination

Page navigation with prev/next controls.

Basic

Custom Labels

Many Pages

Default Page

Use defaultPageto set the initially active page.


API Reference

PropTypeDefaultDescription
pagesnumber[]-Page numbers
defaultPageint1Initially active page
prevLabelstring-Previous button label
nextLabelstring-Next button label

Toast

Notification popup with auto-dismiss, variants, and action buttons.

Interactive

Click a button to trigger a toast notification. They auto-dismiss after 4 seconds.

Variants (Static)

Saved
Changes were saved.
Success
Action completed.
Error
Something went wrong.
Info
New update available.
Warning
Disk space low.

Action Button

Pass actionto add a clickable action button to the toast.

Undo
Action was performed.
Undo

API Reference

PropTypeDefaultDescription
variantstringdefaultdefault | success | destructive | info | warning
titlestring-Toast title
descriptionstring-Toast description
durationint4000Auto-dismiss ms (0 = no dismiss)
actionstring-Action button label

Tooltip

Hover-triggered informational popup with configurable positioning.

Basic

Hover over the button to see the tooltip.

Edit profile

Positions

Use the positionprop to control where the tooltip appears.

Top tip Bottom tip Left tip Right tip

On Icon Buttons

Tooltips are essential for icon-only buttons to convey meaning.

Add item Settings Delete

On Badges

Online Active user Pending Pending review
Tooltip uses TooltipProvider, TooltipTrigger, and TooltipContentfor composition.

API Reference

PropTypeDefaultDescription
labelstring-Tooltip text content
positionstringtoptop | bottom | left | right
delayint200Hover delay in ms
contentstring-Alias for label
childrenany-Trigger element

Table

Data table with header, body, and cell components. Tables should be placed inside a #universalcomponent to avoid hydration wrapper issues with table elements.

Basic

NameStatusScore
AlphaActive95
BetaPending82
GammaInactive71

With Badges

Combine with Badgefor status indicators.

UserRoleStatus
AliceAdminActive
BobEditorPending
CarolViewerInvited

Compact

Use smaller padding for dense data display.

IDNameEmailPlan
1Acme Corphi@acme.comPro
2Globexinfo@globex.comFree
3Initechadmin@initech.comPro
4Hooliteam@hooli.comEnterprise
Wrap tables in a #universalcomponent. The hydration system wraps each component in a span element which can break table element layout.

API Reference

ComponentPropTypeDescription
TablechildrenanyTable content (thead, tbody)
TableHeadCellchildrenanyColumn header content
TableCellchildrenanyCell content

List

Styled list of items.

Basic

  • First item
  • Second item
  • Third item

Unordered

  • Unordered 1
  • Unordered 2

API Reference

PropTypeDefaultDescription
typestringolol | ul
childrenany-List items

Separator

Visual divider between content sections.

Horizontal

Above

Below

Vertical

Left

Right

Styled

Customize with CSS classes.

Above

Below


API Reference

PropTypeDefaultDescription
orientationstringhorizontalhorizontal | vertical
classNamestring-Additional CSS classes

Skeleton

Loading placeholder with shimmer animation.

Basic

Circle

Card Loading

Use skeletons to simulate loading content.


API Reference

PropTypeDefaultDescription
widthstring100%Width (CSS value)
heightstring20pxHeight (CSS value)
circleboolfalseRender as circle

Spinner

Loading indicator with role=status for accessibility.

Size

With Label

Color

Use CSS to customize the spinner color.


API Reference

PropTypeDefaultDescription
sizestringdefaultsm | default | lg
labelstring-Accessible label

Kbd

Keyboard shortcut indicator.

Basic

CtrlShiftK

Shortcut Combinations

Display keyboard shortcuts with multiple keys.

CtrlC

Copy

CtrlV

Paste

CtrlZ

Undo


API Reference

PropTypeDefaultDescription
childrenany-Key label

Icon

Styled icon container.

Basic

+?i

Size

+++

In Button

Icons are commonly used inside buttons.


API Reference

PropTypeDefaultDescription
sizestringdefaultsm | default | lg
childrenany-Icon content

Divider

Horizontal rule divider.

Basic

Above


Below

Styled

Customize with CSS classes.

Default


Styled


Thick



API Reference

PropTypeDefaultDescription
classNamestring-Additional CSS classes
stylestring-Inline styles

Breadcrumb

Navigation breadcrumb trail.

Basic

With Icons

Add icons to breadcrumb links for visual context.

Collapsed

Use BreadcrumbEllipsisfor long trails.


API Reference

PropTypeDefaultDescription
separatorstring/Separator character
childrenany-Breadcrumb items

Container

Centered content wrapper with max-width breakpoints.

Sizes

sm (40rem)

md (48rem)

default (80rem)

full (no max)

Centered Content

Containers center their content with auto margins.

This content is centered and has a max-width.


API Reference

PropTypeDefaultDescription
sizestringdefaultsm | md | default | full
childrenany-Content

Stack

Flexbox layout primitive with direction, gap, and alignment.

Direction

ABC

Justify Between

LeftRight

Vertical Stack

FirstSecondThird

API Reference

PropTypeDefaultDescription
directionstringcolumnrow | column
gapstringmdsm | md | lg
justifystringstartstart | center | end | between
alignstringstretchstart | center | end | stretch
childrenany-Content

Grid

CSS Grid layout primitive.

Columns

1

2

3

2 Columns

A

B

4 Columns

1

2

3

4


API Reference

PropTypeDefaultDescription
colsstring1Number of columns (1-6)
gapstringmdsm | md | lg
childrenany-Grid items

Paper

Elevated surface container with border and shadow.

Basic

Paper content with border and shadow.

With Header

Paper Title

Paper with header and body content.


API Reference

PropTypeDefaultDescription
childrenany-Content

AppBar

Horizontal navigation bar with branding, links, and actions.

Basic

My App

With Navigation

Combine with navigation links and actions.

Dashboard

With Search

Include a search input in the app bar.

Dashboard

With Badge

Add notification badges to app bar actions.

App

A

API Reference

PropTypeDefaultDescription
childrenany-AppBar content

Drawer

Side panel for navigation or settings with header, body, and footer sections.

Basic

With Header

Use a header section for title and description.

With Search

Drawer with search and navigation items.


API Reference

PropTypeDefaultDescription
childrenany-Drawer content

Popover

Floating surface for contextual content with portal rendering and click-outside-to-close.

Basic

Popover

Contextual content here.

With Form

Popovers work well for forms and inputs.

Settings

With Rich Content

Popovers can contain any content — cards, lists, or nested components.

A

Alice Smith

alice@example.com

Popover uses PopoverHeader, PopoverTitle, PopoverDescription, and PopoverContentfor composition.

API Reference

PropTypeDefaultDescription
triggerstring-Trigger label for click mode
sidestringbottomtop | bottom | left | right
childrenany-Popover content

Snackbar

Inline status notification with action buttons and variants.

Basic

Saved

Changes written to disk.

With Action

Add action buttons for user interaction.

Message sent.

Error Snackbar

Use error styling for failure notifications.

Error

Failed to save. Try again.

With Icon

check

File uploaded successfully.


API Reference

PropTypeDefaultDescription
childrenany-Snackbar content

Bottom Bar

Mobile navigation bar for app shells with icon buttons and labels.

Basic

With Labels

Add text labels below icons for clarity.

With Badge

Add notification badges to bottom bar items.


API Reference

PropTypeDefaultDescription
childrenany-Bottom bar items

Empty State

Placeholder when no data is available.

Basic

No results

Try adjusting your search filters.

With Icon

Add an icon for visual context.

📭

Inbox empty

No messages yet. Start a conversation!

With Action

No projects

Create your first project to get started.


API Reference

PropTypeDefaultDescription
childrenany-Empty state content

Stat Card

Compact metric display card.

Basic

Revenue

$12,345

+12%

Variants

Different stat types for various metrics.

Users

1,234

+8%

Orders

567

-3%

API Reference

PropTypeDefaultDescription
childrenany-Stat content

Form Patterns

Complete form examples showing how components work together.

Login Form

A complete login form using Input, Button, and Field components.

Login

Registration Form

A registration form with validation states and multiple input types.

Create Account

Settings Form

A settings form using Switch, Select, and other controls.

Settings

Dark Mode

Notifications

Feedback Form

A feedback form with textarea and rating.

Send Feedback

Search Form

A search form with input and filters.

AllArticlesUsersTags

Composition Guide

Common patterns for combining form components:

Field

Wraps Input with label, hint, and error

Card

Groups related form controls

Stack

Controls vertical spacing between fields

Grid

Arranges fields in columns