• Getting Started
  • Components
  • Github
  • Go pro
energyGetting started
  • Introduction
dComponents
  • Button Components
  • Grid Components
  • Input Components
  • Layout Components
  • Toast Components
  • Widget Components
  • Alert
  • Badge
  • Breadcrumb
  • Callout
  • Card
  • Carousel
  • Charts
  • Collapse
  • CreateElement
  • DataTable
  • Dropdown
  • ElementCover
  • Embed
  • Fade
  • Form
  • Icon
  • Img
  • Jumbotron
  • Link
  • ListGroup
  • Media
  • Modal
  • Nav
  • Navbar
  • Pagination
  • Popover
  • Progress
  • Spinner
  • Switch
  • Tabs
  • Toggler
  • Tooltip

Icon

Library: @coreui/icons-react

Component used to implement CoreUI svg icons.


Usage

Example


Script


  return (
    <>
      <CIcon size={'sm'} name={'cilSettings'} />
      <CIcon name={'cilSettings'} />
      <CIcon size={'lg'} name={'cilSettings'} />
      <CIcon size={'xl'} name={'cilSettings'} />
      <CIcon size={'2xl'} name={'cilSettings'} />
      <CIcon size={'3xl'} name={'cilSettings'} />
      <CIcon size={'4xl'} name={'cilSettings'} />
      <CIcon size={'5xl'} name={'cilSettings'} />
      <CIcon size={'6xl'} name={'cilSettings'} />
      <CIcon size={'7xl'} name={'cilSettings'} />
      <CIcon size={'8xl'} name={'cilSettings'} />
      <CIcon size={'9xl'} name={'cilSettings'} />
    </>
  )
  


Features

  • Can load icons stored globally, directly passed or by source link,
  • Can significantly reduce bundle size due to JavaScript named icons import,
  • Full functionality of svg html tag,
  • Clean API

# Icon API

NameRequiredTypeDefault Value
classNamestring
user classes for the main HTML tag
namestring
name of the icon placed in React object
content(string | any[])
icon SVG code
size(custom | custom-size | sm | lg | xl | 2xl | () | 4xl | 5xl | 6xl | 7xl | 8xl | ArrayOf(string))
size of the icon; available sizes: 'sm', 'lg', 'xl', 'custom-size'
customClasses(string | any[] | object)
replacing default CIcon component classes
srcstring
Link to the icon. If defined component will be rendered as 'img' tag.
titlestring
title tag content
usestring
use SVG tag content

  • Components
    • Usage
      • Features
      • API
CoreUI © 2020 creativeLabs.core-logo