Components
@peleda-app/ui is the React kit. Every component, with its states, variants and a locale switcher, is in the Storybook at ui.peleda.dev/storybook.
What is in the kit
| Area | Components |
|---|---|
| Actions | Button, IconButton, ButtonGroup, CopyButton, Toggle, ToggleGroup, Toolbar, Link |
| Forms | Field and its parts, Input, InputGroup, SearchField, Textarea, Checkbox, RadioGroup, Switch, Select, Combobox, Slider, InputOTP, Calendar, DatePicker, Label |
| Choice | SegmentedControl, Tabs, FilterChip |
| Overlays | Dialog, AlertDialog, Sheet, Drawer, Popover, HoverCard, Tooltip, DropdownMenu, ContextMenu, Command |
| Feedback | Alert, Callout, InfoBanner, Toaster, Progress, Meter, Spinner, Skeleton, EmptyState, StatusDot |
| Data | Table, DataTable, Pagination, Badge, Tag, Avatar and AvatarGroup, Card, StatCard, Stepper, ProviderTile, Kbd |
| Layout and text | Accordion, Collapsible, ScrollArea, Resizable panels, Separator, Breadcrumb, Heading, Text, Caption, Code, VisuallyHidden |
Helpers: cn (class merging), focusRing and hitArea, the motion presets fade, rise, drop and hint with MotionProvider, useCopy and copyText, useControllableState, useDocumentDirection, shortcutLabel and ariaKeyshortcuts, initials, hashPick.
How components are built
- Tokens only. Colours come from semantic utilities, radii from the radius tokens, elevation from
shadow-raisedandshadow-overlay. - Dumb. Props in, callbacks out. No fetching, routing or global stores; user-visible text comes through props, with English defaults only for generic labels such as "Close".
- Small parts. A pattern is split into the smallest parts that make sense alone, and each part is exported with its own story.
- Shape. One component or compound family per kebab-case file,
data-sloton the root of every part,classNameaccepted and the remaining native props spread. - Interactive parts use Radix primitives from
radix-ui.
tsx
import { Button, Field, FieldControl, FieldDescription, FieldLabel, Input } from '@peleda-app/ui'
export function NameField() {
return (
<Field>
<FieldLabel>Display name</FieldLabel>
<FieldControl>
<Input />
</FieldControl>
<FieldDescription>Shown to people you write to.</FieldDescription>
</Field>
)
}Storybook
Story titles start with the namespace: Primitives/… and Components/… for this kit, Landing/… for the landing kit, and the Docs kit stories are composed in from a second Storybook. The toolbar switches the theme preset, the colour scheme, the locale and, for landing stories, the site identity. Every story runs the accessibility check.