<!--
{
  "documentType" : "article",
  "framework" : "AppleNewsFormat",
  "identifier" : "/documentation/AppleNews/defining-a-component-style",
  "metadataVersion" : "0.1.0",
  "role" : "article",
  "title" : "Defining a Component Style"
}
-->

# Defining a Component Style

Set style options for the components in your article.

## Discussion

You can use component styles to add interest and variety to your article and to make some content easier to read. Component styles include:

- Background color. Set a background color for the component.
- Corner radius. Apply rounded corners to a component by using the `mask` property in [`ComponentStyle`](/documentation/AppleNewsFormat/ComponentStyle).
- Fill. Use an image or video for a component background, or set a gradient fill that transitions from one color to another.
- Opacity. Set the opacity for a component from completely opaque to completely transparent.
- Border. Set the border color, width, and style for a component or for a table cell.
- Table style. Specify the styling (color, stroke style, text style, and so on) that you want for the rows, columns, and cells of a data or HTML table.

### Define a Style

To use a component style once, simply include a [`ComponentStyle`](/documentation/AppleNewsFormat/ComponentStyle) object as the value of the individual component’s style property.

To define a style for multiple components:

1. In the [`ArticleDocument.componentStyles`](/documentation/AppleNewsFormat/ArticleDocument/componentStyles-data.dictionary) object, include a property with a name that you define and a `ComponentStyle` object value.
2. Use the name you defined as the value of the individual componentʼs style property.

For more about properties and objects, see <doc://com.apple.applenews/documentation/AppleNews/json-concepts-and-article-structure>.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)