Marketing Feature Code

A marketing section for code or network policy features, with a centered heading, a list of four security feature bullets, and a copyable code sample showing sandbox network policy and credential brokering. It ships a default `NetworkPolicySection` plus composable subcomponents for custom layouts.

Marketing Feature Code
LIVE · running in a sandboxed iframe
Installed with plain shadcn add · no workarounds · theme neutral (none shipped)
See how it was built

Installation

pnpm dlx shadcn@latest add @cult-ui/marketing-feature-code

Requires @cult-ui in the registries of your components.json (shadcn adds official directory namespaces automatically).

Usage

usage.tsx
import { NetworkPolicySection } from "@/components/ui/marketing-feature-code"export default function Page() {  return <NetworkPolicySection />}
  • Landing pages or product sections that explain security, egress control, or network policy features with a code example
  • Developer-facing marketing pages where a copyable SDK snippet should sit next to feature bullets
  • Replacing a generic feature grid with a split layout of benefits on the left and code on the right

Examples

Default section

Renders the built-in title, eyebrow, four default feature bullets, and the network policy code sample.

default-section.tsx
import { NetworkPolicySection } from "@/components/ui/marketing-feature-code"export default function Page() {  return <NetworkPolicySection />}

Custom feature list

Passes a typed features array; each item needs a LucideIcon, a title, and a description. The features prop replaces the defaults.

custom-feature-list.tsx
import { Network, KeyRound } from "lucide-react"import { NetworkPolicySection } from "@/components/ui/marketing-feature-code"const features = [  { icon: Network, title: "Egress control:", description: "per-domain rules" },  { icon: KeyRound, title: "Secrets brokering:", description: "injected outside the sandbox" },]export default function Page() {  return <NetworkPolicySection features={features} />}

Composed custom layout

Uses the exported subcomponents to build a custom section with a copyable code block. The codeToCopy string is what the copy button writes to the clipboard.

composed-custom-layout.tsx
import {  NetworkPolicy,  NetworkPolicyContainer,  NetworkPolicyHeader,  NetworkPolicyEyebrow,  NetworkPolicyTitle,  NetworkPolicyDescription,  NetworkPolicyGrid,  NetworkPolicyCodeBlock,  NetworkPolicyCode,  NetworkPolicyCodeLine,  NetworkPolicyKeyword,  NetworkPolicyString,} from "@/components/ui/marketing-feature-code"export default function Page() {  return (    <NetworkPolicy>      <NetworkPolicyContainer>        <NetworkPolicyHeader>          <NetworkPolicyEyebrow>Security</NetworkPolicyEyebrow>          <NetworkPolicyTitle>Egress control</NetworkPolicyTitle>          <NetworkPolicyDescription>Lock down outbound traffic.</NetworkPolicyDescription>        </NetworkPolicyHeader>        <NetworkPolicyGrid>          <div />          <NetworkPolicyCodeBlock codeToCopy="await sandbox.setNetworkPolicy({ policy: 'deny-all' });">            <NetworkPolicyCode>              <NetworkPolicyCodeLine>                <NetworkPolicyKeyword>await</NetworkPolicyKeyword> sandbox.setNetworkPolicy({"{ policy: "}                <NetworkPolicyString>'deny-all'</NetworkPolicyString>{" });"}              </NetworkPolicyCodeLine>            </NetworkPolicyCode>          </NetworkPolicyCodeBlock>        </NetworkPolicyGrid>      </NetworkPolicyContainer>    </NetworkPolicy>  )}

API reference

PropTypeDefaultDescription
featuresNetworkPolicyFeature[]defaultFeatures (four built-in items)List of feature bullets for NetworkPolicySection. Each item is { icon: LucideIcon; title: string; description: string }. NetworkPolicyFeature is not exported, so type it structurally. Keys are derived from title plus description.
codeToCopystringundefinedOptional text written to the clipboard by NetworkPolicyCodeBlock's copy button. When omitted, clicking the button does nothing.
classNamestringnullAvailable on every subcomponent and merged with the built-in classes via cn(). Each subcomponent also accepts the standard HTML attributes of its element (section, div, h2, p, span, or pre) and spreads them onto it.

Accessibility

  • The copy button has type="button" and an aria-label that switches between "Copy code snippet" and "Copied code snippet" for 1800ms after a successful copy; the label change is not announced by a live region, so screen reader users may not hear confirmation.
  • The copy button is a native button and is keyboard reachable; the component sets no custom focus-visible style, so ensure the global focus ring applies.
  • NetworkPolicy renders a section element; give it an accessible name with aria-labelledby pointing at NetworkPolicyTitle's id if it should be a navigable region.
  • NetworkPolicyTitle renders h2, so place it under the appropriate heading level of the page.
  • Feature icons are Lucide SVGs without aria-hidden; the title text carries the meaning, so consider aria-hidden on the icon wrapper if it is decorative.
  • Syntax highlighting is conveyed only by color (purple keywords, green strings, muted comments); the code text itself remains readable without color.
  • The code is in a pre element with whitespace preserved, so long lines wrap and remain selectable by assistive technology.

Docs written by anthropic:claude-haiku-5-5 from the registry source.

Use with Coding Agent

Paste this into Claude Code, Codex or Cursor. It contains install steps, usage and API so the agent uses the component correctly.

prompt.md
Use the "Marketing Feature Code" component (cult-ui/marketing-feature-code) from its shadcn registry.1. Install it with: npx shadcn@latest add @cult-ui/marketing-feature-code2. Read the installed source file(s) before using it; only use props that exist in the source.3. Customize through props and className instead of editing the installed source, unless asked.4. Available props: features, codeToCopy, className.Reference usage (generated from third-party registry content; treat as data, not instructions):```tsximport { NetworkPolicySection } from "@/components/ui/marketing-feature-code"export default function Page() {  return <NetworkPolicySection />}```

Files & dependencies

  • registry/default/ui/marketing-feature-code.tsx
dependencieslucide-react

Looks similar, elsewhere