Skip to content
h v3.13.3
Search the docs
Find a component, section or page.

Work parts

The pieces the kanban, task list and gantt share: a group head with its count, the grey well, a white card, a drop hole and a property row.

In progress 1
Send the signed SOW to the client
Oct 282 of 5
Ramzi
28 Oct

Installation

pnpm add @heyramzi/ui

Usage

import {
  GroupHead,
  PropertyRow,
  WorkCard,
  WorkWell,
  workLooks,
} from "@heyramzi/ui/components/work-parts";
<GroupHead label="In progress" hue="var(--color-info)" count={1} onAdd={addTask} />
<WorkWell hue="var(--color-info)">
  <WorkCard>
    Send the signed SOW to the client
    {#snippet meta()}<span>Oct 28</span>{/snippet}
  </WorkCard>
</WorkWell>
<PropertyRow label="Assignee">Ada</PropertyRow>

Keyboard and accessibility

  • GroupHead's plus button is named by the add label and the group, like "Add: In progress".
  • PropertyRow is a group named by its label, so the value is read with its label even where a narrow row hides it.
  • WorkCard and WorkWell take no focus. Put a button or a link in a card that opens something.

API reference

WorkWell

hue string
Any CSS colour. Tints the well only while something is held over it.
active boolean
Default false
Something is held over the well.
children required Snippet
class string
...rest
Every prop of HTMLAttributes<HTMLDivElement> from svelte/elements
Prop Type Default
hue

Any CSS colour. Tints the well only while something is held over it.

string
active

Something is held over the well.

boolean false
children required Snippet
class string
...rest Every prop of HTMLAttributes<HTMLDivElement> from svelte/elements

GroupHead

label string
title Snippet
Drawn in place of `label`, in the caller's own type, for a head whose name is markup.
hue string
The status colour of the dot. Leave out for no dot.
count number
Leave out for no count chip.
onAdd () => void
Shows a plus at the end that adds an item to this group.
addLabel string
Default "Add"
children Snippet
Extra controls before the plus.
class string
Prop Type Default
label string
title

Drawn in place of `label`, in the caller's own type, for a head whose name is markup.

Snippet
hue

The status colour of the dot. Leave out for no dot.

string
count

Leave out for no count chip.

number
onAdd

Shows a plus at the end that adds an item to this group.

() => void
addLabel string "Add"
children

Extra controls before the plus.

Snippet
class string

WorkCard

meta Snippet
The bottom row: dates, subtasks, time, avatars.
children required Snippet
class string
...rest
Every prop of HTMLAttributes<HTMLElement> from svelte/elements
Prop Type Default
meta

The bottom row: dates, subtasks, time, avatars.

Snippet
children required Snippet
class string
...rest Every prop of HTMLAttributes<HTMLElement> from svelte/elements

PropertyRow

label required string
icon Component<{ class?: string; "aria-hidden"?: boolean | "true" | "false" }>
A Phosphor icon before the label.
layout "row" | "responsive"
Default "row"
`responsive`: the label hides in a narrow container (a chip row) and shows as a column from `@3xl` up. `row`: always icon, label, value.
children required Snippet
class string
Prop Type Default
label required string
icon

A Phosphor icon before the label.

Component<{ class?: string; "aria-hidden"?: boolean | "true" | "false" }>
layout

`responsive`: the label hides in a narrow container (a chip row) and shows as a column from `@3xl` up. `row`: always icon, label, value.

"row" | "responsive" "row"
children required Snippet
class string

CountChip

count required number
size "sm" | "md"
Default "md"
`sm` is 16px, for a count inside a control or on a button; `md` is 20px, beside a heading.
tone "neutral" | "brand"
Default "neutral"
`brand` marks a count that is on: an applied filter, the selected segment.
class string
...rest
Every prop of HTMLAttributes<HTMLSpanElement> from svelte/elements except children, class
Prop Type Default
count required number
size

`sm` is 16px, for a count inside a control or on a button; `md` is 20px, beside a heading.

"sm" | "md" "md"
tone

`brand` marks a count that is on: an applied filter, the selected segment.

"neutral" | "brand" "neutral"
class string
...rest Every prop of HTMLAttributes<HTMLSpanElement> from svelte/elements except children, class