DialPad
Props, styling and a live DialPad example.
Customize
Prefill the number field.
Offer a video-call button. Default `true`. Set it to `false` for numbers whose calls cannot carry video.
Called once the call is actually placed, not when a placement fails.
React only: @polymorfa/elements has no element for DialPad.
npm install @polymorfa/react@dev @polymorfa/browser@devimport { PolymorfaProvider, DialPad } from "@polymorfa/react";
const appearance = { theme: "light", variables: { colorPrimary: "#635bff" } };
export function DialPadExample({ calls }) {
return (
<PolymorfaProvider tokenEndpoint="/api/polymorfa/token" appearance={appearance}>
<DialPad
controller={calls}
defaultValue="+15550001042"
allowVideo
/>
</PolymorfaProvider>
);
}DialPad from @polymorfa/react. Choose props and styles above; the preview stays visible in every code view.
Props#
defaultValuestringPrefill the number field.
allowVideobooleanOffer a video-call button. Default
true. Set it tofalsefor numbers whose calls cannot carry video.Default
trueonPlaced(to: string) => voidCalled once the call is actually placed, not when a placement fails.
classNamestringcontrollerCallsControllercreateController() => CallsController
Styling#
Use className, classNames (a class for any slot, typed SlotClassNames), appearance variables and element styles. The Style panel applies changes to the live component. See Appearance.
Setup#
Use the provider and server route for your application. The preview above uses local sample data and controllers. Chat controllers and inbox data sources keep your data separate from the UI.