Components
Every component in the first release, with its props and notes on its behavior.
A page here shows the main variants, lists the props, and ends with notes on behavior.
Before you start
Install the package and import one look at your app's root. The examples assume you did.
npm install @hone-ui/react react-aria-componentsimport '@hone-ui/react/styles/material.css'; // or minimal.cssImport a component from its own path or from the package root.
import Button from '@hone-ui/react/Button';
import { Button } from '@hone-ui/react';To compile the sx prop to static CSS, add the @hone-ui/sx plugin to your bundler. Without it,
sx falls back to inline styles and prints a one-time warning.
Copy a component into your project
If you would rather own the source, copy it with the CLI. Run init once, then add.
npx hone-ui init
npx hone-ui add buttoninit writes hone-ui.json and a hone-ui.css file. add fails without them. The copies still
need @hone-ui/react for the theme variables, so install it. Then import the package look first
and the copied hone-ui.css after it, once at the root of your app.
npm install @hone-ui/react react-aria-componentsimport '@hone-ui/react/styles/material.css'; // or minimal.css
import './components/ui/hone-ui/hone-ui.css'; // the path init printedThe CLI page explains what init and add write. Every page below also works with
the npm package.
Server and client components
Box, Stack, Divider, Typography, Paper, AppBar, Toolbar, Skeleton, LinearProgress,
CircularProgress, AlertTitle, the List parts except ListItemButton, AccordionDetails,
AccordionActions, Card and its parts, DialogContent, DialogContentText,
DialogActions and FormGroup run as React Server Components. They do not read the theme, so a
components.X.defaultProps entry has no effect on them. The interactive components
(Button, IconButton, Checkbox, Radio, RadioGroup, Switch, TextField, Select, MenuItem and the
form parts) start with 'use client' and do read theme defaults.
Compatibility notes
- Event handlers receive familiar arguments.
onChangeon Checkbox gets(event, checked).onCloseon Dialog gets(event, reason). - The
componentprop exists only on layout components. - System props on the element (
<Box p={2}>) are not supported. Write them insx. - Theme keys are plain component names such as
Button.