Skip to main content
Version: 1.x

Speed Dial

Speed Dial component is a menu of related actions that allows a user to perform an action. These separations help to improve the user experience by not taking users away from the main separation for a specific action.

Import

import { SpeedDial } from '@tra-tech/react-native-kitra';

Import

import { SpeedDial, Icon } from '@tra-tech/react-native-kitra';

const App = () => (

<SpeedDial
variant="flat"
baseItemBackground="#8973CD"
items={[
{ icon: <Icon type="material-community" name="penguin" size={20} />, title: 'Penguin', backgroundColor: 'blue' },
{ icon: <Icon type="material-community" name="close" size={20} />, title: 'Close', backgroundColor: 'pink' },
{ icon: <Icon type="material-community" name="plus" size={20} />, title: 'Plus', titleColor: 'red' },
{ icon: <Icon type="material-community" name="penguin" size={20} />, onPress: () => console.log('pressed') },
{ icon: <Icon type="material-community" name="penguin" size={20} /> },
]}
/>
);

export default App;

Props

Prop nameTypeRequiredDescription
itemsArray<{
icon?: React.ReactNode,
title?:string,
titleColor?:string,
backgroundColor?:string,
onPress?: ()=> void}>
YesItems to be listed in the speed dial.
baseItemBackgroundstringNoBackground color of base item. Default value: theme.tertiary
variant 'flat' | 'spread' NoRepresents the opening animation. Default value: 'flat'
onChange(event:boolean)=>void NoReturns whether the component is on or off.
baseItemIconReact.ReactNodeNoIcon of base item.
themeUITheme NoThe theme to use for the component.
typographyUITypographyNoThe typography to use for the component.