# Mielui — complete documentation Source: https://ui.miel.my/docs/components/chart/bar.md # Bar chart Compare categories with grouped or stacked bars. ## Install ~~~~sh pnpm dlx @mielui/svelte add chart ~~~~ ## Usage Use one Bar for each numeric series and match its key to a config entry. Bars share a zero baseline. Set stacked on Root to add bar series together. Positive and negative values stack on opposite sides of zero. Set orientation="horizontal" when category labels need more room. Use the [Chart API reference](/docs/components/chart.md) for all exported parts and their props. ## Examples ### Grouped series Compare two measurements side by side for each category. ~~~~svelte ~~~~ ### Horizontal stacks Stack related counts and keep long category names beside the bars. ~~~~svelte ~~~~ ### Positive and negative values Net changes extend on either side of zero. Negative values remain negative in the tooltip. ~~~~svelte ~~~~ ### Revise a forecast Switch between forecasts for the same months. Values and the numeric scale transition together, including when you switch again before motion finishes. ~~~~svelte
~~~~ ### Continuous motion A light sweep follows the existing bars. It leaves the values unchanged and pauses offscreen. ~~~~svelte ~~~~ For the rendered guide, visit [Bar chart](/docs/components/chart/bar). --- Source: https://ui.miel.my/docs/components/chart/line.md # Line chart Follow changes over time without a filled area. ## Install ~~~~sh pnpm dlx @mielui/svelte add chart ~~~~ ## Usage Use a Line for each numeric series. Sort dates before passing data; lines connect points in the supplied order. String categories have equal spacing. Date and numeric categories preserve their distance. A null or missing measurement breaks the line instead of turning into zero. Use the [Chart API reference](/docs/components/chart.md) for all exported parts and their props. ## Examples ### Compare trends Two lines share one numeric scale and a labelled legend. ~~~~svelte ~~~~ ### Missing measurements Wednesday has no reading. The gap stays visible so the chart does not imply a measurement. ~~~~svelte ~~~~ ### Irregular dates April 3 and April 10 are seven days apart. Their spacing is wider than samples taken two days apart. ~~~~svelte ~~~~ ### Continuous motion A traveling highlight follows each line without changing its path or values. ~~~~svelte ~~~~ For the rendered guide, visit [Line chart](/docs/components/chart/line). --- Source: https://ui.miel.my/docs/components/chart/area.md # Area chart Show the amount over time with a filled series. ## Install ~~~~sh pnpm dlx @mielui/svelte add chart ~~~~ ## Usage Place Area inside Plot. The fill extends to zero and fades toward the baseline. Multiple areas overlap on the same scale. They are not stacked; use grouped bars when overlap would obscure the comparison. Use the [Chart API reference](/docs/components/chart.md) for all exported parts and their props. ## Examples ### One series Monthly revenue uses one filled series with an outlined edge. ~~~~svelte ~~~~ ### Overlapping series Desktop and mobile sessions share a scale. Their legend and tooltip keep the two measurements identifiable. ~~~~svelte ~~~~ ### Changing values Switch forecasts while the chart is moving. The next transition starts from the current display. ~~~~svelte
~~~~ ### Continuous motion A light sweep travels through the filled area without changing its values. ~~~~svelte ~~~~ For the rendered guide, visit [Area chart](/docs/components/chart/area). --- Source: https://ui.miel.my/docs/components/chart/mixed.md # Mixed chart Compare totals and benchmarks in one plot. ## Install ~~~~sh pnpm dlx @mielui/svelte add chart ~~~~ ## Usage Compose Bar, Line, and Area in the same Plot. All marks use the same numeric axis, so their values must use compatible units. Lines do not reserve bar slots or contribute to stacked bar totals. Keep target series in config so legends and tooltips can name them. Use the [Chart API reference](/docs/components/chart.md) for all exported parts and their props. ## Examples ### Totals and target Bars show measured totals and a line shows the target for the same period. ~~~~svelte ~~~~ ### Continuous motion Bar sweeps and the line highlight continue after entry without changing the dataset. ~~~~svelte ~~~~ ### Custom legend and tooltip Move the legend above the plot, omit the grid and Y-axis, and render tooltip values through its snippet. ~~~~svelte {#snippet children({ label, color })}
{label}
{/snippet}
{#snippet children({ label, values })}
{label} {#each values as item (item.key)} {item.formatted} {/each}
{/snippet}
~~~~ For the rendered guide, visit [Mixed chart](/docs/components/chart/mixed). --- Source: https://ui.miel.my/docs/components/pie-chart/pie.md # Pie chart Show a few categories as shares of a total. ## Install ~~~~sh pnpm dlx @mielui/svelte add pie-chart ~~~~ ## Usage Set Arc innerRadius to 0 for a solid pie and omit Label. Each datum has a stable key and a nonnegative value. Use a bar chart when small differences matter or when many categories would produce thin slices. The legend provides exact values without relying on color. Use the [Pie Chart API reference](/docs/components/pie-chart.md) for all exported parts and their props. ## Examples ### Category shares A solid pie with exact values in its legend and tooltip. ~~~~svelte ~~~~ ### Continuous motion Each segment brightens in sequence. Its position and proportion stay fixed. ~~~~svelte

Time by team

Share of tracked hours this week.

~~~~ ### Filter a category Exclude internal traffic and watch the remaining shares recalculate. Stable keys preserve category identity. ~~~~svelte
{#snippet children({ label, percentage })} {label} {percentage.toFixed(1)}% {/snippet}
~~~~ For the rendered guide, visit [Pie chart](/docs/components/pie-chart/pie). --- Source: https://ui.miel.my/docs/components/pie-chart/donut.md # Donut chart Place a total or active value inside a category breakdown. ## Install ~~~~sh pnpm dlx @mielui/svelte add pie-chart ~~~~ ## Usage Arc defaults to a donut. Change innerRadius to control the opening and compose Label inside Plot for center content. Place Legend and Tooltip directly inside Root. Their snippets receive the formatted value and the percentage of the current total. Use the [Pie Chart API reference](/docs/components/pie-chart.md) for all exported parts and their props. ## Examples ### Total in the center The default center label shows the total. ~~~~svelte

Where visitors come from

Sessions by acquisition channel this month.

~~~~ ### Switch periods Switch monthly and annual subscriptions. Slice angles update while the continuous highlight remains decorative. ~~~~svelte

{annual ? 'Annual plans' : 'Monthly plans'}

{#snippet children({ total, active })} {active ? active.value : total} {/snippet}
~~~~ ### Custom center and legend Replace the center content and legend labels while retaining the shared values and keyboard interaction. ~~~~svelte

Infrastructure spend

This month, before tax.

{#snippet children({ total, active })} {currency(active?.value ?? total)} {active ? config[active.key as keyof typeof config].label : 'Total spend'} {/snippet} {#snippet children({ item, label, value, percentage })} {label} {value} {percentage.toFixed(1)}% {/snippet} {#snippet children({ label, value, percentage })} {label} {`${value} · ${percentage.toFixed(1)}%`} {/snippet}
~~~~ For the rendered guide, visit [Donut chart](/docs/components/pie-chart/donut). --- Source: https://ui.miel.my/docs/agent-skill.md # Agent skill Install with: ```sh npx skills add mielsense/mielui --skill mielui ``` For whole pages, apps, and websites, also install the design skill. Its instructions are at /docs/design-skill.md. ```sh npx skills add mielsense/mielui --skill mielui-design ``` Use /llms.txt for the index and /llms-full.txt for the complete reference. # Mielui Build Svelte interfaces using Mielui's documented APIs, tokens, and composition. Mielui began from Sivir UI and is maintained independently, with its own components, behavior, themes, documentation, and releases. Use Mielui sources for implementation decisions. Sivir examples and version numbers do not establish Mielui compatibility. Preserve the upstream copyright and license notices when copying or redistributing source. The CLI stores them in `notices/mielui/` inside the configured source directory; the repository's UPSTREAM.md records its origins. ## Step 1: Establish the project state Inspect the project before changing code: 1. Confirm the installed Mielui release's peer requirements. Mielui 0.4.0 requires Svelte 5.56 or newer within Svelte 5 and Tailwind CSS v4. 2. Read the package manifest, lockfile, global CSS entry, and nearby Svelte components. 3. Detect the integration mode: - Package mode: `@mielui/svelte` is a dependency and components import from it. - Source-copy mode: `mielui.json` and a local Mielui directory exist. - Not installed: neither mode is present. 4. Identify the installed Mielui package version or the component versions recorded in `mielui.json`. 5. Preserve the project's package manager, import style, aliases, theme, and local component conventions. Do not silently switch an existing project between package and source-copy modes. ## Step 2: Load current Mielui sources Fetch `https://ui.miel.my/llms.txt` at the start of each Mielui task. Treat it as the index for the current catalog, installation guide, theming guide, changelog, and generated component references. Load documentation progressively: | Task | Read from the `llms.txt` index | | --- | --- | | First Mielui integration | Introduction, Installation, and Theming | | Choosing components | Components index, then candidate component pages | | Implementing a component | That component's Markdown page and every Mielui dependency needed for custom composition | | AI or coding-agent UI | Candidate AI component pages plus [component selection](https://ui.miel.my/docs/component-selection.md) | | Upgrading or resolving an API mismatch | Installed version, the compiled changelog, the LLM changelog page when linked, and component pages | | Visual design or review | [design language](https://ui.miel.my/docs/design-language.md) | | Laying out a whole page, app, or website | The `mielui-design` skill, when it is installed | Each generated component page contains its current version, dependencies, install command, prop tables for exported parts, public `index.ts` API, and runnable examples. `/llms-full.txt` combines the full reference; prefer individual pages for focused tasks. Read the exact page before using a component that is new to the project. Never invent a part, prop, event, variant, slot/snippet contract, or import path. Use this authority order when sources disagree: 1. Local source-copied components define source-copy behavior. 2. The installed package and its declarations define package behavior at the locked version. 3. The live Mielui Markdown defines the latest released API and examples. 4. The rendered documentation is visual context, not a substitute for the typed API. If the project is behind the live release, adapt to the installed API or ask before upgrading. Do not paste latest-only syntax into an older installation. If web access is unavailable, inspect local Mielui source or installed declarations. State that the live reference could not be checked rather than guessing. ## Step 3: Model the interface State the user's job, the dominant content or action, and the important empty, loading, success, and error states. For substantial pages, compare at least two materially different compositions and choose the one that makes the task clearest. Read [design language](https://ui.miel.my/docs/design-language.md) before creating or substantially reshaping an interface. Follow the host application's established visual system when it is more specific than Mielui's defaults. Choose geometry before components. Mielui is a set of purposeful primitives, not a requirement to wrap every region in a component. ## Step 4: Select and verify components Read [component selection](https://ui.miel.my/docs/component-selection.md) when selecting new primitives or composing an AI interface. Prefer the highest-level Mielui component that matches the interaction semantics. Use native Svelte and semantic HTML for layout and content where Mielui adds no behavior. Avoid recreating focus management, keyboard navigation, overlays, live regions, loading behavior, or controlled state already supplied by a component. Before implementation: 1. List the selected component slugs. 2. Fetch each selected component page from the links in `llms.txt`. 3. Confirm exports, required props, bindable state, event signatures, dependencies, and examples. 4. Reject removed components listed in the current components index and follow its migration guidance. 5. Keep compound components in their documented namespace shape, such as `Dialog.Root` and `Dialog.Content`. Examples are API evidence, not page templates. Adapt their state model and composition to the user's real content. ## Step 5: Install consistently When Mielui is absent, choose with the user unless the requested mode is already clear: | Mode | Choose when | | --- | --- | | Package | The project wants dependency-managed updates and imports from `@mielui/svelte`. | | Source copy | The project wants to own and modify component source. | Use the project's package manager. Translate the documentation's pnpm examples when needed. For package mode: ```sh pnpm add @mielui/svelte ``` Import the token sheet once in the application's global CSS: ```css @import '@mielui/svelte/ui.css'; ``` Ignore the `mielui add` command in a component page when using package mode. That command is only for source-copy projects; package components are already available through the installed dependency. For source-copy mode: ```sh pnpm dlx @mielui/svelte init -y pnpm dlx @mielui/svelte add ``` Import the generated token sheet once and use the aliases recorded in `mielui.json`; do not assume the default path if configuration already exists. Let the CLI resolve transitive Mielui dependencies. Add only components required by the design. Treat `mielui add` as an operation for missing source, not a safe update command. It skips existing files unless `--overwrite` is passed but can still advance recorded versions in `mielui.json`. Before updating copied components, inspect local modifications and the upstream change, then ask before using `--overwrite` because it replaces owned source. ## Step 6: Implement with Mielui Use Svelte 5 state and binding patterns that match the project's code. Preserve native semantics and use the component's typed callbacks and bindable props as documented. Use Mielui semantic tokens and Tailwind utilities before custom values. Let typography, alignment, spacing, and content hierarchy do most of the visual work. Add surfaces, borders, radii, color, and motion only when they communicate grouping, interaction, state, or continuity. For AI interfaces, compose transcript behavior, message roles, response content, reasoning, tools, questions, progress, attachments, and the composer as separate stateful concerns. Do not make every assistant event look like a chat bubble, and do not animate already-live network chunks merely for decoration. Implement real states, not only the ideal screenshot: - Empty content gives a useful next action. - Loading preserves layout and communicates what is pending. - Errors explain what failed and how to recover. - Success confirms the user's action without unnecessary ceremony. - Long content wraps or scrolls in the correct local region. ## Step 7: Verify the result Run the project's normal lightweight formatting and lint checks. Run broader checks only when requested or required by the host repository. Inspect the rendered interface at desktop and narrow widths, in every supported theme. Exercise keyboard focus, overlays, escape and outside-click behavior, form submission, disabled and pending states, transcript following, and long content where applicable. Check the browser console for runtime and accessibility errors. Before finishing, confirm: - Every Mielui API used matches the installed version. - The stylesheet or local token sheet is imported exactly once. - The first viewport makes the task and dominant action or content clear. - Responsive behavior recomposes rather than merely shrinking. - No decorative container, label, icon, color, or motion can be removed without losing meaning. - The implementation uses real product content and covers relevant non-happy states. Report the Mielui components added, integration mode, verification performed, and any version or documentation limitation. ## Current composition contracts The catalog separates Components, Blocks, AI components, Chart components, and Actions. Public component imports remain under `@mielui/svelte/components/` even when source folders use another category. Chart, PieChart, Gauge, and Heatmap are charts. Actions use `@mielui/svelte/actions/`: morph, number-shuffle, and shimmer. Use Dialog instead of Modal, Kbd instead of Shortcut, and HugeiconsIcon with Hugeicons glyph data. Group connects real Button, Input, and trigger components; include Group.Separator between controls. Tag Input renders its tags as secondary badges. Toast is composable through Root, Content, Footer, Title, Icon, Actions, Action, and Close. The icon, title, and description sit together in Content; Footer appears only for actions. The toast helpers render these same parts. Overlay surfaces accept `surface="solid" | "glass"` on the documented owning part; do not apply glass independently to nested surfaces. Surfaces are solid by default. Glass is opt-in: set `--mielui-surface: glass` on `:root` for the whole app, or pass `surface="glass"` to one component. Do not add blur classes by hand. Card is solid unless you pass `surface="glass"` to Card.Root. It does not follow the theme's glass setting the way overlays do. On inset and panel cards the frame frosts and the content surface stays close to opaque. Frames are two layers: a white frame holding a recessed inset in the stage color (`--color-background`), with header, toolbar and footer strips on the frame. They follow the theme's border setting. With single borders, the default, the inset meets the frame's border, and with double borders a gutter separates them. This applies to inset cards, dialogs, sheets, data tables, composers, toasts and code blocks. Never give a frame a fixed `--mielui-modal-inset`. Multiply by `--mielui-border-inset-scale`, which is 0 for single and 1 for double. Composer.Toolbar joins the input on one surface by default. Set `variant="inset"` to keep the input on its own inset surface with the toolbar in the frame under it, like an inset Card and its footer. There is no `chrome` variant. DataTable.ColumnHeader is a button. Each click moves the column to its next sort state, and Shift-click adds it to a multi-column sort. With `variant="inset"`, DataTable.Root frames the table and its footer and lifts DataTable.Toolbar above the frame. Use DataTable.Sort for an explicit field-and-direction menu. Menu rows and options render buttons and do not take `href`. This covers DropdownMenu.Item, ContextMenu.Item, ContextMenu.CheckboxItem, Select.Item and Combobox.Item. Navigate from `callback`. Drawer.Content is a floating panel with a fixed width, not a full-width sheet. Size it with a width class on Drawer.Content and leave Header, Body and Footer unconstrained. FolderCard.Root is a link with `href`, a button with `onclick` and no `href`, and a static article with neither. Keep a FolderCard.Title in the button form, because it names the button. The default sans font is Inter Tight and the mono font is Geist Mono, loaded by `ui.css` from `@fontsource/inter-tight` and `@fontsource/geist-mono` at weights up to 500. `font-semibold` and `font-bold` resolve to 500, so build hierarchy from size and color. A project that wants another font installs it and sets `--font-sans` after importing `ui.css`. Heatmap.Root accepts `animation="rows" | "columns" | "live" | "none"`, defaulting to rows. Reduced motion disables entrances. Slider range mode binds a pair of numbers, accepts thumbLabels, and supports dir="rtl". Slider `variant="field"` is one bar with its label and value inside, for panels that stack many numeric settings. It holds a single value, so it cannot combine with `range`. Read each page before using these APIs, particularly when the locked package predates the unreleased changelog. Bind a component's DOM node with `bind:element`. Every part uses that name, including the Calendar, RangeCalendar, DatePicker, DateRangePicker and OTPField parts, which used `bind:ref` before 0.3.0. HugeiconsIcon follows the same rule. Names that changed in 0.3.0, and still type-check when misspelled because Svelte passes unknown props through: - **Alert Dialog** cancels with `AlertDialog.Close`. `Exit` is gone. - **Sheet** hides its corner close button with ``, the same prop name `Dialog.Content` uses. - **Tag Input** takes `invalid` and `issues={[{ message }]}`, like `Field.Root`, instead of `error="..."`. - **Hover Card** sets `placement` (for example `bottom-start`) and `delay` on `HoverCard.Root`. Content no longer takes `side` or `align`. - **Dialog and Alert Dialog** set their width with `size` (`xs` to `xl`) alone. There is no `orientation`. - **Checkbox** uses `variant="card"` for the bordered row. - **Spinner** uses `eased` for its eased rotation. Translate or reword built-in text with the `labels` prop on the root. It is an object of optional keys with English fallbacks, and keys that insert a value are functions: ` `${position} sur ${total}` }} />`. Roots that take it: Attachment, Button, Chart, CodeBlock, ColorPicker, Combobox, Command, CopyButton, DataTable, DatePicker, DateRangePicker, Dialog, FileDiff, FileUpload, FolderCard, Form.ErrorSummary, Gauge, Heatmap, Kbd, Markdown, Message, Notch, NumberField, Pagination, PieChart, Question, Reasoning, ReorderList, Sheet, ShowMore, SkeletonSwap, Slider, TagInput, TaskSteps, Toaster and Tool. Read the component's reference for its keys. Do not add one prop per string. A part used outside its root throws ` components must be used within .` Tabs, CodeBlock and FileDiff parts also render on their own. ## Tables, native selects, and loading placeholders Compose Table.Root with Header, Body, Row, Head, and Cell. Caption, Footer, and ScrollArea are optional. Use variant="inset" for a recessed table. Sorting and selection remain application state; use native aria-sort and existing Button or Checkbox controls. NativeSelect.Root renders a native select. Bind a string for single selection or a string array with multiple. Its size prop is the native number of visible options. Compose Option and OptGroup inside it. Apply use:shimmer from @mielui/svelte/actions/shimmer to a loading container, or set variant="shimmer" on Skeleton. Shimmer takes no options and disables itself for reduced motion. Label the loading region; the visual highlight is hidden from assistive technology. ## Selection, uploads, and motion Select.Root and Combobox.Root use a string value by default. Set `type="multiple"` and bind a `string[]` for multiple selection. Keep the documented Trigger, Content, and Item composition; multiple selection leaves the menu open. Do not add a second selection store around the binding. FileUpload.Root owns validation and upload state. Use `maxFiles={1}` for single-file picking. Its children snippet exposes the summary for composing the empty dropzone and selected file states. `onUpload` is required; implement the upload there and resolve it only after server confirmation. A local-only demo should explicitly say that it does not upload files. Keep cancellation and retry connected to the documented upload context. Notch provides nonmodal edge content through Root and Content, with optional Header, Peek, SideAction, and other documented parts. Use `` for notifications instead of adding a second notification host. Gauge distinguishes `value={null}` from a valid zero measurement. Gauge and Heatmap accept loading states and handle their own placeholder presentation. Use their documented animation options instead of adding timers around examples. Apply `use:numberShuffle={{ value }}` to a text-only element containing the final number. Keep icons and controls outside it. The action preserves accessible source text and honors reduced motion and disabled theme motion. --- Source: https://ui.miel.my/docs/actions.md # Actions - [Morph](/docs/actions/morph.md): animate SVG geometry and text changes. - [Number shuffle](/docs/actions/number-shuffle.md): roll digits when a value changes. - [Shimmer](/docs/actions/shimmer.md): animate a loading highlight. --- Source: https://ui.miel.my/docs/actions/morph.md # Morph Animate SVG geometry and text changes with the morph Svelte action. ## API | Option | Type | Default | | --- | --- | --- | | key | unknown | Required | | duration | number | 220 milliseconds | Import from @mielui/svelte/actions/morph. Attach to a visual wrapper inside a button, keeping the accessible name on the button. Change key when its visual content changes. Use a stable wrapper size. Closed shapes with matching viewBox values interpolate. Open strokes and incompatible geometry crossfade. Reduced motion skips animation. Interrupted or unmounted animations remove temporary visual copies. ## Example ```svelte ``` --- Source: https://ui.miel.my/docs/actions/shimmer.md # Shimmer Import shimmer from @mielui/svelte/actions/shimmer. Apply use:shimmer to a container. No options are required. The decorative highlight respects rounded corners and reduced motion. Unmounting cancels the animation and restores positioning. Add an accessible loading label to the region. Skeleton supports variant="default" | "shimmer". The default is still. ```svelte
Loading profile…
``` ## Text On a plain-text element, the highlight moves through the letters. Use a status region for loading feedback. ```svelte

Thinking…

``` --- Source: https://ui.miel.my/docs/actions/number-shuffle.md # Number shuffle Roll digits as a numeric value changes. ## Usage Import numberShuffle from @mielui/svelte/actions/number-shuffle. Attach it to a text-only element and pass value. Render the final formatted value as normal text for server rendering and accessibility. Keep icons and markup outside the animated element. ```svelte
{value}
``` ## Formatted values ```svelte
{format(value)}
``` ## API reference | Option | Type | Default | | --- | --- | --- | | value | number | Required | | format | (value: number) => string | String | | duration | number | Twice the theme panel duration, fallback 480ms | The action rolls from zero on mount and continues from the current value on interrupted updates. Reduced motion, disabled theme motion, and duration zero show the final value immediately. Visual digits are hidden from assistive technology. Removing the element cleans up animation and restores its styles. --- Source: https://ui.miel.my/docs/introduction.md # Introduction Mielui is a component library for Svelte 5 and Tailwind v4. It includes components, theme tokens, and a CLI for copying source into your project. ## Build with Mielui Start with everyday controls, compose larger interfaces from named parts, and tune everything through one set of theme tokens. Each component page pairs a live preview with source examples and an API reference. - [Native controls](/docs/components/native-controls): Buttons, text fields, and selects built around native form elements. - [Inputs](/docs/components/inputs): Selection, numeric, file, and structured inputs. - [Forms](/docs/components/forms): Labels, field groups, validation, and form composition. - [Dates](/docs/components/dates): Calendars and date selection for single dates and ranges. - [Navigation](/docs/components/navigation): Breadcrumbs, pagination, and tabbed views. - [Overlays](/docs/components/overlays): Dialogs, menus, panels, and contextual information. - [Layout](/docs/components/layout): Surfaces, disclosure, grouping, scrolling, and tabular layout. - [Status and content](/docs/components/status-and-content): Status messages, progress, identity, and text. - [Blocks](/docs/components/blocks): Larger parts built from the components: code, tables, toasts, toolbars, and more. - [AI components](/docs/components/ai-components): Conversations, messages, tools, and the composer for chat and agent interfaces. - [Chart components](/docs/components/chart-components): Charts, gauges, and heatmaps for showing data. - [Actions](/docs/actions): 3 entries ## Choose how to use it Both paths use the same components and theme system. Choose based on whether you want dependency updates or direct ownership of the implementation. | Decision | Package import | CLI source copy | | --- | --- | --- | | Best fit | Use the library through its public API. | Adapt component internals for your product. | | Source | Imported from `@mielui/svelte`. | Copied into your repository. | | Customization | Compose parts, set props, and apply classes or tokens. | Use the same options, plus edit the source directly. | | Updates | Upgrade the package dependency. | Review upstream changes alongside your local edits. | Trying Mielui for the first time? Start with package imports. Choose source copy when you already know you need to change component behavior. ## Requirements - Svelte 5.56 or newer, with or without SvelteKit - Tailwind CSS v4 - pnpm, npm, Yarn, or Bun Start with an existing Svelte app and import the Mielui stylesheet once at the application level. ## Quick start Install the package: ~~~~sh pnpm add @mielui/svelte ~~~~ Import the shared styles in your application stylesheet: ~~~~css @import '@mielui/svelte/ui.css'; ~~~~ Then use your first component: ~~~~svelte ~~~~ Prefer local source? Initialize the CLI and add a component instead: ~~~~sh pnpm dlx @mielui/svelte init -y pnpm dlx @mielui/svelte add button ~~~~ Follow [Installation](/docs/installation.md) for the local stylesheet import, component paths, and full setup for either approach. ## Make it your own Set colors, typography, corners, spacing, and motion together in [Theme Studio](/studio). Preview the result on working components, then export CSS or JSON. Compound components expose named parts such as Root, Trigger, and Content. Compose the parts shown on each component page, and use classes to adjust individual regions without replacing the whole component. ## Where to go next - [Installation](/docs/installation.md): Set up package imports or the source-copy workflow. - [Components](/docs/components.md): Explore live examples, supported props, and composition patterns. - [Theming](/docs/theming.md): Apply a preset or connect theme tokens to your own design. - [Agent skill](/docs/agent-skill.md): Give your coding agent Mielui-specific guidance for implementation. --- Source: https://ui.miel.my/docs/installation.md # Installation Install Mielui into your project. ## Prerequisites - Svelte 5.56 or newer, with or without SvelteKit - Tailwind CSS v4 ## Package import Install the library and import components from `@mielui/svelte`. ~~~~sh pnpm add @mielui/svelte ~~~~ Import the stylesheet once in `src/app.css`. It already includes Tailwind, so remove any existing `@import 'tailwindcss'` line. ~~~~css @import '@mielui/svelte/ui.css'; ~~~~ Use a component: ~~~~svelte ~~~~ Compound components expose named parts. Import `Dialog` and compose `Dialog.Root` with `Dialog.Content` and the other parts you need. ## CLI source copy The CLI copies source into your project. The package name is `@mielui/svelte`; the binary is `mielui`. 1. Create a project. Skip this and the next step if your app already has Svelte and Tailwind. ~~~~sh pnpm dlx sv create my-app ~~~~ 2. Add Tailwind v4. ~~~~sh cd my-app pnpm dlx sv add tailwindcss ~~~~ 3. Initialize Mielui from the project root. This creates `src/lib/mielui/` for styles and utilities, plus `mielui.json`. ~~~~sh pnpm dlx @mielui/svelte init -y ~~~~ 4. Import the stylesheet. The copied stylesheet already includes Tailwind, so replace the `@import 'tailwindcss'` line that the Tailwind setup added. ~~~~css /* src/app.css */ @import './lib/mielui/ui.css'; ~~~~ 5. Add components. ~~~~sh pnpm dlx @mielui/svelte add button pnpm dlx @mielui/svelte list ~~~~ 6. Use them. ~~~~svelte ~~~~ ## Notes - Tailwind v3 is not supported. Mielui needs v4 `@theme` and `color-mix`. - Dark mode uses a `.dark` class on ``. - Built-in theme presets install with `pnpm dlx @mielui/svelte add theme `. Use `default` to start with the default preset. ## Next - [Theming](/docs/theming.md): Apply your brand with a preset or your own tokens. - [Components](/docs/components.md): Browse live examples and APIs. --- Source: https://ui.miel.my/docs/theming.md # Theming Components read CSS variables. Change tokens for a system-wide look, or override a single component with classes and selectors. ## Where tokens live Package installs use `@mielui/svelte/ui.css`. CLI installs use `src/lib/mielui/ui.css`. Both define the same color, typography, radius, and motion tokens. ## Override tokens Set values in your app CSS after importing Mielui's sheet. Light defaults go in `@theme`. Dark values go under `.dark`. ~~~~css @theme { --color-primary: #155eef; --color-background: #fcfcfd; --color-foreground: #101828; --radius-control: 9999px; --font-sans: 'DM Sans', sans-serif; } .dark { --color-background: #0d1118; --color-foreground: #f5f7fb; --color-primary: #7aa2ff; } ~~~~ The focus ring, the info status color, and the accent tint are mixed from `--color-primary`, so one value rebrands all of them. Set `--color-on-primary` when the text on filled buttons needs a different color. ## Useful public tokens | Group | Tokens | | --- | --- | | Color | `--color-background`, `--color-card`, `--color-panel`, `--color-secondary`, `--color-foreground`, `--color-foreground-muted`, `--color-primary`, `--color-on-primary`, `--color-button-foreground`, `--color-border`, `--color-input`, `--color-ring` | | Status text | `--mielui-success-text`, `--mielui-warning-text`, `--mielui-error-text`, `--mielui-info-text` | | Controls | `--size-control-sm`, `--size-control-md`, `--size-control-lg`, `--size-icon-md`, `--mielui-control-border`, `--focus-ring` | | Type | `--font-sans`, `--font-mono`, `--font-header`, `--font-size-header`, `--font-weight-body`, `--font-weight-label`, `--font-weight-button` | | Radius and density | `--radius-sm`, `--radius-md`, `--radius-lg`, `--radius-xl`, `--radius-2xl`, `--radius-control`, `--mielui-space-unit` | | Motion | `--motion-duration-hover`, `--motion-duration-menu`, `--motion-duration-panel`, `--motion-duration-sheet` | | Elevation | `--elevation-1`, `--elevation-float`, `--elevation-control`, `--elevation-control-edge`, `--elevation-modal` | Controls use three heights. Icon buttons match the medium height. `--focus-ring` is a 3px ring at half the primary color, and it composes with each control's existing edge. The default radius scale is 8, 10, 14, and 18 pixels from small to extra large. Plates use `--radius-2xl`, 26 pixels, and everything pressable uses `--radius-control`: 4 pixels in the sharp scale, 12 in the default scale, and a pill in the rounded scale. Use the status text tokens for success, warning, error, and info copy on tinted backgrounds and cards. They reach 4.5:1 contrast, while the raw status colors remain for fills, icons, and charts. ## Dark mode Toggle a `.dark` class on ``. Components do not manage the class for you. ## Built-in presets Mielui ships 18 built-in presets: `default`, `magic`, `bitsy`, `open`, `functional`, `daydream`, `honey`, `forest`, `ink`, `ocean`, `console`, `ember`, `lilac`, `profitable`, `raven`, `clawd`, `inspiration`, and `government`. Preview them on the [themes page](/themes), where you can copy each preset's CSS or JSON. With the CLI, install a preset into `theme.css`: ~~~~sh pnpm dlx @mielui/svelte add theme open ~~~~ Import it after `ui.css` to apply its overrides: ~~~~css @import './lib/mielui/ui.css'; @import './lib/mielui/theme.css'; ~~~~ `mielui list` shows available built-in theme slugs. ## Theme Studio [Theme Studio](/studio) lets you start from a preset and adjust colors, fonts, spacing, motion, and surface effects. Open All color tokens at the end of the Color tab to edit individual color tokens. Choose Export theme, open the CLI tab, download `mielui-theme.json` into your project root, and run the command for a new or existing Mielui setup. The JSON includes both color modes and all Studio overrides. New setups get `styles.css`, which imports `ui.css` followed by `theme.css`. Load that stylesheet in your root layout. Fonts must also be loaded by your app. ~~~~sh pnpm dlx @mielui/svelte init --preset ./mielui-theme.json ~~~~ For an existing setup, run the command below. It replaces `theme.css`. Built-in preset slugs, such as `default`, can be used in place of the JSON path. ~~~~sh pnpm dlx @mielui/svelte add theme ./mielui-theme.json ~~~~ ## Theme JSON Theme JSON version 4 is the format shared by Studio and the CLI. Export it from Studio to preserve both color modes and your overrides. - Base fields: `version`, `slug`, `name`, `description`, `brand`, `neutral`, `radius`, `density`, `motion`, `fontSans`, `fontMono`, and `fontHeader` are required. `publisher` is optional. - foundation: `light` and `dark` hold each mode's base, border, background, secondary, foreground, foregroundMuted, onPrimary, and buttonForeground colors. - typography: headerSize, headerWeight, and roleWeights for body, label, button, badge, and description text. - tokens: `shared`, `light`, and `dark` hold raw token overrides keyed by custom property, including per-mode values for `--color-primary`. - chrome: borders, edgeHighlight, surfaceShadows, controlShadows, dialogShadows, travelingHighlight, primaryStroke, and interactiveCursor. Turning off travelingHighlight keeps the selected fill and removes its movement. Set `motion: "none"` to disable animations, including dialogs, menus, and the traveling highlight. Edge highlight strength ranges from 0 to 1. ## Global glass surfaces Surfaces are solid by default. Set `--mielui-surface: glass` on `:root` and components with surface support inherit that choice when the prop is omitted. Set `surface="solid"` or `surface="glass"` on one component to override the theme. Put the variable on `:root` so portaled menus and dialogs inherit it too. ~~~~css :root { --mielui-surface: glass; } ~~~~ The global setting uses CSS style queries. Browsers without style-query support retain solid surfaces. Explicit `surface="glass"` still works with backdrop-filter support. Reduced transparency keeps an opaque background and removes blur. ## Class overrides Styled components accept `class`. Use Tailwind utilities or your own classes for one-off tweaks. Your classes win over the component defaults. ~~~~svelte ~~~~ ## Component selectors Components render `data-ui`, and often `data-variant` or `data-size`. Scope CSS to a family without forking files. ~~~~css [data-ui='button'][data-variant='primary'] { border-radius: var(--radius-md); } [data-ui='badge'][data-variant='secondary'] { text-transform: uppercase; } ~~~~ ## Edit the source With the CLI path, files live under `src/lib/mielui/components//`. Edit them when you need behavior changes, not just style. ~~~~console # after: pnpm dlx @mielui/svelte add button src/lib/mielui/components/button/ ├── button.svelte └── index.ts ~~~~ ## Borders Framed surfaces are a white frame holding a recessed inset in the page background. Set `chrome.borders` to `"single"` so the inset meets the border of the frame, or `"double"` for a gutter between the two. The default is `"single"`. ~~~~ts const theme = { ...DEFAULT_THEME, chrome: { borders: 'single' as const } }; const css = themeToCss(theme); ~~~~ The setting covers inset layouts: dialogs, sheets, drawers, toasts, Notch, code blocks, diffs, inset tables, inset and panel cards, alerts, and composers. Menus, selects, comboboxes, popovers, hover cards, date-picker panels, and chart tooltips always use a single border. ## Chart colors `--chart-1` through `--chart-5` color data series in order. Cartesian charts, pie charts, gauges, and heatmaps read them. Explicit series colors and semantic gauge tones still take precedence. ~~~~css :root { --chart-1: #b8a1f2; --chart-2: #f49d9d; --chart-3: #8bc7f5; --chart-4: #8ed8b0; --chart-5: #f2d77d; } ~~~~ ## Inset strip position `--mielui-inset-position` moves exposed chrome above or below its inset content. It takes `top` or `bottom`. Without that token, components keep their authored order. Override it locally with `class="[--mielui-inset-position:top]"` when a header must stay above its content. Data tables keep filters above rows and pagination below them. ## Edge highlights Filled controls are flat by default: buttons, moving thumbs, and selected segments take one solid fill held by a hairline, with no gradient or inner light. Set `chrome.edgeHighlight` above 0 to light them all at once. It also scales the light edge on keycaps. The default is 0, the flat look; 0.33 is the original lit look and 1 is full strength. Text fields, selection triggers, and outline buttons carry no fill either way. The `glow` button variant stays lit in a flat theme. To light another control on its own, add the `mielui-glow-lit` class next to `mielui-glow`. A near-white primary button with dark text is a theme choice: apply the built-in Open preset, whose dark primary is near-white, or set the brand color. ~~~~ts const theme = { ...DEFAULT_THEME, chrome: { edgeHighlight: 0.5 } }; const css = themeToCss(theme); ~~~~ For the rendered guide, visit [/docs/theming](/docs/theming). --- Source: https://ui.miel.my/docs/changelog.md # Changelog ## 0.4.1 · Unreleased ### Fixes - Dark-mode colors from a theme, such as Background and On brand in the Theme Studio, now apply instead of being overridden by the default dark palette. - The docs site now runs SvelteKit 3.1.1 and patched Vercel and Node adapters, which fix several published security advisories. ### Docs - The home page is redesigned: a dark hero in the theme's primary color with a coding-agent preview, a short case for Mielui, a how-it-works walkthrough, and an index of every component. ## 0.4.0 ### Breaking changes - The default theme is flat. Primary, secondary, and destructive buttons, switch and slider thumbs, checked checkboxes and radios, selected tabs, toggles, pagination pages, and calendar days take one solid fill held by a hairline, with no gradient, inner light, or drop shadow. - `chrome.edgeHighlight` defaults to 0 instead of 0.33. Set it above 0 to light every filled control again; 0.33 restores the previous look. - `chrome.controlShadows` defaults to off, so fields, outline buttons, keycaps, and toolbar keys are held by their hairline without an edge light or contact shadow. - Flat filled controls change tone on hover at once and darken further on press, instead of fading in a light. - The `glow` button variant stays lit in every theme, including flat ones. Add the new `mielui-glow-lit` class to light any other `.mielui-glow` control. - The `glow` variant is now lit in Ink, Console, and Daydream, which set the edge highlight to 0. - The Magic, Open, Functional, Honey, Forest, Ocean, Lilac, Profitable, Raven, Clawd, Inspiration, and Government presets now render flat. Bitsy and Ember keep their lit look. - The `panel` button variant no longer carries a resting elevation. - Tooltips wait 500ms for a resting pointer instead of 125ms. Keyboard focus opens them at once, and `delay` applies to the pointer only. - The default radius scale is rounder: 10/12/16/20px, 28px plates and 14px controls, up from 8/10/14/18px, 26px and 12px. Pick the sharp scale or set the radius tokens to keep the old shape. - The `glow` variant and `.mielui-glow-lit` light at 30% when the theme is flat, down from 33%. ### Features - `@mielui/svelte` accepts SvelteKit 3 as a peer dependency, alongside SvelteKit 2. Mielui imports no SvelteKit runtime, so package installs work in either version. - Source copied by the Mielui CLI still imports from `$lib/mielui`, which SvelteKit 3 no longer provides. In a SvelteKit 3 app, install the package or add a `$lib` alias until the CLI supports `#lib` imports. ### Fixes - Fixed docs pages going partly or fully blank while scrolling the sidebar in Chrome. Pinned sidebar labels now fade without a blur. - Component pages appear complete after an in-app link, so scrolling down quickly no longer reaches examples that are still loading. - A docs page opened from an in-app link no longer flashes at the previous scroll position or jumps back to the top after scrolling starts. - Scrolling the docs no longer restyles the whole page on every frame, so it stays smooth on long pages. - An open docs tab picks up a new deploy on the next link instead of running the old version until a reload. - Scrolling a docs page quickly in Chrome no longer leaves parts of it blank. - The component catalog renders every preview with the page, so scrolling quickly no longer reaches empty cards that fill in afterwards. - Hover colors on Button, Badge, table rows, calendar days, breadcrumbs, disclosure rows, and other hover-only controls change instantly instead of fading in. - The press scale on buttons and menu items settles in 120ms instead of 160ms, and no longer delays hover colors. - Closing a Sheet or Dialog while it opens, or reopening it while it closes, turns it around from where it is instead of jumping or snapping into place. - Reopening a Popover, DropdownMenu, ContextMenu, HoverCard, or DatePicker while it closes turns it around from where it is instead of restarting its entrance. - Clicking a DropdownMenu trigger while its menu closes reopens the menu instead of being swallowed. - In light mode, checked Checkbox and Radio fills and the on Switch track are slightly darker, so the default brand color reaches 3:1 against the page. ### Docs - Docs pages are prerendered and served as static files, so they no longer wait for a server render on a cold visit or after an in-app link. - Docs pages load about a quarter less JavaScript up front. Search and notifications load once the page is idle, and Cmd/Ctrl+K still opens search right away. - Google Fonts load only on Fonts, Theme Studio, and Themes, or when a saved font or theme uses them. - The GitHub star count in the docs sidebar updates on each deploy. - Docs sidebar links open on mouse press instead of release. - The blurred fades at the page edges, under pinned sidebar labels, and under the catalog search row ease in instead of ending in a hard line. - New homepage: a centered hero over a wall of live components that any built-in theme restyles in place, an index of every component group, side-by-side code and result for composed components, the live demos, and install steps. - New docs layout: one borderless sidebar on the page color replaces the dark frame, icon rail, and panel. - The sidebar holds the brand, GitHub, the theme toggle, and a search field at its top. - Docs groups are marked with colored stickers in the sidebar, page headers, and previous and next links. - Page headers show their group and a soft tint of its color instead of a breadcrumb. - The docs, Themes, Fonts, and Theme Studio share the same sidebar, so the brand and search stay in one place. - Theme Studio's settings moved to a panel on the right, so the docs sidebar stays on the left. - Components, Theme Studio, Themes, and the Changelog are plain links at the top of the sidebar. - The docs default to the system font; the font picker and live themes still change it. - Moving between the homepage and the docs fades between pages and glides the logo, except under reduced motion. - The docs use a near-black page with lighter cards in dark mode and a neutral grey page with white cards in light mode. - The page outline at the right edge is larger and easier to hit. - The tab dock at the bottom of docs pages is gone, along with Cmd/Ctrl-click to open a page in a background tab. - The docs sidebar has a fixed width, and the article is centered on the window when there is room. - Theme Studio's settings panel matches the sidebar: a sticker for the preset, sidebar-style group titles, and a slim export strip with the number of changes. - Theme Studio opens on seven essential settings with no tabs. Every other setting sits under one All settings disclosure, grouped by tabs, and the settings search still finds all of them. - The Studio preview tools and preview switch float as borderless clusters, like Copy page. - The Themes page shows each theme as a tile with its specimen inside, a white Apply button, and a quieter Details button. - The browser toolbar color follows the light or dark mode chosen on the site and any live theme, not only the system setting. - Hover highlights in the docs sidebar, links, and page chrome appear instantly, and sidebar links give a slight press. - A new Theme Studio draft starts on the default theme's fonts, so Font and Mono no longer show a reset button before anything changes. - On phones, the docs navigation unfolds in place from a button named after the current page, and scrolls inside itself so part of the page stays in view. - Opening Theme Studio without changing anything no longer replaces the site's colors and font on every page. - The current page in the docs sidebar sits on a soft wash in the foreground color instead of a lit pill. - Theme Studio's Edge highlight is off by default and turns on at 30%. - The Form page shows how to enable remote functions in SvelteKit 3, in the `sveltekit()` plugin options in `vite.config.ts`. ## 0.3.0 ### Breaking changes - The default theme is redesigned. Surfaces are white plates on a grey stage, every neutral is derived from the foreground color, every control shares one radius, and filled buttons are lit. Explicit themes keep their colors, and every theme picks up the new shapes and motion. - The default fonts are Inter Tight and Geist Mono instead of Manrope and JetBrains Mono. `ui.css` imports them from `@fontsource/inter-tight` and `@fontsource/geist-mono`, and the package no longer depends on the old two. - Text weight stops at 500. `font-semibold` and `font-bold` resolve to 500, and `--font-weight-header` is 500. Build hierarchy from size and color, or set `--font-weight-semibold` and `--font-weight-bold` back to 600 and 700. - `--color-border`, `--color-border-strong`, and `--color-input` are translucent mixes of the foreground instead of opaque greys. A theme that sets `foundation.border` keeps its own color. - Two-layer surfaces swap their layers. The frame is now the card color and the inner surface is the page background, so content in an inset Card, a Dialog, a CodeBlock, or a Composer sits on the recessed stage color with white fields on top. - The default edge highlight is 33% instead of 50%. Borders stay single and cards and menus stay without shadows, as before. - The radius scale changes. `--radius-xl` is 18px instead of 20px, plates use the new `--radius-2xl` (26px), and controls use the new `--radius-control`: 4px in the sharp scale, 12px in the default scale, and a pill in the rounded scale. Buttons were 14px before. - Primary, secondary, and destructive buttons are lit like `glow`. Outline is flat: a hairline on the field color with no inset shading. - The primary button's text is dark on the default brand in light mode as well as dark, so it passes contrast. `--color-on-primary` is `#21151e` in both. - Text fields, native selects, select and combobox triggers, and number fields take `--radius-control` like buttons. Textarea and TagInput use `--radius-xl`. - The focus ring is 3px at half the primary color instead of 2px at 80%. - Menus, selects, and popovers spring open in 220ms from their trigger's side and close on a 100ms fade. Dialogs pop from 96% scale in 400ms and leave in 150ms. The blur on both is gone. `--motion-duration-panel-in`, `--motion-duration-modal-in`, and the menu and modal offset tokens have new defaults. - ToggleGroup sits in a segmented track, so it is two spacing units taller and wider. Its selected item is a lit fill that glides between items. - Table's default variant has no outer frame or header fill. `variant="inset"` and DataTable put the header and footer on the frame and the rows on a recessed surface. - Alert is one notice strip. Status variants tint the icon only, with no colored fill or border. - ScrollArea no longer shows chevrons at an edge with more content. `showCues` fades the edge instead, and the thumb stays hidden until hover, focus, or scroll. - Composer is a recessed frame holding a white writing surface. Its focus ring shows only while the textarea is focused. - The default Toolbar paints a grey track behind its keys. - Badges take `--radius-control` instead of a pill, and status variants have no colored border. - Tag Input renders its tags as secondary badges instead of outline badges. - The Checkbox card row (`variant="card"`, formerly `primary`) no longer tints with the primary color. - Collapsible content is muted and inset to line up with its trigger text. - Breadcrumb items are padded, so the trail's text starts one item padding further in. - Tooltips reposition instantly when the pointer moves to the next trigger instead of gliding there. - Switch thumbs no longer stretch while pressed. - Calendar, RangeCalendar, DatePicker, DateRangePicker, and OTPField parts expose their DOM node as `bind:element`, like every other component. `bind:ref` on those parts no longer works. HugeiconsIcon's `ref` prop is `element` too. - The exported `PopoverState` type loses `focusedInside`, `trigger`, `focusedElement`, `onclick`, and `hovering`. Nothing read them. - `closeMenuLayers` is no longer exported from `@mielui/svelte/utils`. No component used it. - The internal overlay module no longer exports `useOverlay`, `OverlayOptions`, or `parentOverlayDepth`. Dialog and Sheet stopped using them when Bits UI took over focus and dismissal. - Tabs, CodeBlock, FileDiff, and the `labels` of every family share state under private keys. Code that read them with `getContext('tabs')` or a similar string key gets `undefined`. - Button takes a `labels` object (`ButtonLabels`) instead of `loadingLabel`, `successLabel`, and `errorLabel`. Menu items, select and combobox options, dialog buttons, `Form.Submit`, and other parts built on Button follow. - CopyButton takes `labels` instead of `label` and `copiedLabel`. `CodeBlock.Copy` drops both props and reads `copy` and `copied` from the `labels` on CodeBlock. - ShowMore takes `labels` (`more`, `less`, `region`) instead of `moreLabel`, `lessLabel`, and `label`. - `Command.Content` drops `label`. Name the palette with `labels.palette` on `Command.Root`. - TaskSteps takes `labels` instead of `label`. The same object translates the summary sentence. - `FolderCard.Count` drops `unit`. Set the count text with `labels.count` on `FolderCard.Root`, which now says "1 file" for one. - DataTable's `labels.rows` and `labels.selected` return the whole phrase and receive the counts, so a translation can place the number. `selected` also receives the total. - `Composer.Root` drops `errorMessage`, and `Composer.Submit` drops `label`, `queueLabel`, `stopLabel`, and `loadingLabel`. Pass `labels` to `Composer.Root` instead. - `Question.Root` drops `errorMessage`, and `Question.Submit` drops `label` and `loadingLabel`. Use `labels.submitError`, `labels.submit`, and `labels.submitting` on `Question.Root`. - `Conversation.ScrollButton` drops `label`. Pass `labels` to `Conversation.Root` instead. - Reasoning's `labels.thought` applies only without a `duration`. With a duration, `labels.thoughtFor` sets the whole status line. - `AccordionContext`, `AlertDialogState`, `CollapsibleState`, `ContextMenuCheckboxItemState`, `TabsState`, and `ToggleGroupContext` are no longer exported. - `ContextMenu.Item` and `DropdownMenu.Item` accept only `variant="destructive"`. Menu rows no longer accept `size` or `unstyled`, which they ignored. - `DropdownMenu.SubTrigger` no longer accepts Button props it ignored, such as `icon`, `variant`, `size`, and `unstyled`. - `Select.Trigger` no longer accepts `icon`, `Select.Item` no longer accepts `unstyled`, `Select.Value` accepts only `placeholder` and `class`, and Slider no longer accepts `children`. None of them were used. - `DatePicker.Root` renders a wrapping `div` so it can expose `bind:element`. - Dialog and Alert Dialog no longer accept `orientation`, and `DialogOrientation` is no longer exported. `size` on Content is now the only width control, and it accepts a new `xs` step. - Popover and Combobox no longer accept `stateKey` or `state_key`, and `Dialog.Content` no longer accepts `role`, `contentClass`, or `panelIdPrefix`. Combobox Content no longer accepts `focusTrap`, which it ignored. - `Select.Item` and `Combobox.Item` no longer accept `variant`, `size`, or `unstyled`, which they ignored. - TagInput's `requiredMessage` is replaced by `labels.required`. - `AlertDialog.Exit` is renamed `AlertDialog.Close`, matching Dialog. - `Sheet.Header` takes `showClose` in place of `close`, matching `Dialog.Content`. - TagInput takes `invalid` and `issues` in place of `error`, matching `Field.Root`. - Hover Card takes `placement` on Root in place of `side` and `align` on Content, and `delay` in place of `openDelay`, matching Popover and Tooltip. - Checkbox's `variant="primary"` is renamed `variant="card"`. - Spinner's `curved` is renamed `eased`. ### Features - Composer has a `Footer` part: a strip on the frame under the writing surface for hints, connected apps, or message-wide settings. - Button has a `glow` variant: a lit fill for a page's headline action, with `--mielui-glow-color` and `--mielui-glow-light` to change its color and brightness. - `ui.css` ships four class contracts: `mielui-plate` for a resting surface, `mielui-float-frame` for a floating panel, `mielui-glow` for the lit fill of filled actions, and `mielui-glow-neutral` for the white selected fill on a track. - `--color-wash` is the one hover and selected-row fill. - `--mielui-glow-ring` sets the outer edge of a lit control. - Four spring curves are theme tokens: `--ease-spring-panel`, `--ease-spring-layout`, `--ease-spring-pop`, and `--ease-spring-flick`, with `--motion-duration-spring`, `--motion-duration-pop`, and `--motion-duration-flick`. `springEase` in `@mielui/svelte/transition` builds the same curves for Svelte transitions. - Plates and frames use continuous-curvature corners where the browser supports `corner-shape: squircle`. - The theme's edge highlight now scales the light on every lit control. - Tabs, ToggleGroup, Toggle, and Pagination mark selection with a lit fill. Tabs and ToggleGroup indicators glide between items. - Switch and Slider thumbs, the checked Checkbox and Radio, and the selected Calendar day are lit. - `DropdownMenu.Item` and `ContextMenu.Item` render `variant="destructive"` as an error-colored row with a tinted highlight. Radio items show a dot. - A direct button or link inside Alert becomes its one action, at the end on wide layouts and last when stacked. - SkeletonSwap lines sweep out of phase, and arriving content sharpens from a slight blur. - Composer's send button becomes a lit stop control while streaming. - Reasoning's label shimmers while thinking. - Chart, pie, and heatmap tooltips and the crosshair follow the pointer on the layout spring. - Calendar days take the control radius with a dot under today, and a selected range is a continuous wash. - Date and color pickers open as floating panels. - Kbd is a mono keycap and takes an inverse look inside tooltips. - Spinner is a thin ring. - A selected Question option takes the neutral wash instead of a primary tint, and its radio or check mark is lit. - FolderCard is a single plate with the cover flush to its edge and a card-colored body. - The theme's motion feel scales the spring, pop, flick, item, panel, and dialog durations together, and `--ease-drawer` is a theme token. - A second agent skill, `mielui-design`, teaches coding agents to lay out whole pages with Mielui: app shells, dashboards, data tables, settings, chat workspaces, and marketing sites. Install it with `npx skills add mielsense/mielui --skill mielui-design`. - Slider, NumberField, Dialog, Sheet, Notch, Toaster, Command, ColorPicker, Question, and Gauge take a `labels` prop that translates their built-in text and accessible names. Each exports its `Labels` type; Toaster's is `ToastLabels`. - `TagInputLabels` adds `added`, `removed`, and `required`. `FileUploadLabels` adds `uploadFailed`. `DataTableLabels` adds `removeFilter`, `done`, `previous`, and `next`. `ChartLabels` adds `noData`, and `HeatmapLabels` adds `summaryPending`. - `createContext` from `@mielui/svelte/utils` returns `find()` next to `get()` and `set()`. `find()` returns `undefined` outside the root instead of throwing. - `@mielui/svelte/utils` exports the `WithElement` type, which swaps a primitive's `ref` prop for a bindable `element`. - Button, Kbd, `Form.ErrorSummary`, SkeletonSwap, CopyButton, ShowMore, TaskSteps, FolderCard, Composer, and Conversation take a `labels` prop. Each exports its `Labels` type. - `CommandLabels` adds `palette` and `available`. `ToastLabels` adds `count`. `ColorPickerLabels` adds the trigger name and a name for each channel slider. `DataTableLabels` adds `row`, `selectPage`, and the filter summary keys. `QuestionLabels` adds `submit`, `submitting`, `answer`, and `placeholder`. `ReasoningLabels` adds `title`. - Chart, Heatmap, Table, Group, and NativeSelect export a prop type for every part. Select adds `SelectTriggerProps`, `SelectContentProps`, and `SelectLabelProps`, and HoverCard adds `HoverCardTitleProps` and `HoverCardDescriptionProps`. - The root entry exports every public prop, labels, and variant type, including the PieChart, EmptyState, and Notch types. - `DatePicker.Root` supports `bind:element`, like `DateRangePicker.Root`. ### Fixes - Outline buttons inside a Group use the same border color as the inputs, text, and dividers beside them. They kept a lighter border, so the frame changed color partway around. - Composer gives the input and its joined toolbar more padding. - Outline buttons wrapped in a Tooltip or another trigger inside a Group take the group's border color too, so the frame no longer changes color at the wrapped button. - The traveling highlight in menus and the command palette is measured correctly while its panel is still scaling in, so the first highlighted row is no longer too narrow after a keyboard open. - The traveling highlight snaps to the active row for arrow keys and selection changes, and only glides for a pointer. - Combobox results no longer animate their height on every keystroke. - An indeterminate Progress pulses under reduced motion instead of freezing as a one-third bar. - Tooltips scale from their trigger instead of their center. - Toasts fade in as they rise instead of appearing at full opacity. - Nested corners share a centre. Dialog, Sheet, Drawer, inset Card, Table, and Composer frames take their radius from the control radius plus their two-unit strip padding, menus and popovers from their rows, and CodeBlock, Toolbar, and the Reorder List handle follow the same rule. - A closed Select or Combobox no longer intercepts clicks on whatever sits below its trigger. - Dropdown menus, context menus, their submenus, and Select and Combobox lists keep an 8px margin from the window edge instead of sitting flush against it. - Collapsing an Accordion, Collapsible, Reasoning, or Tool no longer logs an "Invalid keyframe value for property height" warning. - `Message.Content` caps assistant and system text at 65 characters per line, as intended. The cap was losing to a full-width class. - Closing a Dialog or Sheet from a menu item or confirmation inside it, in the same tick, no longer logs Svelte's `derived_inert` warning. - The info status color and the accent tint follow `--color-primary`, so setting that one token rebrands them too. - `Command.Header` leaves the palette when it is removed instead of staying until the page reloads. - `Popover.Trigger` renders the chevron its `icon` prop describes. It is off by default and turns while the popover is open. - CodeBlock keeps its gutter beside the code when `theme="custom"` is combined with line numbers or an inline copy button. - `Toolbar.Group` stacks its items in a vertical toolbar, and vertical items share one width. - Calendar, Range Calendar, Date Picker, and Date Range Picker keep the visible month when their props change, which also stops a crash in the month and year selects when props are spread onto the root. - Long weekday names are cut with an ellipsis instead of overlapping in the calendar header. - A date field with `granularity="hour"` no longer shows a stray "(second: 00)" after the hour. - `Select.Trigger` accepts `aria-invalid` in its type. - The placeholder and chevron on primary, destructive, and glow Select and Combobox triggers take the button's text color, so they are readable on the fill. - A Combobox search field keeps the typed query after a pick instead of showing the picked label. - A Textarea with a footer no longer shows the browser's resize grip inside its frame. - `Group.Text` matches the height of the controls beside it in a vertical group. - Checked task items in Markdown show a tick instead of a dash. - The Conversation scroll button no longer catches clicks while it is hidden. - User messages are capped at 90% of the transcript width and system messages at their own measure. Both caps were losing to a full-width class. - A selected radio and a selected Toggle Group item keep their lit edge while focused, instead of showing only the focus ring. - A disabled radio's label shows the not-allowed cursor. - The Reorder List handle darkens while its row is lifted. - A tabbed CodeBlock scrolls in one place. Its panels no longer carry a second, competing height limit. - `Tabs.List` accepts `id`, `aria-label`, and `aria-labelledby` in its type, and `Combobox.Trigger` accepts `aria-labelledby`. - A standalone Label uses the same line height as the labels built into fields. - `mielui add kbd` installs the two modules Kbd imports. Its manifest left them out, so a CLI install could not compile. - `mielui add data-table` lists the shared context helper its parts use. - A part of Accordion, Radio Group, Toggle Group, Hover Card, Tooltip, or File Upload used outside its root throws an error that names the missing root. - `Combobox.Label` no longer copies its own props onto the paragraph as HTML attributes. - `FileUpload.Trigger` shows `labels.choose` when it has no children. It ignored the label before. - Chart tooltips, the crosshair, and the line marker appear at the hovered point instead of sliding in from the chart's corner. - Chart, Pie Chart, and Heatmap tooltips move instantly when the keyboard drives them, and glide only for the pointer. - Chart axes keep as many decimals as their ticks need, so 0.25 no longer reads as 0.3. - The chart's screen-reader data table formats dates and numbers the same way as the visible chart. - Gauge and Pie Chart read a unitless motion duration token as milliseconds instead of seconds. - Reasoning no longer renders `data-streaming="false"` while idle, so `[data-streaming]` selectors match only a live trace. - The Composer error notice uses the accessible error text color. - Closed popovers no longer recompute their position on every scroll and resize. - `DropdownMenu.Trigger` draws its chevron when `icon` is set instead of writing an `icon` attribute onto the button. - File Upload adds files on pages served over plain HTTP. It threw because it relied on `crypto.randomUUID()`. - `Group.Text` renders at the label size. - `Button` stays a non-submit button when `type={undefined}` is passed. - Checkbox keeps the native input in sync when an `oninput` handler cancels the change, and after a form reset. - Checkbox items inside a `ContextMenu.Sub` keep their checked state after the menu closes and reopens. - Alert Dialog's Exit and Confirm buttons sit on the correct sides in right-to-left layouts. - Link badges show the shared focus ring and use the theme's interactive cursor. - The highlight in menus, Select, and Combobox no longer sits a fraction of a pixel off its row. - SkeletonSwap stops its loading sweep once the placeholder is hidden, offscreen, or in a background tab. - Tag Input tags use the theme's interactive cursor instead of always showing a pointer. - Folder Card titles keep the same id between server and client render. - The Toast position counter is announced to screen readers. - `mielui add` installs the peers and shared modules that Command, Data Table, Toast, Popover, Select, Radio Group, and the date pickers import, and no longer copies files they do not use. - Manifests declare the Svelte version Mielui actually requires, `^5.56.0`, so `mielui add` no longer accepts an older Svelte that cannot compile the copied files. - `Select.Trigger` binds its node with `bind:element`, as its docs said. - CopyButton's `oncopy` accepts a `(text) => void` handler without a type error. - Server-rendered inset cards, code blocks, and other two-layer surfaces put their header or footer strip on the theme's inset edge from the first paint, instead of moving it once scripts load. - Tabs show the selected tab's indicator in server-rendered HTML, before scripts measure it. - The Toast close button uses the small control size, the control radius, the shared hover wash, and press feedback. - Data Table filter options hover with the shared wash instead of the secondary fill. - OTP Field cells take the control radius, so the sharp and rounded radius scales apply to them. - The Hover Card trigger shows the shared focus ring. - An empty Data Table shows "No pages" without a page button beside it. - The File Upload dropzone's default description starts in lowercase, so it reads as one sentence with its title. - Heatmap reads the theme's motion once per chart instead of once per cell, so year-long heatmaps mount faster. - The Toast stack computes each toast's offset once per change instead of re-summing every height for each toast. - Copied component folders name their context module `context.ts` instead of `context.svelte.ts`. Re-adding a component leaves the old file behind; delete it. ### Docs - The docs, Theme Studio, Themes, and Changelog share a new shell: a near-black frame with an icon rail, around one panel that holds the sidebar and the page. The frame is the same in light and dark mode. - The rail holds the brand and the sidebar toggle at the top, Docs, Components, Theme Studio, Themes, and Changelog in the middle, and search, the theme toggle, and GitHub at the bottom. One highlight marks the current page and slides to the next. - The docs shell drops the status line under the page. - Sidebar navigation is a plain text list with more space between groups. Search moves to the rail, or the header on small screens, and stays on Cmd/Ctrl+K. - The sidebar's current page is marked by a highlight sized to its label that slides between pages. - Pinned section titles in the sidebar stay fully legible while their section scrolls. - Open pages are tabs in a floating dock at the bottom of the page, styled like a toggle group. - Documentation pages center the article in a column at most 60rem wide, with more space between sections and a larger page title. - Docs text runs the full width of the article, level with previews and code. - The docs page outline is a minimap of dashes at the right edge instead of an "On this page" list. Dashes grow toward the pointer and the nearest one shows its heading. - Copy page sits at the top end of the page and is smaller, with less space around its buttons. - The fade at the bottom edge of the page and the sidebar is shorter and no longer blurs far into the text. - Every component page opens with a playground. Pick a variant in the toolbar, change the other props in the Props menu, and the code under the preview follows. - Every example frame keeps its preview in view: the Code button slides the source open under it, long sources start collapsed and expand with the same motion, and Full screen opens the preview on its own. - Slider, Number Field, Dialog, Sheet, Notch, Toast, Command, Color Picker, Question, and Gauge pages have a Labels section. - The calendar and date picker pages say that days outside the month are disabled by default, and the API tables list that default. - The Data Table `variant` description says what each variant frames. - Theme Studio shows its preview on the panel, with its tools in a floating menu at the top end. - Theme Studio switches preview modes with a floating segmented control at the bottom center of the preview instead of tabs in the top bar. - Theme Studio no longer has a Primary button border setting. Lit buttons draw their own edge, so it had no effect. - Theme Studio undo keeps recording after the page settles, and separate edits stay separate steps. - Theme Studio counts a brand color edit as one changed setting. - A share link request that fails late no longer clears a link built from a newer draft. - A live theme saved by an earlier version of the docs is rebuilt from the Studio draft instead of being applied as stale CSS, which left the page and the content plate the same color in light mode. - The Workspace address field in the Studio preview has a divider between the `mielui.dev/` prefix and the slug, so the two no longer read as one field with a gap in it. - The Markdown theming guide at `/docs/theming.md` now carries the full guide: token overrides, the public token table, presets, theme JSON, and selectors. - Component Markdown references include the modules their examples import, such as the Data Table and Heatmap `data.ts` files. - The Markdown references for Alert, Badge, Button, and Toolbar no longer list sixteen example files that no docs page showed. - The agent skill explains `bind:element` and the `labels` prop. - Usage snippets on component pages are complete Svelte files with a `