### Hierarchy

- CodeSnippet

### Implements

- AfterViewInit

## Index

### Inputs

- display
- expanded
- feedbackText
- feedbackTimeout
- skeleton
- theme
- translations

### Constructors

- constructor

### Properties

- code
- display
- expanded
- feedbackText
- feedbackTimeout
- hasExpandButton
- i18n
- showFeedback
- skeleton
- snippetClass
- theme
- translations
- codeSnippetCount

### Accessors

- attrType
- btnCopyClass
- displayStyle
- shouldShowExpandButton
- snippetInlineClass
- snippetInlineLightClass
- snippetMultiClass
- snippetSingleClass

### Methods

- canExpand
- copyCode
- hostClick
- ngAfterViewInit
- onCopyButtonClicked
- toggleSnippetExpansion

## Constructors

### constructor

- new CodeSnippet(i18n: I18n): CodeSnippet

- - Defined in src/code-snippet/code-snippet.component.ts:153

  #### Parameters

  - ##### i18n: I18n

  #### Returns CodeSnippet

## Properties

### code

@ViewChild({"selector":"code","opts":"{ static: false }"})
code: any

- Defined in src/code-snippet/code-snippet.component.ts:139

### display

@Input()
display: SnippetType = SnippetType.single

- Defined in src/code-snippet/code-snippet.component.ts:91

### expanded

@HostBinding({"hostPropertyName":"class.bx--snippet--expand"})
@Input()
expanded: boolean = false

- Defined in src/code-snippet/code-snippet.component.ts:111

### feedbackText

@Input()
feedbackText: any = this.translations.COPIED

- Defined in src/code-snippet/code-snippet.component.ts:103

### feedbackTimeout

@Input()
feedbackTimeout: number = 2000

- Defined in src/code-snippet/code-snippet.component.ts:109

### hasExpandButton

hasExpandButton: any = null

- Defined in src/code-snippet/code-snippet.component.ts:153

### Protected i18n

i18n: I18n

- Defined in src/code-snippet/code-snippet.component.ts:158

### showFeedback

showFeedback: boolean = false

- Defined in src/code-snippet/code-snippet.component.ts:151

### skeleton

@HostBinding({"hostPropertyName":"class.bx--skeleton"})
@Input()
skeleton: boolean = false

- Defined in src/code-snippet/code-snippet.component.ts:112

### snippetClass

@HostBinding({"hostPropertyName":"class.bx--snippet"})
snippetClass: boolean = true

- Defined in src/code-snippet/code-snippet.component.ts:114

### theme

@Input()
theme: "light" | "dark" = "dark"

- Defined in src/code-snippet/code-snippet.component.ts:97

### translations

@Input()
translations: any = this.i18n.get().CODE_SNIPPET

- Defined in src/code-snippet/code-snippet.component.ts:92

### Static codeSnippetCount

codeSnippetCount: number = 0

- Defined in src/code-snippet/code-snippet.component.ts:85

## Accessors

### attrType

@HostBinding({"hostPropertyName":"attr.type"})
attrType:

- Defined in src/code-snippet/code-snippet.component.ts:134

### btnCopyClass

@HostBinding({"hostPropertyName":"class.bx--btn--copy"})
btnCopyClass:

- Defined in src/code-snippet/code-snippet.component.ts:127

### displayStyle

@HostBinding({"hostPropertyName":"style.display"})
displayStyle:

- Defined in src/code-snippet/code-snippet.component.ts:131

### shouldShowExpandButton

shouldShowExpandButton:

- Defined in src/code-snippet/code-snippet.component.ts:141

### snippetInlineClass

@HostBinding({"hostPropertyName":"class.bx--snippet--inline"})
snippetInlineClass:

- Defined in src/code-snippet/code-snippet.component.ts:121

### snippetInlineLightClass

@HostBinding({"hostPropertyName":"class.bx--snippet--light"})
snippetInlineLightClass:

- Defined in src/code-snippet/code-snippet.component.ts:124

### snippetMultiClass

@HostBinding({"hostPropertyName":"class.bx--snippet--multi"})
snippetMultiClass:

- Defined in src/code-snippet/code-snippet.component.ts:118

### snippetSingleClass

@HostBinding({"hostPropertyName":"class.bx--snippet--single"})
snippetSingleClass:

- Defined in src/code-snippet/code-snippet.component.ts:115

## Methods

### Protected canExpand

- canExpand(): boolean

- - Defined in src/code-snippet/code-snippet.component.ts:230

  #### Returns boolean

### copyCode

- copyCode(): void

- - Defined in src/code-snippet/code-snippet.component.ts:170

  #### Returns void

### hostClick

@HostListener({"eventName":"click"})

- hostClick(): void

- - Defined in src/code-snippet/code-snippet.component.ts:222

  #### Returns void

### ngAfterViewInit

- ngAfterViewInit(): void

- - Defined in src/code-snippet/code-snippet.component.ts:206

  #### Returns void

### onCopyButtonClicked

- onCopyButtonClicked(): void

- - Defined in src/code-snippet/code-snippet.component.ts:196

  #### Returns void

### toggleSnippetExpansion

- toggleSnippetExpansion(): void

- - Defined in src/code-snippet/code-snippet.component.ts:162

  #### Returns void

Generated using TypeDoc