Skip to main content
The attribute is rendered by the Methods app block, so this works in any theme where the block or the x-methods component is on the product page.
Every option the Methods app block renders carries its admin name in a data-supercycle-option-name attribute. Use it to target specific options from your theme’s CSS or JavaScript without relying on their position. It works for every method that renders option pickers: calendar, subscription, membership, resale, and trade-in.

How it works

For each option on a method, Supercycle renders a .supercycle-options__option element and sets data-supercycle-option-name to the option’s name, the value you entered in the Supercycle admin. An option named 1 month - insurance renders as:
Rendered option
Match it with any standard attribute selector.

Hide options with CSS

Hide every option whose name contains insurance:
Contains match
Match an exact option name:
Exact match
Option names come straight from the Supercycle admin, so a naming convention such as an insurance- prefix or a - insurance suffix gives you a stable selector to reuse across your theme.

Toggle options with JavaScript

Show insurance options only when a checkbox on the product page is ticked:
Insurance toggle
Hidden options stay in the DOM but customers can’t select them while they’re hidden. Because Supercycle renders the attribute, it stays in sync when you rename or add options.