TigriWeb Components
AttributesControlsMetaPrimitivesIntegrations
  • Table of Contents
  • Attributes
    • Checkbox
    • Color
    • ColorGradient
    • DateTime
    • Icon
    • Media
    • Number
    • PostType
    • PostTypeMultiple
    • Radio
    • Range
    • Select
    • Taxonomy
    • TaxonomyMultiple
    • Text
    • Textarea
    • Toggle
    • ToolbarButton
    • ToolbarGroup
  • Controls
    • AppenderButton
    • Media
    • RichHeading
    • RichText
  • Meta
    • Checkbox
    • Color
    • DateTime
    • Icon
    • Media
    • Number
    • PostType
    • PostTypeMultiple
    • Radio
    • Range
    • Select
    • Taxonomy
    • TaxonomyMultiple
    • Text
    • Textarea
    • Toggle
  • Primitives
    • HTML
    • SVG
  • Integrations
    • Enqueue SVG icons
    • Enqueue I18n strings
Powered by GitBook
On this page

Was this helpful?

  1. Attributes

Icon

PreviousDateTimeNextMedia

Last updated 6 months ago

Was this helpful?

{ label, help, name*, attributes*, setAttributes* }
/**
 * @param {string} [label] - Component label.
 * @param {string} [help] - Component description.
 * @param {string} name - Attribute name.
 * @param {object} attributes - Object containing block attributes.
 * @param {function} setAttributes - Function to set new block attribute values.
 */
block.json
"testIcon": {
	"type": "string",
	"default": "map-pin-heart"
}
index.js
import {
	TwebBlockIconControl,
} from '@tigriweb/components/attributes';
index.js | edit()
<TwebBlockIconControl
	label={ __('Icon Label', 'your-theme-name') }
	help={ __('Icon Description', 'your-theme-name') }
	name="testIcon"
	{...{ attributes, setAttributes }}
/>

Important: You Need to Globally!

Enqueue Icons
TwebBlockIconControl