---
schema_version: "1"
id: 60ad5c065fa9821bf76596df6f595daefb86e417990d7252a92bee8f18853b8c
title: topics:widget
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/salesforce-pages-developers-guide/guides/pages/components/pages-compref-topics-widget.md
canonical_url: https://developer.salesforce.com/docs/platform/salesforce-pages-developers-guide/guide/pages-compref-topics-widget.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 5e3ecf6e2d57329b95d6fd2515a87fadf66248ffbc551463c28898799e1f2a35
products:
  - Visualforce Developer Guide
  - Platform Developer Content
---

# topics:widget

UI component that displays topics assigned to a record and allows users to add and remove topics. The UI component is available only if topics are enabled for these supported objects: accounts, assets, campaigns, cases, contacts, contracts, leads, opportunities, and custom objects.

## Example

This example displays the topic editor widget for an entity.

```visualforce

<apex:page>
	<topics:widget entity="0D5x00000009Fhc" customUrl="http://mywebsite/TopicViewTestPage?topicId="/>
</apex:page>


```

## Attributes

| Attribute Name       | Attribute Type | Description                                                                                                                  | Required? | API Version | Access |
| -------------------- | -------------- | ---------------------------------------------------------------------------------------------------------------------------- | --------- | ----------- | ------ |
| `customUrl`          | string         | The custom URL to a topic page. Salesforce adds the topicId to the end of the URL provided.                                  |           | 29.0        |        |
| `entity`             | string         | Entity ID of the record for which to display the feed; for example, Contact.Id                                               | Yes       | 29.0        |        |
| `hideSuccessMessage` | Boolean        | Hide the success message that appears when done assigning topics. Defaults to false.                                         |           | 29.0        |        |
| `id`                 | String         | An identifier that allows the component to be referenced by other components in the page.                                    |           | 14.0        | global |
| `rendered`           | Boolean        | A Boolean value that specifies whether the component is rendered on the page. If not specified, this value defaults to true. |           | 14.0        | global |
| `renderStyle`        | string         | The style in which the topics widget is rendered. Acceptable values are "simple" and "enhanced".                             |           | 29.0        |        |
