@worknepal/ui

Kitchen sink

Every component, every state. Midnight & saffron system, Bikram Sambat first, money in paisa.

Foundations

Theme iris. Every value below is read from the live palette, so this page is the side-by-side when you switch NEXT_PUBLIC_THEME and restart. Contrast is verified by pnpm theme:audit, not by this grid.

Ink · chrome and the primary action

midnight#48315f
midnight-hi#644b7f
midnight-lo#3f2a54
teal-soft#e1aeff
focus#a472d7
selected#f2e8ff

Paper and ink text · the neutral ramp

white#ffffff
paper#f8f7fa
surface#f2f0f6
sunken#ebe8f1
border#e5e1eb
border-strong#cfcbd7
text-1#271d31
text-2#535163
text-3#6c6b7c

teal · accent · info · focus

teal#a472d7
teal-hover#9060c0
teal-press#8355b1
teal-lt#f2e8ff
teal-text#7e4fac

chipfilledsmall text on white

sage · success

sage#008854
sage-hover#007c4a
sage-press#006b3d
sage-lt#daf4e6
sage-text#007646

chipfilledsmall text on white

clay · danger

clay#c45249
clay-hover#b0443c
clay-press#9d3630
clay-lt#ffe5e1
clay-text#ab423a

chipfilledsmall text on white

saffron · warning · pending · late

saffron#eaa83f
saffron-hover#fab957
saffron-press#d89932
saffron-lt#faebd8
saffron-text#925900

chipfilledsmall text on white

violet · employer share · holiday

violet#576ce2
violet-hover#4a5dcd
violet-press#3e4eb9
violet-lt#e3ecff
violet-text#485bc9

chipfilledsmall text on white

Display · Plus Jakarta Sans

Body · Inter at 18/lg for lead paragraphs

Body · Inter at 15/base — the working size.

Mono · JetBrains 1,23,456.78 · WN-0042 · 09:45

Devanagari fallback · Mukta — कर्मचारी व्यवस्थापन, तलब, बिदा

Buttons

primary
secondary
accent
danger
ghost

Form controls

Fields

Label, helper text, required and error states.

As it appears on citizenship documents.

Used for approval routing.

Visible to your approver.

Choices

Checkbox, radio, switch.

Status chips & badges

PresentAbsentLateHalf dayOn leaveHolidayApprovedRejectedPendingDraftProcessingDisbursedFailed
PresentAbsentLateHalf dayOn leaveHolidayApprovedRejectedPendingDraftProcessingDisbursedFailed
NeutralMidnightSaffronTealClaySageVioletOutline

Avatars

Money & Nepali dates

<Money />

Paisa in, tabular-nums mono out. Negatives in clay.

Lakh grouping (default)NPR 12,34,567.89
Standard groupingNPR 1,234,567.89
Whole rupeesNPR 85,000
No symbol4,500.50
Negative (advance)NPR -15,250.75
One croreNPR 1,00,00,000

<NepaliDate />

BS / AD / dual display; Devanagari via locale.

BS (default)17 Shrawan 2081
ADAug 1, 2024
Dual17 Shrawan 2081 · Aug 1, 2024 AD
नेपाली१७ साउन २०८१
From BS object17 Shrawan 2081 · Aug 1, 2024 AD

Bikram Sambat date picker

BS calendar with real month lengths; toggle to AD in the footer.

Date & time fields

The replacements for the native controls

<DateField> speaks the same ISO yyyy-MM-dd string<input type="date"> did and shows the BS equivalent beneath it, so it drops into a form without changing what is posted. Reach for<DatePickerBS> instead when the BS date is the thing being chosen — a payroll period, a fiscal year.

Nothing selected.

Only this month is selectable.

Optional dates get an inline clear.

09:00

datetime-local's replacement.

Rich text

Authoring and rendering are one stylesheet

<RichTextEditor> emits HTML sanitised to @worknepal/rich-text's allowlist, and <RichTextContent> renders it back through the same .wn-proserules — so a notice cannot look one way while it is written and another once it is published. Server code must sanitise again; the editor's pass is a formatting nicety, never the boundary.

Toolbar, paste cleanup, ⌘B / ⌘I / ⌘K.

For templates, where the author must see the markup.

Rendered

The office will be closed for Dashain.

  • Ashwin 20 to 26

Cards & stat cards

Monthly payrollNPR 43,25,000+4.2%vs Ashadh
Headcount128+32 offers pending
Absent today7+2of 128
Employer SSFNPR 8,64,0000%20% of basic

