@molecule/app-checklist-solid
Feature · checklist · App (browser) · v1.1.1 · Apache-2.0
Onboarding checklist with checkable items + progress bar
npm install @molecule/app-checklist-solidHow it works
@molecule/app-checklist-solid is a ready-made checklist feature for the app (browser) side. It composes the core interfaces it needs, so it works with whichever providers your app has bonded.
import { createSignal } from 'solid-js'
import { Checklist } from '@molecule/app-checklist-solid'
const [items, setItems] = createSignal([
{ id: 'profile', label: 'Complete your profile', completed: true },
{ id: 'invite', label: 'Invite a team member', completed: false },
{ id: 'project', label: 'Create your first project', completed: false },
])
<Checklist
title="Getting started"
items={items()}
onToggle={(id, next) =>
setItems((current) => current.map((item) => (item.id === id ? { ...item, completed: next } : item)))
}
/>Works with: @molecule/app-solid, @molecule/app-ui, @molecule/app-ui-solid
Reference
Solid onboarding checklist with checkboxes and overall progress bar.
Exports Checklist and the ChecklistItem type. It is the Solid
counterpart of @molecule/app-checklist-react: the same props (React
names), the same DOM for the same input, and the same onToggle calls, so
an app switches framework by changing only the package name in its imports.
Auto-generated, AI-first package reference for the molecule.dev ecosystem. It is written to be read by coding agents as much as by people, and is generated from this package's source — edit
src/index.tsJSDoc, not this file.
Quick Start
import { createSignal } from 'solid-js'
import { Checklist } from '@molecule/app-checklist-solid'
const [items, setItems] = createSignal([
{ id: 'profile', label: 'Complete your profile', completed: true },
{ id: 'invite', label: 'Invite a team member', completed: false },
{ id: 'project', label: 'Create your first project', completed: false },
])
<Checklist
title="Getting started"
items={items()}
onToggle={(id, next) =>
setItems((current) => current.map((item) => (item.id === id ? { ...item, completed: next } : item)))
}
/>
Type
feature
Installation
npm install @molecule/app-checklist-solid @molecule/app-solid @molecule/app-ui @molecule/app-ui-solid solid-js
API
Interfaces
ChecklistItem
A single item in the checklist, tracking its label, description, and completion state.
interface ChecklistItem {
/** Stable identity, used as the list key and the checkbox `aria-label` fallback. */
id: string
/** Item label: text or JSX. */
label: JSX.Element
/** Optional description / hint shown under the label. */
description?: JSX.Element
/** Completion state. */
completed: boolean
/** When true, the item is rendered disabled and uncheckable. */
disabled?: boolean
}
ChecklistProps
Props accepted by the Checklist component.
interface ChecklistProps {
/** The checklist items, rendered in order. */
items: ChecklistItem[]
/** Called when an item is toggled, with its id and the checkbox's new state. */
onToggle: (id: string, next: boolean) => void
/** Show overall progress bar above the list. Defaults to true. */
showProgress?: boolean
/** Optional title above the checklist. */
title?: JSX.Element
/** Extra classes on the outer wrapper. */
className?: string
}
Functions
Checklist(props)
Onboarding-style checklist with checkboxes, optional descriptions, and an
overall progress bar derived from items.
Fully controlled: it never mutates completed; the caller persists the
toggle in onToggle(id, next) and passes updated items again.
function Checklist(props: ChecklistProps): JSX.Element
props— Component props (seeChecklistProps).
Returns: The rendered checklist.
Injection Notes
Requirements
Peer dependencies:
@molecule/app-solid^3.5.0@molecule/app-ui^1.0.1@molecule/app-ui-solid^1.1.0solid-js^1.8.0
Runtime Dependencies
@molecule/app-solid@molecule/app-ui@molecule/app-ui-solidsolid-js
The progress line uses the i18n key checklist.progress ({{done}},
{{total}}), translated by the @molecule/app-locales-checklist companion
bond. label/description/title are consumer-provided nodes — pass
translated strings via t(). The component is fully controlled: it never
mutates completed; persist the toggle in onToggle(id, next) and
re-render with updated items.
Translations
Translation strings are provided by @molecule/app-locales-checklist.