Similar to Icon, Icon Circle is a graphical symbol within a circle used to visually indicate an object or function.
import React from 'react' import { IconCircle } from 'playbook-ui' const IconCircleSizes = (props) => { return ( <div> <IconCircle icon="rocket" size="xxs" /> <br /> <IconCircle icon="rocket" size="xs" /> <br /> <IconCircle icon="rocket" size="sm" /> <br /> <IconCircle icon="rocket" size="md" /> <br /> <IconCircle icon="rocket" size="lg" /> <br /> <IconCircle icon="rocket" size="xl" /> </div> ) } export default IconCircleSizes
Customize your icon circle by passing one of our seven base colors to the variant
prop: royal
blue
orange
purple
teal
red
yellow
green
import React from 'react' import IconCircle from 'playbook-ui' const IconCircleColor = (props) => { return ( <div> <IconCircle icon="rocket" size="sm" variant="royal" /> <br /> <IconCircle icon="rocket" size="sm" variant="orange" /> <br /> <IconCircle icon="rocket" size="sm" variant="purple" /> <br /> <IconCircle icon="rocket" size="sm" variant="teal" /> <br /> <IconCircle icon="rocket" size="sm" variant="red" /> <br /> <IconCircle icon="rocket" size="sm" variant="yellow" /> <br /> <IconCircle icon="rocket" size="sm" variant="green" /> </div> ) } export default IconCircleColor
The Icon Circle also allows you to pass in an HTML emoji in place of an icon if needed. To do so, pass any emoji or its hexa/decimal ref (see here) as a string to the icon
prop as shown in the code snippet below.
import React from 'react' import IconCircle from 'playbook-ui' const IconCircleEmoji = (props) => { return ( <div> <IconCircle icon="๐" size="sm" /> <br/> <IconCircle icon="😍" size="md" variant="red" /> <br/> <IconCircle icon="🎉" size="lg" variant="teal" /> </div> ) } export default IconCircleEmoji