Getting Started
Components
- Accordion
- Advanced Toast
- AlertMessage
- ArrowButton
- Arrows
- Avatar
- Backdrop
- Basic Toast
- Breadcrumb
- Button
- CardBackground
- Card
- Carousel
- Chapters
- ChatBody
- ChatButton
- ChatHeader
- ChatInput
- ChatMessageActions
- ChatMessageEditor
- ChatMessage
- ChatTypingIndicator
- ChatWindowCsatPrompt
- ChatWindowQuote
- ChatWindow
- CheckboxSelect
- Checkbox
- Checkboxes
- Chip
- ChoiceExpander
- Clickable
- ContentReview
- Countdown
- CriteriaDates
- CriteriaParticipants
- CriteriaTransports
- Date Field
- Datepicker
- Dropdown
- ElasticHeight
- ExpandableCard
- ExpandableText
- Filter
- FloatingLabelTextField
- Form Control
- Form Label
- Frame
- HamburgerIcon
- Heading
- Image
- JourneyCard
- LayerHeader
- Layer
- Link
- Loader
- Number Field
- PageNavigation
- Pagination
- Paragraph
- Password
- Phone Field
- Popin
- Portal
- ProductThumbnail
- Promises
- Prose
- Radio Group
- RadioSelect
- Radio
- Range
- Scrollbar
- Select
- SidebarLayout
- SliderFrame
- SparkleWrapper
- Spinner
- Switch
- Table
- Tabs
- Tag
- TextField
- Toggle
- Tooltip
- ValidationMessage
Migration Checklist
- Upgrade to the latest v1 release first.
- Migrate to
Button v2andCard v2. - Replace import paths using
atoms/moleculeswithui. - Update directory casing in import paths to lowercase.
- Use icons from
@clubmed/trident-icons. - Migrate Tailwind setup to v4 expectations.
- Apply the
onChangesignature migration for forms.
Breaking Changes from v1
1. Button and Card v2
ButtonandCardAPIs evolved in v2.- Migrate these components first to reduce follow-up conflicts.
2. Import Paths
- Replace paths containing
atomsormoleculeswithui. - Update directories to lowercase.
// v1
@clubmed/trident-ui/molecules/Buttons/Button
// v2
@clubmed/trident-ui/ui/buttons/button3. Icons Package
- Use icons from
@clubmed/trident-icons. - Stop importing icon assets from legacy v1 paths.
4. Tailwind 4 Migration
- Tailwind 4 no longer reads
tailwind.config.tsthe same way as v1-era setup. - If needed during transition, rename to
tailwind.config.legacy.(js|ts). - Update syntax to Tailwind 4 conventions (
@layer,@utility, etc.). - Import Trident UI styles:
@import '@clubmed/trident-ui/style.css';- If your own stylesheet uses Trident classes/variables, add at file top:
@reference "@clubmed/trident-ui/style.css";Breaking Change: Form onChange Signature
In v2, form components use a unified callback signature:
onChange(event, value)Previous (v1)
onChange(name, value)New (v2)
onChange(event, value)When you still need the field name, read it from event.currentTarget.name:
const name = (event.currentTarget as HTMLInputElement).name;Common Refactors
Text-like fields
// v1
onChange={(name, value) => setValue(value)}
// v2
onChange={(_, value) => setValue(value)}Checkbox-like fields
// v1
onChange={(event) => setChecked(event.target.checked)}
// v2
onChange={(_, checked) => setChecked(checked)}Radio-like fields
// v1
onChange={(event) => setSelected(event.target.value)}
// v2
onChange={(_, value) => setSelected(value)}Components Concerned
TextField,Select,DateField,NumberField,Password,PhoneField,RangeSwitch,Filter,Checkbox,RadioCheckboxSelect,Checkboxes,RadioGroup
Why This Change
- Same developer experience for all form components.
- Easier integration with generic form handlers.
- Keeps access to browser event while exposing normalized
nameandvalue.