GitHub

Text Snippet

A text snippet is used to display a section of text with the ability to show or hide content beyond one line of text.

Components

DaffTextSnippetComponent

import { DaffTextSnippetComponent } from '@daffodil/design/text-snippet'

@Component()
class DaffTextSnippetComponent {
  condensed: ModelSignal<boolean> = model(true)

  html: InputSignal<string> = ''

  toggled: OutputEmitterRef<boolean> = output<boolean>()
}

Inputs

html
InputSignal<string>
Default''
Description

The HTML content to render inside the snippet.

Outputs

toggled
OutputEmitterRef<boolean>
Default
Description

An output event that can be used to track the state of the component externally.

Properties

condensed
ModelSignal<boolean>
Defaultmodel(true)
Description

Whether or not the component should render a condensed version of the content.