@@ -49,6 +49,7 @@ yarn add react-odontogram
4949
5050``` tsx
5151import { Odontogram } from " react-odontogram" ;
52+ import " react-odontogram/style.css" ;
5253
5354export default function App() {
5455 const handleChange = (selectedTeeth ) => {
@@ -129,12 +130,19 @@ Example JSON output:
129130
130131## ⚙️ Props
131132
132- | Prop | Type | Default | Description |
133- | ----------------- | ------------------------------------------- | ------- | ------------------------------------------------------- |
134- | ` onChange ` | ` (selectedTeeth: ToothSelection[]) => void ` | — | Triggered whenever the user selects or deselects teeth. |
135- | ` initialSelected ` | ` string[] ` | ` [] ` | Array of tooth IDs to preselect. |
136- | ` readOnly ` | ` boolean ` | ` false ` | Makes the odontogram non-interactive (view-only). |
137- | ` className ` | ` string ` | — | Optional class for custom styling. |
133+ | Prop | Type | Default | Description |
134+ | --- | --- | --- | --- |
135+ | ` defaultSelected ` | ` string[] ` | ` [] ` | Tooth IDs selected on first render. |
136+ | ` onChange ` | ` (selectedTeeth: ToothSelection[]) => void ` | — | Called whenever selection changes. |
137+ | ` name ` | ` string ` | ` "teeth" ` | Name used for hidden form input. |
138+ | ` className ` | ` string ` | ` "" ` | Additional class for wrapper customization. |
139+ | ` theme ` | ` "light" \| "dark" ` | ` "light" ` | Applies built-in light/dark palette. |
140+ | ` colors ` | ` { darkBlue?: string; baseBlue?: string; lightBlue?: string } ` | ` {} ` | Override palette colors. |
141+ | ` notation ` | ` "FDI" \| "Universal" \| "Palmer" ` | ` "FDI" ` | Display notation in native tooth titles/tooltips. |
142+ | ` tooltip ` | ` { placement?: Placement; margin?: number; content?: ReactNode \| ((payload?: ToothSelection) => ReactNode) } ` | ` { placement: "top", margin: 10 } ` | Tooltip behavior and custom content renderer. |
143+ | ` showTooltip ` | ` boolean ` | ` true ` | Enables/disables tooltip rendering. |
144+ | ` showHalf ` | ` "full" \| "upper" \| "lower" ` | ` "full" ` | Render full chart or only upper/lower arches. |
145+ | ` maxTeeth ` | ` number ` | ` 8 ` | Number of teeth per quadrant (for baby/mixed dentition views). |
138146
139147---
140148
@@ -144,14 +152,8 @@ Each tooth is internally defined in a structured format:
144152
145153``` ts
146154{
147- id : " teeth-21" ,
148- name : " 21" ,
155+ name : " 1" ,
149156 type : " Central Incisor" ,
150- notations : {
151- fdi : " 21" ,
152- universal : " 9" ,
153- palmer : " 1UL"
154- },
155157 outlinePath : " ..." ,
156158 shadowPath : " ..." ,
157159 lineHighlightPath : " ..."
@@ -190,5 +192,3 @@ MIT © [biomathcode](https://github.com/biomathcode)
190192## 💬 Feedback
191193
192194If this library helps your dental project, please ⭐ the repo or open issues/PRs for enhancements!
193-
194-
0 commit comments