Files
temetro/.agents/skills/coss/references/primitives/slider.md
T
Khalid Abdi 929bec8f31 feat: AI-added records save with placeholders + "Added by AI" provenance
Stop blocking AI imports/proposals on missing non-critical fields. Records
the chat agent drafts now save with safe placeholders, auto-generated file
numbers, and a source="ai" marker that surfaces an "Added by AI" badge so a
clinician can review/edit them later.

Backend:
- add `source` (manual|ai) column to patients/appointments/prescriptions
  (migration 0014) + canonical types, services, validation schemas
- relax patient/appointment validation: empty file number allowed, demographic
  + type/provider/initials fall back to placeholders (initials derived from name)
- patients.generateFileNumber() auto-assigns an MRN when one is missing
- proposeAppointment accepts a name when no file number resolves; AI commits +
  /api/ai/import stamp source="ai"

Frontend:
- `source` on Appointment/Patient/Prescription types; AI commits send source="ai"
- reusable <AiBadge> shown on the Patients table/detail and prescriptions list

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 19:27:17 +03:00

1.4 KiB

coss Slider

When to use

  • Continuous or ranged numeric tuning interactions.
  • Volume/brightness/threshold controls with immediate feedback.

Install

npx shadcn@latest add @coss/slider

Manual deps from docs:

npm install @base-ui/react

Canonical imports

import { Slider, SliderValue } from "@/components/ui/slider"

Minimal pattern

<Slider aria-label="Volume" defaultValue={40} max={100} min={0} />

Patterns from coss particles

Key patterns

Slider with label and live value display:

<div className="flex flex-col gap-2">
  <div className="flex justify-between text-sm">
    <Label>Volume</Label>
    <SliderValue />
  </div>
  <Slider aria-label="Volume" defaultValue={50} min={0} max={100} />
</div>

Range slider (two thumbs):

<Slider aria-label="Price range" defaultValue={[20, 80]} min={0} max={100} />

More examples

See p-slider-1 through p-slider-5 for label, range, vertical, and form integration patterns.

Common pitfalls

  • Using slider for discrete option labels where select/radio is clearer.
  • Not exposing current value context in nearby UI text when needed.
  • Confusing single-value vs range value shapes in controlled mode.

Useful particle references

  • with label and value: p-slider-2
  • range slider: p-slider-3
  • vertical: p-slider-4
  • form integration: p-slider-5