A text snippet is used to display a section of text with the ability to show or hide content beyond one line of text.
import { DaffTextSnippetComponent } from '@daffodil/design/text-snippet'
@Component()
class DaffTextSnippetComponent {
condensed: ModelSignal<boolean> = model(true)
html: InputSignal<string> = ''
toggled: OutputEmitterRef<boolean> = output<boolean>()
}
InputSignal<string>| Default | '' |
|---|---|
| Description | The HTML content to render inside the snippet. |
OutputEmitterRef<boolean>| Default | – |
|---|---|
| Description | An output event that can be used to track the state of the component externally. |
ModelSignal<boolean>| Default | model(true) |
|---|---|
| Description | Whether or not the component should render a condensed version of the content. |