Card anatomy

Header, content, footer — 20px padding on an 8px grid.

Cards are white on the paper canvas, separated by a hairline and no resting shadow. Elevation is reserved for things that genuinely float: popovers, dialogs, sheets, toasts.

Overlays

Zod forms — useZodForm + Field + FormDialog

One schema, validated in the browser and again on the server. The shell owns the four lifecycle rules — reset on open, close on success only, a loading submit and a disabled cancel — so a screen cannot forget them.

Tabs & accordion

22 working days in Shrawan · 1 public holiday (Janai Purnima).

Employee contributes 11% of basic; employer adds 20% (shown in violet across payroll screens). Both post to the Social Security Fund monthly.

Toast, skeleton, empty state

Toasts

Skeleton

No employees yet

Add your first employee to start tracking attendance and running payroll.

DataTable — payroll register

Shrawan 2081 payroll

EarningsDeductionsEmployer
EmployeeBasicAllowancesOTSSFTaxSSF (ER)StatusNet Pay
Anita ShresthaWN-001285,00012,0004,5009,35011,20017,000DisbursedNPR 80,950
Bikash GurungWN-00311,20,00018,000013,20019,80024,000DisbursedNPR 1,05,000
Sita MaharjanWN-004462,0008,0006,2006,8205,40012,400ProcessingNPR 63,980
Rajesh K.C.WN-005895,00014,0002,80010,45013,60019,000PendingNPR 87,750
Pramila TamangWN-006770,0009,00007,7007,10014,000FailedNPR 64,200
Totals (5)4,32,00061,00013,50047,52057,10086,400NPR 4,01,880

Scroll horizontally on a narrow viewport: the employee and net-pay columns stay pinned with an edge shadow, the totals row is pinned to the bottom, and the employer SSF column carries the violet wash. Try the density toggle and column menu.

Empty register

EarningsDeductionsEmployer
EmployeeBasicAllowancesOTSSFTaxSSF (ER)StatusNet Pay

No payroll run

Run payroll for Shrawan to see the register.

Core HR primitives

MultiSelect

Emits [] for an empty selection, never a sentinel — Radix refuses an item whose value is "". Three selections here, more than the trigger can show as chips, so it reads as a count.

3 selected

TagInput

Enter and comma both commit. Backspace on an empty box removes the last tag. Try typing sql (lowercase) and pressing Enter — the duplicate of "SQL" is dropped silently.

SQLExcel

FileDropzone

A file picker, nothing else — no upload, no progress. The browse button is not decoration: it is the only keyboard/screen-reader path in.

Drag a document here, or

PDF or image, up to 5MB each

TreeView

Presentational and stateless about the data — a generic node, an expanded-set, a render prop. Three levels deep here; try the arrow keys.

  • Engineering42
  • Platform18
  • Backend11
  • Infra7
  • Mobile9
  • Finance12
  • Human Resources6

Stepper

The probation review flow — a linear, numbered sequence.

  1. Self-review

    Employee submits

  2. Manager review

    Rating + notes

  3. 3

    HR sign-off

    Confirmation letter

  4. 4

    Confirmed

    Status updated

Callout

Card + token accents — the command centre's alerts.

Fiscal year closing

FY 2081/82 closes on Ashadh 31. Run headcount reports before then.

Onboarding complete

Anita Shrestha's day-one checklist is fully acknowledged.

Progress

The linear bar — a fraction and a required accessible label.

100%
62%
8%

DateRangeField

One trigger, one two-month calendar: click the start, click the end. A second click before the anchor re-anchors there, so an inverted range cannot be picked.

DescriptionList

<dl> semantics — a profile pane's read-only facts.

Employee ID
WN-0012
Designation
Senior Accountant
PAN number
123456789
Bank
NIC Asia
Address
Baneshwor, Kathmandu, Bagmati Province

Timeline

Not <StatusTimeline> — a variable-length event feed with no fixed vocabulary and no notion of "current".

  1. Joined as Junior Accountant

    System · Feb 15, 2079, 12:00 AM

  2. Promoted to Senior Accountant

    Pramila Tamang · Jan 10, 2081, 12:00 AM

  3. Moved to Finance department

    HR Admin · Jun 1, 2081, 12:00 AM

AppShell

Full-viewport frames — open each demo: 56px topbar, collapsible-to-64px icon rail, overlay drawer below 768px.