CodeLeap Docs

CommonWebMobileCLIConceptsUpdates

ActionIcon

Component

The ActionIcon component displays an icon that the user can interact with. It is imported from the "@codeleap/web" package.

Source

View source code

Package

@codeleap/web

Props

  • icon (optional): This prop specifies the name of the icon to be displayed. It should be a string that corresponds to one of the available icons.
  • name (optional): This prop also specifies the name of the icon to be displayed. It should be a string that corresponds to one of the available icons.

Example Usage

import React from 'react';
import { ActionIcon } from '@codeleap/web';
const App = () => {
return (
<div>
<ActionIcon icon="home" />
<ActionIcon name="settings" />
</div>
);
}
export default App;

In the example above, the ActionIcon component is imported from the "@codeleap/web" package. Two instances of the IconButton component are rendered in the App component, each displaying a different icon ("home" and "settings").

Table of contents

Props