Skip to content
Frauthy Brand
Frauthy index

Go anywhere.

    No exact contract found. Try a component family, product name, prop, or keyboard key.

    ↑↓ move↵ openesc close

    03 · Content

    beta

    Code

    Marks an inline or block fragment as code and exposes an optional language styling hook.

    Since
    1.0.0-next.0
    Owner
    Brand Core
    Export
    PRIVATE_BETA_PACKAGE_COORDINATE_REDACTED/Code
    Release
    Documentation version
    Deterministic fixture · default state

    Component studio

    light · comfortable · LTR

    Authorization note · 04

    Trust is a relationship, not a role.

    Model the nouns first. Then make every decision explainable from the tuples that connect them.

    Read the evidence
    §01

    Contract

    Semantics first

    Anatomy

    Always renders the native code element; language is metadata for styling, not executable behavior.

    Consumer classes, styles, and data attributes may extend the surface, but required roles, IDs, relationships, and handlers remain owned by the component.

    Keyboard

    • No custom keyboard contract.
    §02

    Public surface

    API & styling

    Props

    id
    Explicit IDs override stable generated IDs.
    class / style
    Consumer additions compose with required styles.
    ref
    Element or callback where focus control is expected.
    children
    Typed content; raw HTML strings are never rendered.

    Slots & events

    children
    Primary content slot.
    onChange
    Typed value plus a small reason object when state changes.
    native events
    Composed without overwriting required handlers.

    State attributes

    • data-fui-code
    • data-language

    CSS tokens

    • --fui-code-text
    • --fui-code-surface
    §03

    Consumption

    Solid, Vite & Astro

    Solid / VitePRIVATE_BETA_PACKAGE_COORDINATE_REDACTED/Code
    import Code from 'PRIVATE_BETA_PACKAGE_COORDINATE_REDACTED/Code';
    
    <Code>Frauthy content</Code>
    Astrostatic
    ---
    import Code from 'PRIVATE_BETA_PACKAGE_COORDINATE_REDACTED/Code';
    ---
    
    <Code>Frauthy content</Code>
    §04

    Verification

    Evidence record

    Scheduled

    Automated

    Batch C content coverage verifies native code output, language metadata, and consumer attributes.

    Target
    Brand 1.0.0-next.0 matrix
    Last verified
    Pending integrated G2 run
    Required

    Assistive technology

    No component-specific AT pass required; syntax colors remain in the forced-colors and contrast audit.

    Desktop
    VoiceOver/Safari · NVDA/Firefox
    Touch
    Not required for beta
    Open

    Known issues

    • Code does not highlight, sanitize, or execute source; consumers must provide text or already-safe child markup.
    §05

    Editorial guidance

    Do / don’t

    Do

    Use Code for short semantic fragments and CodeBlock for labelled, copyable listings.

    Don’t

    Do not inject unsanitized HTML or rely on syntax color alone.

    Release activity

    Code · Brand Core

    1 recorded change · 26 weeks
    1. 1.0.0-next.3

      Baseline public component contract.

    Version & provenance

    New in the v2 architecture

    There is no stable predecessor for this explicit compiled subpath. The v1 compatibility layer remains tested separately; visual and API diffs begin with the next prerelease.

    Current
    1.0.0-next.0
    Previous
    compatibility surface
    Deprecation
    none
    Replacement
    not applicable
    Next in ContentCopyButton